nesstar.rdf
Class RDFBag

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

public class RDFBag
extends RDFObject

A Bag of RDF objects.

BUG: we assume that it contains only references to objects, there is no handling of strings or other simple types.

Created:
26 April 2002

Field Summary
 
Fields inherited from class nesstar.rdf.RDFObject
COLSEP, IS_GETTER, IS_PART, IS_PART_OF, WRITE_OP
 
Constructor Summary
RDFBag(RDFDB db)
          Constructor for the RDFBag object
RDFBag(RDFDB db, URL id)
          Constructor for the RDFBag object
 
Method Summary
 void add(int index, RDFObject element)
          Method
 void add(Object[] objs)
          Method
 void add(RDFObject obj)
          Method
 void clear()
          Method
 boolean contains(URL url)
           
static void dbg(String msg)
          Method
 Object get(int index)
           
static RDFBag getBag(RDFDB db, URL id)
          Gets the bag attribute of the RDFBag class
 Object getN(int n)
          Gets the n attribute of the RDFBag object
 int getNSize()
          Gets the nSize attribute of the RDFBag object
 Object[] getObjs()
          Gets the objs attribute of the RDFBag object
static Object[] getObjs(Object[] refs)
           
static Object[] getObjs(RDFRef ref)
          Gets the objs attribute of the RDFBag class
static Object[] getObjs(Vector refs)
          Gets the objs attribute of the RDFBag class
 void reload()
          Description of the Method
 Object remove(int index)
          Removes the element at the specified position in this list.
 Object set(int index, RDFObject obj)
          Method
 void setN(Integer n, RDFRef ref)
          Sets the n attribute of the RDFBag object
 
Methods inherited from class nesstar.rdf.RDFObject
AddProperty, AddStringProperty, chkFinal, compareTo, equals, err, err, get_comment, get_creationDate, get_label, get, getAccessCondition, getBinding, getBindings, getBookmarkLabel, getCollectionURL, getComment, getCreationDate, getDB, getDescriptor, getDescriptor, getDomain, getGetterMethods, getID, getInitialisedProperties, getInternalID, getLabel, getLastClear, getPartsDescriptor, getPartsDescriptor, getPartsDescriptor, getPath, getProperties, GetProperties, GetProperty, GetPropertyStatement, GetPropertyStatements, getRange, getRangeType, getRef, getRef, getServer, getShortId, getShortID, getStatementHome, GetStringProperties, GetStringProperty, getTimeoutInSecs, getType, init, init, initialised, isComplete, isLocal, isMeta, isStale, loaded, neededCollectionReload, neededReload, neededReload, neededReload, neededReload, needsReload, 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
 

Constructor Detail

RDFBag

public RDFBag(RDFDB db,
              URL id)
       throws Exception
Constructor for the RDFBag object

Parameters:
db -
id -
Throws:
Exception

RDFBag

public RDFBag(RDFDB db)
       throws Exception
Constructor for the RDFBag object

Parameters:
db -
Throws:
Exception
Method Detail

setN

public void setN(Integer n,
                 RDFRef ref)
Sets the n attribute of the RDFBag object

Parameters:
n - The new n value
ref - The new n value

set

public Object set(int index,
                  RDFObject obj)
           throws Exception
Method

Parameters:
index -
obj -
Returns:
Throws:
Exception

get

public Object get(int index)
           throws Exception
Throws:
Exception

getBag

public static RDFBag getBag(RDFDB db,
                            URL id)
                     throws Exception
Gets the bag attribute of the RDFBag class

Parameters:
db -
id -
Returns:
The bag value
Throws:
Exception

getN

public Object getN(int n)
Gets the n attribute of the RDFBag object

Parameters:
n -
Returns:
The n value

getNSize

public int getNSize()
Gets the nSize attribute of the RDFBag object

Returns:
The nSize value

getObjs

public Object[] getObjs()
                 throws Exception
Gets the objs attribute of the RDFBag object

Returns:
The objs value
Throws:
Exception

getObjs

public static Object[] getObjs(Object[] refs)
                        throws Exception
Parameters:
refs - the references to be resolved
Returns:
the objects to which the references point
Throws:
Exception

getObjs

public static Object[] getObjs(Vector refs)
                        throws Exception
Gets the objs attribute of the RDFBag class

Parameters:
refs -
Returns:
The objs value
Throws:
Exception

getObjs

public static Object[] getObjs(RDFRef ref)
                        throws Exception
Gets the objs attribute of the RDFBag class

Parameters:
ref -
Returns:
The objs value
Throws:
Exception

dbg

public static void dbg(String msg)
Method

Parameters:
msg -

clear

public void clear()
Method

Overrides:
clear in class RDFObject

add

public void add(RDFObject obj)
         throws Exception
Method

Parameters:
obj -
Throws:
Exception

add

public void add(Object[] objs)
         throws Exception
Method

Parameters:
objs -
Throws:
Exception

contains

public boolean contains(URL url)
Parameters:
url -
Returns:
true if url is in the Bag

add

public void add(int index,
                RDFObject element)
         throws Exception
Method

Parameters:
index -
element -
Throws:
Exception

remove

public Object remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the lefta (subtracts one from their indices).

Parameters:
index - - the index of the element to remove.
Returns:
the element that was removed from the list.

reload

public void reload()
            throws Exception
Description of the Method

Overrides:
reload in class RDFObject
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved