nesstar.api.faster
Class Datafile

java.lang.Object
  extended by java.util.Observable
      extended by nesstar.rdf.RDFObject
          extended by nesstar.api.faster.Datafile
All Implemented Interfaces:
Comparable, RDFObj

public class Datafile
extends RDFObject

The 'comment' property is derived from the DDI field:
<codeBook><fileDscr><fileTxt><fileCont>
The 'label' property is derived from the DDI field:
<codeBook><fileDscr><fileTxt><fileName>

Field Summary
static String CLASS_ID
           
 
Fields inherited from class nesstar.rdf.RDFObject
COLSEP, IS_GETTER, IS_PART, IS_PART_OF, WRITE_OP
 
Constructor Summary
Datafile(RDFDB db, URL id)
          Create an object with the indicated id in the indicated db
 
Method Summary
 Bookmark AddDataFile(File file)
           add the data file corresponding to this object
 void AddDataFile(File file, BasicExecutorLog log)
           add the data file corresponding to this object
 void clear()
          Clear all properties of this object
 RDFRef get_children()
           
 String get_content()
           
 String get_ddiDatafileID()
           
 String get_encoding()
           
 String get_fileType()
           
 String get_hasData()
           
 String get_name()
           
 String get_numCases()
           
 String get_numVars()
           
 RDFRef get_parents()
           
 String get_recType()
           
 String get_structure()
           
 RDFRef get_study()
           
 RDFRef get_variable()
           
static Vector getAllInstances()
           
static Vector getAllInstances(RDFDB db)
           
 List getChildren()
           
 String getComment()
           Abstract or description of file.
 String getContent()
          Deprecated. replaced by Label
 String getDdiDatafileID()
           File ID (local to this data file)
static FeatureDescriptor getDescriptor(String featureName)
          get the descriptor for a feature of the class, either method or attribute Note: the methods' feature are still not implemented
 String getEncoding()
           The charset attribute allows you to specify the character set used in the file, e.g., us-ascii, ebcdic, unicode UTF-8, etc.
 String getFileType()
           Types of data files include raw data (ASCII, EBCDIC, etc.) and software-dependent files such as SAS datasets, SPSS export files, etc.
static Collection getGetterMethods()
           
 Boolean getHasData()
           Does this Datafile have data?
static Datafile getInstance(RDFDB db, URL id)
          If an object of type Datafile with the indicated id exists in the db returns it otherwise create a new object in the db and returns it
static Datafile getInstance(String rdf)
           
 String getLabel()
           Contains a short title that will be used to distinguish a particular file/part from other files/parts in the data collection.
 String getName()
           replicated in label - should be deprecated *
 Integer getNumCases()
           Number of cases or observations in the entire file.
 Integer getNumVars()
           Number of variables in the entire file.To be used for rectangular files only.
 List getParents()
           
static Collection getPartsDescriptor()
           
 String getRecType()
           Indicates the type of record, e.g., "A records" or "Household records".
 String getStructure()
           Indicates hierarchical, rectangular, relational or nested (the default is rectangular).
 Study getStudy()
           
 List getVariable()
           
 void initialised()
          Notify that the object has been created and its properties setup for the first time.
static void listenForNewObj(NewObjListener listener)
          Register to be notified when new objects are added.
static Datafile newInstance(RDFDB db)
          Create a new object of this type with a locally unique id and returns it
static Datafile retrieve(URL id)
          If an object of type Datafile with the indicated id has already being retrieved from the network returns it otherwise retrieve it together with its class information (methods, properties, etc.)
 void set_children(RDFRef children)
           
 void set_content(String content)
           
 void set_ddiDatafileID(String ddiDatafileID)
           
 void set_encoding(String encoding)
           
 void set_fileType(String fileType)
           
 void set_hasData(String hasData)
           
 void set_name(String name)
           
 void set_numCases(String numCases)
           
 void set_numVars(String numVars)
           
 void set_parents(RDFRef parents)
           
 void set_recType(String recType)
           
 void set_structure(String structure)
           
 void set_study(RDFRef study)
           
 void set_variable(RDFRef variable)
           
 void setChildren(List children)
           
 void setContent(String content)
          Deprecated. replaced by Label
 void setDdiDatafileID(String ddiDatafileID)
           File ID (local to this data file)
 void setEncoding(String encoding)
           The charset attribute allows you to specify the character set used in the file, e.g., us-ascii, ebcdic, unicode UTF-8, etc.
 void setFileType(String fileType)
           Types of data files include raw data (ASCII, EBCDIC, etc.) and software-dependent files such as SAS datasets, SPSS export files, etc.
 void setHasData(Boolean hasData)
           Does this Datafile have data?
 void setName(String name)
           replicated in label - should be deprecated *
 void setNumCases(Integer numCases)
           Number of cases or observations in the entire file.
 void setNumVars(Integer numVars)
           Number of variables in the entire file.To be used for rectangular files only.
 void setParents(List parents)
           
 void setRecType(String recType)
           Indicates the type of record, e.g., "A records" or "Household records".
 void setStructure(String structure)
           Indicates hierarchical, rectangular, relational or nested (the default is rectangular).
 void setStudy(Study study)
           
 void setVariable(List variable)
           
 
Methods inherited from class nesstar.rdf.RDFObject
AddProperty, AddStringProperty, chkFinal, compareTo, dbg, equals, err, err, get_comment, get_creationDate, get_label, get, getAccessCondition, getBinding, getBindings, getBookmarkLabel, getCollectionURL, getCreationDate, getDB, getDescriptor, getDomain, getID, getInitialisedProperties, getInternalID, getLastClear, getPartsDescriptor, getPartsDescriptor, getPath, getProperties, GetProperties, GetProperty, GetPropertyStatement, GetPropertyStatements, getRange, getRangeType, getRef, getRef, getServer, getShortId, getShortID, getStatementHome, GetStringProperties, GetStringProperty, getTimeoutInSecs, getType, init, init, isComplete, isLocal, isMeta, isStale, loaded, neededCollectionReload, neededReload, neededReload, neededReload, neededReload, needsReload, reload, remove, set_comment, set_complete, set_creationDate, set_label, set, setComment, setComplete, setCreationDate, setDB, setHardOrSoft, setID, setLabel, setLastClear, SetProperty, setServer, SetStringProperty, setTimeoutInSecs, setTimestamp, setType, setTypeID, stale, toRDF, toRDFWrapped, toString, update
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static String CLASS_ID
Constructor Detail

Datafile

public Datafile(RDFDB db,
                URL id)
         throws Exception
Create an object with the indicated id in the indicated db

Parameters:
db - the db where the object is to be created
id - the id of the object to create
Throws:
Exception
Method Detail

set_study

public void set_study(RDFRef study)
Parameters:
study -

setStudy

public void setStudy(Study study)
              throws Exception
Parameters:
study -
Throws:
Exception

set_parents

public void set_parents(RDFRef parents)
Parameters:
parents -

setParents

public void setParents(List parents)
                throws Exception
Parameters:
parents -
Throws:
Exception

set_children

public void set_children(RDFRef children)
Parameters:
children -

setChildren

public void setChildren(List children)
                 throws Exception
Parameters:
children -
Throws:
Exception

set_variable

public void set_variable(RDFRef variable)
Parameters:
variable -

setVariable

public void setVariable(List variable)
                 throws Exception
Parameters:
variable -
Throws:
Exception

setNumCases

public void setNumCases(Integer numCases)

Number of cases or observations in the entire file. To be used for rectangular files only.

Parameters:
numCases -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><dimensns><caseQnty>

set_numCases

public void set_numCases(String numCases)
Parameters:
numCases -

setNumVars

public void setNumVars(Integer numVars)

Number of variables in the entire file.To be used for rectangular files only.

Parameters:
numVars -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><dimensns><varQnty>

set_numVars

public void set_numVars(String numVars)
Parameters:
numVars -

setName

public void setName(String name)

replicated in label - should be deprecated *

Parameters:
name -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileName>

set_name

public void set_name(String name)
Parameters:
name -

setFileType

public void setFileType(String fileType)

Types of data files include raw data (ASCII, EBCDIC, etc.) and software-dependent files such as SAS datasets, SPSS export files, etc.

Parameters:
fileType -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileType>

set_fileType

public void set_fileType(String fileType)
Parameters:
fileType -

setRecType

public void setRecType(String recType)

Indicates the type of record, e.g., "A records" or "Household records".

Parameters:
recType -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileStrc><recGrp rectype>

set_recType

public void set_recType(String recType)
Parameters:
recType -

setEncoding

public void setEncoding(String encoding)

The charset attribute allows you to specify the character set used in the file, e.g., us-ascii, ebcdic, unicode UTF-8, etc.

Parameters:
encoding -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileType charset>

set_encoding

public void set_encoding(String encoding)
Parameters:
encoding -

setStructure

public void setStructure(String structure)

Indicates hierarchical, rectangular, relational or nested (the default is rectangular).

Parameters:
structure -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileStrc type>

set_structure

public void set_structure(String structure)
Parameters:
structure -

setDdiDatafileID

public void setDdiDatafileID(String ddiDatafileID)

File ID (local to this data file)

Parameters:
ddiDatafileID -
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileName ID>

set_ddiDatafileID

public void set_ddiDatafileID(String ddiDatafileID)
Parameters:
ddiDatafileID -

setContent

public void setContent(String content)
Deprecated. replaced by Label

Parameters:
content -

set_content

public void set_content(String content)
Parameters:
content -

setHasData

public void setHasData(Boolean hasData)

Does this Datafile have data?

Parameters:
hasData -

set_hasData

public void set_hasData(String hasData)
Parameters:
hasData -

getAllInstances

public static Vector getAllInstances(RDFDB db)
                              throws Exception
Parameters:
db - the db where the instances are to be found
Returns:
all the instances of this class in the database
Throws:
Exception

getAllInstances

public static Vector getAllInstances()
                              throws Exception
Returns:
get all the instances of this class from the default database
Throws:
Exception

getInstance

public static Datafile getInstance(RDFDB db,
                                   URL id)
                            throws Exception
If an object of type Datafile with the indicated id exists in the db returns it otherwise create a new object in the db and returns it

Parameters:
db - the db where the object is to be found or created
id - the id of the object to retrieve or create
Returns:
an object of type Server with the indicated id and existing in the indicated db
Throws:
Exception

getInstance

public static Datafile getInstance(String rdf)
                            throws Exception
Parameters:
rdf - some rdf code that contains a description of an object of this kind
Returns:
the single instance of this class described in the passed RDF code
Throws:
Exception

get_study

public RDFRef get_study()
                 throws Exception
Throws:
Exception

getStudy

public Study getStudy()
Returns:

get_parents

public RDFRef get_parents()
                   throws Exception
Throws:
Exception

getParents

public List getParents()
                throws Exception
Returns:
Throws:
Exception

get_children

public RDFRef get_children()
                    throws Exception
Throws:
Exception

getChildren

public List getChildren()
                 throws Exception
Returns:
Throws:
Exception

get_variable

public RDFRef get_variable()
                    throws Exception
Throws:
Exception

getVariable

public List getVariable()
                 throws Exception
Returns:
Throws:
Exception

getNumCases

public Integer getNumCases()

Number of cases or observations in the entire file. To be used for rectangular files only.

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><dimensns><caseQnty>

get_numCases

public String get_numCases()
                    throws Exception
Throws:
Exception

getNumVars

public Integer getNumVars()

Number of variables in the entire file.To be used for rectangular files only.

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><dimensns><varQnty>

get_numVars

public String get_numVars()
                   throws Exception
Throws:
Exception

getName

public String getName()

replicated in label - should be deprecated *

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileName>

get_name

public String get_name()
                throws Exception
Throws:
Exception

getFileType

public String getFileType()

Types of data files include raw data (ASCII, EBCDIC, etc.) and software-dependent files such as SAS datasets, SPSS export files, etc.

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileType>

get_fileType

public String get_fileType()
                    throws Exception
Throws:
Exception

getRecType

public String getRecType()

Indicates the type of record, e.g., "A records" or "Household records".

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileStrc><recGrp rectype>

get_recType

public String get_recType()
                   throws Exception
Throws:
Exception

getEncoding

public String getEncoding()

The charset attribute allows you to specify the character set used in the file, e.g., us-ascii, ebcdic, unicode UTF-8, etc.

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileType charset>

get_encoding

public String get_encoding()
                    throws Exception
Throws:
Exception

getStructure

public String getStructure()

Indicates hierarchical, rectangular, relational or nested (the default is rectangular).

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileStrc type>

get_structure

public String get_structure()
                     throws Exception
Throws:
Exception

getDdiDatafileID

public String getDdiDatafileID()

File ID (local to this data file)

This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileName ID>

get_ddiDatafileID

public String get_ddiDatafileID()
                         throws Exception
Throws:
Exception

getContent

public String getContent()
Deprecated. replaced by Label


get_content

public String get_content()
                   throws Exception
Throws:
Exception

getLabel

public String getLabel()

Contains a short title that will be used to distinguish a particular file/part from other files/parts in the data collection.

Overrides:
getLabel in class RDFObject
This property replaces:
content
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileName>

getComment

public String getComment()

Abstract or description of file. An unformatted summary describing the purpose, nature, and scope of the data file, special characteristics of its contents, major subject areas covered, and what questions the PIs attempted to answer when they created the file. A listing of major variables in the file is important here. In the case of multi-file collections, this uniquely describes the contents of each file.

Overrides:
getComment in class RDFObject
Returns:
the comment
This property stores the contents of the DDI field:
<codeBook><fileDscr><fileTxt><fileCont>

getHasData

public Boolean getHasData()

Does this Datafile have data?


get_hasData

public String get_hasData()
                   throws Exception
Throws:
Exception

getDescriptor

public static FeatureDescriptor getDescriptor(String featureName)
get the descriptor for a feature of the class, either method or attribute Note: the methods' feature are still not implemented

Parameters:
featureName -

getPartsDescriptor

public static Collection getPartsDescriptor()
Returns:
the descriptor of the attribute that are part of the class

getGetterMethods

public static Collection getGetterMethods()
Returns:
the descriptor of the attribute that are part of the class

newInstance

public static Datafile newInstance(RDFDB db)
                            throws Exception
Create a new object of this type with a locally unique id and returns it

Parameters:
db - the db where the object is to be found or created
Returns:
an object of this type
Throws:
Exception

listenForNewObj

public static void listenForNewObj(NewObjListener listener)
Register to be notified when new objects are added.

Parameters:
listener - the listener

initialised

public void initialised()
Notify that the object has been created and its properties setup for the first time. This is NOT called when the object is simply reloaded.

Overrides:
initialised in class RDFObject

retrieve

public static Datafile retrieve(URL id)
                         throws Exception
If an object of type Datafile with the indicated id has already being retrieved from the network returns it otherwise retrieve it together with its class information (methods, properties, etc.)

Parameters:
id - the id of the object to retrieve
Returns:
an object of type Datafile with the indicated id
Throws:
Exception

clear

public void clear()
Description copied from class: RDFObject
Clear all properties of this object

Overrides:
clear in class RDFObject

AddDataFile

public Bookmark AddDataFile(File file)
                     throws Exception

add the data file corresponding to this object

Parameters:
file - the file to be added
Throws:
Exception

AddDataFile

public void AddDataFile(File file,
                        BasicExecutorLog log)
                 throws Exception

add the data file corresponding to this object

Parameters:
file - the file to be added
log - the Executor of this method;if null a default one is used
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved