nesstar.api
Class Catalog

java.lang.Object
  extended by java.util.Observable
      extended by nesstar.rdf.RDFObject
          extended by nesstar.api.Catalog
All Implemented Interfaces:
Comparable, RDFObj
Direct Known Subclasses:
Catalog

public class Catalog
extends RDFObject

A Catalog, a container for searchable metadata and processable data. Code automatically generated from ARGO/UML


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
Catalog(RDFDB db, URL id)
          Create an object with the indicated id in the indicated db
 
Method Summary
 Bookmark AddDataset(File file)
          Add a dataset to the catalog.
 Dataset AddDataset(File file, BasicExecutorLog log)
          Add a dataset to the catalog.
 void clear()
          Clear all properties of this object
 Bookmark DeleteAllDatasets()
          Delete all the datasets in the catalog.
 void DeleteAllDatasets(BasicExecutorLog log)
          Delete all the datasets in the catalog.
 RDFRef get_datasets()
           
static Vector getAllInstances()
           
static Vector getAllInstances(RDFDB db)
           
 List getDatasets()
           
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
static Collection getGetterMethods()
           
static Catalog getInstance(RDFDB db, URL id)
          If an object of type Catalog with the indicated id exists in the db returns it otherwise create a new object in the db and returns it
static Catalog getInstance(String rdf)
           
static Collection getPartsDescriptor()
           
 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 Catalog newInstance(RDFDB db)
          Create a new object of this type with a locally unique id and returns it
 Bookmark Query(String query)
          Query the catalog.
 List Query(String query, BasicExecutorLog log)
          Query the catalog.
 Bookmark Reindex()
          Reindex the catalog.
 void Reindex(BasicExecutorLog log)
          Reindex the catalog.
static Catalog retrieve(URL id)
          If an object of type Catalog 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_datasets(RDFRef datasets)
           
 void setDatasets(List datasets)
           
 
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, getComment, getCreationDate, getDB, getDescriptor, getDomain, getID, getInitialisedProperties, getInternalID, getLabel, 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

Catalog

public Catalog(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_datasets

public void set_datasets(RDFRef datasets)
Parameters:
datasets -

setDatasets

public void setDatasets(List datasets)
                 throws Exception
Parameters:
datasets -
Throws:
Exception

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 Catalog getInstance(RDFDB db,
                                  URL id)
                           throws Exception
If an object of type Catalog 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 Catalog 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_datasets

public RDFRef get_datasets()
                    throws Exception
Throws:
Exception

getDatasets

public List getDatasets()
                 throws Exception
Returns:
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 Catalog 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 Catalog retrieve(URL id)
                        throws Exception
If an object of type Catalog 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 Catalog 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

AddDataset

public Bookmark AddDataset(File file)
                    throws Exception
Add a dataset to the catalog.

Returns the dataset object that has been created.

Parameters:
file - The XML file, coded according to the DDI standard, that describes the dataset. <p>The ID of the dataset is taken from the <b>stdyDscr/citation/titlStmt/IDNo</b> element.
Throws:
Exception

AddDataset

public Dataset AddDataset(File file,
                          BasicExecutorLog log)
                   throws Exception
Add a dataset to the catalog.

Returns the dataset object that has been created.

Parameters:
file - The XML file, coded according to the DDI standard, that describes the dataset. <p>The ID of the dataset is taken from the <b>stdyDscr/citation/titlStmt/IDNo</b> element.
log - the Executor of this method;if null a default one is used
Throws:
Exception

Reindex

public Bookmark Reindex()
                 throws Exception
Reindex the catalog.

Throws:
Exception

Reindex

public void Reindex(BasicExecutorLog log)
             throws Exception
Reindex the catalog.

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

Query

public Bookmark Query(String query)
               throws Exception
Query the catalog.

Return the RDF description of the retrieved datasets.

Parameters:
query - The query to perform. <p>The queries are expressed in the cheshire search language, for example: <dl> <dt>any @ census <dd>return all the datasets that contain, in any of their queryable fields, the word <i>census</i> </dl> <p>In addition there are the following special queries: <dl> <dt>LIST <dd>return all the datasets in the catalog <dt>hasdata yes <dd>Returns all the datasets that have data </dl>
Throws:
Exception

Query

public List Query(String query,
                  BasicExecutorLog log)
           throws Exception
Query the catalog.

Return the RDF description of the retrieved datasets.

Parameters:
query - The query to perform. <p>The queries are expressed in the cheshire search language, for example: <dl> <dt>any @ census <dd>return all the datasets that contain, in any of their queryable fields, the word <i>census</i> </dl> <p>In addition there are the following special queries: <dl> <dt>LIST <dd>return all the datasets in the catalog <dt>hasdata yes <dd>Returns all the datasets that have data </dl>
log - the Executor of this method;if null a default one is used
Throws:
Exception

DeleteAllDatasets

public Bookmark DeleteAllDatasets()
                           throws Exception
Delete all the datasets in the catalog.

Throws:
Exception

DeleteAllDatasets

public void DeleteAllDatasets(BasicExecutorLog log)
                       throws Exception
Delete all the datasets in the catalog.

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

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved