nesstar.api.faster
Class Catalog

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

public class Catalog
extends Catalog

A new Catalog 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 AddChild(RDFObject child)
           Add a child in the catalog tree
 List AddChild(RDFObject child, BasicExecutorLog log)
           Add a child in the catalog tree
 Bookmark AddChildAt(RDFObject child, Integer position)
           Add a child in the catalog tree at a given position
 List AddChildAt(RDFObject child, Integer position, BasicExecutorLog log)
           Add a child in the catalog tree at a given position
 void clear()
          Clear all properties of this object
 RDFRef get_children()
           
static Vector getAllInstances()
           
static Vector getAllInstances(RDFDB db)
           
 List getChildren()
           Represents the set of object pointed to by a catalog
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 PathsTo(RDFObject to)
           Return a list of paths that lead from the catalog to the 'to' object.
 String PathsTo(RDFObject to, BasicExecutorLog log)
           Return a list of paths that lead from the catalog to the 'to' object.
 Bookmark RangeQuery(String query, Integer startFrom, Integer maxHits, Boolean withPaths)
          A general query API.
 List RangeQuery(String query, Integer startFrom, Integer maxHits, Boolean withPaths, BasicExecutorLog log)
          A general query API.
 Bookmark Remove()
           Remove the catalog with all the links to it
 void Remove(BasicExecutorLog log)
           Remove the catalog with all the links to it
 Bookmark RemoveChild(RDFObject childURL)
           Remove a child from the current catalog.
 void RemoveChild(RDFObject childURL, BasicExecutorLog log)
           Remove a child from the current catalog.
 Bookmark RemoveChildAt(Integer childIndex)
           Remove a child from the current catalog.
 void RemoveChildAt(Integer childIndex, BasicExecutorLog log)
           Remove a child from the current 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_children(RDFRef children)
           
 void setChildren(List children)
           Represents the set of object pointed to by a catalog
 
Methods inherited from class nesstar.api.Catalog
AddDataset, AddDataset, DeleteAllDatasets, DeleteAllDatasets, get_datasets, getDatasets, Query, Query, Reindex, Reindex, set_datasets, setDatasets
 
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

setChildren

public void setChildren(List children)
                 throws Exception

Represents the set of object pointed to by a catalog

Parameters:
children -
Throws:
Exception

set_children

public void set_children(RDFRef children)
Parameters:
children -

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

getChildren

public List getChildren()
                 throws Exception

Represents the set of object pointed to by a catalog

Throws:
Exception

get_children

public RDFRef get_children()
                    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 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 Catalog

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 Catalog

AddChild

public Bookmark AddChild(RDFObject child)
                  throws Exception

Add a child in the catalog tree

Parameters:
child - the URL of the object to be added
Throws:
Exception

AddChild

public List AddChild(RDFObject child,
                     BasicExecutorLog log)
              throws Exception

Add a child in the catalog tree

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

AddChildAt

public Bookmark AddChildAt(RDFObject child,
                           Integer position)
                    throws Exception

Add a child in the catalog tree at a given position

Parameters:
child - the URL of the object to be added
position - the position in the children list: 1..children.size()
Throws:
Exception

AddChildAt

public List AddChildAt(RDFObject child,
                       Integer position,
                       BasicExecutorLog log)
                throws Exception

Add a child in the catalog tree at a given position

Parameters:
child - the URL of the object to be added
position - the position in the children list: 1..children.size()
log - the Executor of this method;if null a default one is used
Throws:
Exception

RangeQuery

public Bookmark RangeQuery(String query,
                           Integer startFrom,
                           Integer maxHits,
                           Boolean withPaths)
                    throws Exception
A general query API.

The query syntax has to be in the following format:
   
query ::= GET result_object where_expr order_clause
where_expr ::= WHERE expr
| empty
result_object ::= identifier
order_clause ::= ORDER BY field_list
| empty
field_list ::= field_list ',' field
| field
field ::= ASCENDING property
| DESCENDING property
| property
expr ::= expr OR term
| expr XOR term
| term
term ::= term AND factor
| factor
factor ::= primary
| sub_expr
| NOT primary
sub_expr ::= '(' expr ')'
primary ::= property relation literal
| property relation property
| property FINDS near_expr
| property IN string_list
| property IS NULL
property ::= domain_object '.' identifier
| domain_object '.' '*'
domain_object ::= identifier
near_expr ::= near_expr near_operator literal
| first_near_expr
first_near_expr ::= literal near_operator literal
near_operator ::= NEAR
| NEAR word_distance
word_distance ::= '(' number ')'
string_list ::= string_list ',' string
| string
literal ::= string
| number
| date
relation ::= CONTAINS
| CONTAINSLEADING
| STARTSWITH
| ENDSWITH
| '>'
| '>='
| '<'
| '<='
| '=='
| '!='
| LIKE
empty ::= /* nothing */


The date literal must be in one of the formats "yyyy/mm/dd" or "yyyy.mm.dd".
Partial date literals are supported in the formats "yyyy/mm" or "yyyy.mm" or "yyyy".
The string or date literals must be specified in single or double quotes.

Examples:
GET Variable WHERE Study.abstractText CONTAINS 'smoking' AND Variable.label CONTAINS 'cancer'
GET Study WHERE Study.distributionDate >= '1989/02/10'


A wildcard field list is now supported. It can only be specified on the left side of a relational operand,
and it will automatically ignore fields whose types are incompatible with the search literal.

Examples:
Find all studies where at least one of its text or date fields contains '1987'
GET Study WHERE Study.* CONTAINS '1987'
Find all studies which have variables with at least one of its text fields containing the word 'smoking'
GET Study WHERE Variable.* CONTAINS 'smoking'

Parameters:
query - the query to be performed
startFrom - the one-based position of the first returned hit
maxHits - the maximun number of object returned
withPaths - if true return the path to the object from the searched catalog
Throws:
Exception

RangeQuery

public List RangeQuery(String query,
                       Integer startFrom,
                       Integer maxHits,
                       Boolean withPaths,
                       BasicExecutorLog log)
                throws Exception
A general query API.

The query syntax has to be in the following format:
   
query ::= GET result_object where_expr order_clause
where_expr ::= WHERE expr
| empty
result_object ::= identifier
order_clause ::= ORDER BY field_list
| empty
field_list ::= field_list ',' field
| field
field ::= ASCENDING property
| DESCENDING property
| property
expr ::= expr OR term
| expr XOR term
| term
term ::= term AND factor
| factor
factor ::= primary
| sub_expr
| NOT primary
sub_expr ::= '(' expr ')'
primary ::= property relation literal
| property relation property
| property FINDS near_expr
| property IN string_list
| property IS NULL
property ::= domain_object '.' identifier
| domain_object '.' '*'
domain_object ::= identifier
near_expr ::= near_expr near_operator literal
| first_near_expr
first_near_expr ::= literal near_operator literal
near_operator ::= NEAR
| NEAR word_distance
word_distance ::= '(' number ')'
string_list ::= string_list ',' string
| string
literal ::= string
| number
| date
relation ::= CONTAINS
| CONTAINSLEADING
| STARTSWITH
| ENDSWITH
| '>'
| '>='
| '<'
| '<='
| '=='
| '!='
| LIKE
empty ::= /* nothing */


The date literal must be in one of the formats "yyyy/mm/dd" or "yyyy.mm.dd".
Partial date literals are supported in the formats "yyyy/mm" or "yyyy.mm" or "yyyy".
The string or date literals must be specified in single or double quotes.

Examples:
GET Variable WHERE Study.abstractText CONTAINS 'smoking' AND Variable.label CONTAINS 'cancer'
GET Study WHERE Study.distributionDate >= '1989/02/10'


A wildcard field list is now supported. It can only be specified on the left side of a relational operand,
and it will automatically ignore fields whose types are incompatible with the search literal.

Examples:
Find all studies where at least one of its text or date fields contains '1987'
GET Study WHERE Study.* CONTAINS '1987'
Find all studies which have variables with at least one of its text fields containing the word 'smoking'
GET Study WHERE Variable.* CONTAINS 'smoking'

Parameters:
query - the query to be performed
startFrom - the one-based position of the first returned hit
maxHits - the maximun number of object returned
withPaths - if true return the path to the object from the searched catalog
log - the Executor of this method;if null a default one is used
Throws:
Exception

RemoveChild

public Bookmark RemoveChild(RDFObject childURL)
                     throws Exception

Remove a child from the current catalog.

Parameters:
childURL - An object belonging to the catalog. Received by the Server as a URL in either short or long form, such as<br> "fCatalog/XTEST2" or "http://nesstar2.essex.ac.uk/obj/fCatalog/XTEST2"
Throws:
Exception

RemoveChild

public void RemoveChild(RDFObject childURL,
                        BasicExecutorLog log)
                 throws Exception

Remove a child from the current catalog.

Parameters:
childURL - An object belonging to the catalog. Received by the Server as a URL in either short or long form, such as<br> "fCatalog/XTEST2" or "http://nesstar2.essex.ac.uk/obj/fCatalog/XTEST2"
log - the Executor of this method;if null a default one is used
Throws:
Exception

RemoveChildAt

public Bookmark RemoveChildAt(Integer childIndex)
                       throws Exception

Remove a child from the current catalog.

Parameters:
childIndex - The index of the child object. The first child starts at index 1
Throws:
Exception

RemoveChildAt

public void RemoveChildAt(Integer childIndex,
                          BasicExecutorLog log)
                   throws Exception

Remove a child from the current catalog.

Parameters:
childIndex - The index of the child object. The first child starts at index 1
log - the Executor of this method;if null a default one is used
Throws:
Exception

Remove

public Bookmark Remove()
                throws Exception

Remove the catalog with all the links to it

Throws:
Exception

Remove

public void Remove(BasicExecutorLog log)
            throws Exception

Remove the catalog with all the links to it

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

PathsTo

public Bookmark PathsTo(RDFObject to)
                 throws Exception

Return a list of paths that lead from the catalog to the 'to' object. A path is a sequence of property traversals. For example .children[2].children[3] is a path that leads from the catalog to the third child of the second catalog's subcatalog.

Parameters:
to - The object to which the paths lead.
Returns:
A String containing a list of ; separated paths.
Throws:
Exception

PathsTo

public String PathsTo(RDFObject to,
                      BasicExecutorLog log)
               throws Exception

Return a list of paths that lead from the catalog to the 'to' object. A path is a sequence of property traversals. For example .children[2].children[3] is a path that leads from the catalog to the third child of the second catalog's subcatalog.

Parameters:
to - The object to which the paths lead.
log - the Executor of this method;if null a default one is used
Returns:
A String containing a list of ; separated paths.
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved