|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ocean.doc.OCEANDocNode
|
+--ocean.doc.Resource
The abstract Resource class is the parent of all classes that
represent resource constructs in the trade proposal schemas.
| Field Summary | |
protected boolean |
requested
Indicates whether this resource is requested or provided. |
protected org.w3c.dom.Element |
resElem
The Element |
protected boolean |
reserved
|
protected java.lang.String |
resourceID
The resource identifier. |
protected java.lang.String |
resourceType
The resource type. |
protected Schedule |
schedule
Schedule for this construct. |
| Fields inherited from class ocean.doc.OCEANDocNode |
doc, rootNode |
| Constructor Summary | |
protected |
Resource(boolean req,
org.w3c.dom.Document d)
|
protected |
Resource(org.w3c.dom.Node resNode,
boolean req,
org.w3c.dom.Document d)
|
protected |
Resource(java.lang.String id,
java.lang.String resType,
boolean req,
org.w3c.dom.Document d)
|
| Method Summary | |
protected abstract void |
buildNode()
This method builds the node tree of this construct, based on member data of of the implementing subclass. |
abstract int |
compareTo(java.lang.Object o)
Compare this resource to another object. |
protected void |
createRoot(java.lang.String rootName)
Create the root node as a named element. |
java.lang.String |
getID()
Return the resource identifier. |
protected org.w3c.dom.Node |
getResIDNode()
Create and return the Node named "ResourceID". |
abstract java.lang.String |
getResourceInfo()
Get a String which describes the state of the Resource. |
protected org.w3c.dom.Node |
getSchedNode()
Get the root Node of the availability/reservation
schedule of this construct. |
Schedule |
getSchedule()
Get the availability/reservation schedule for this construct |
java.lang.String |
getType()
Get the resource type string. |
abstract boolean |
isCompatible(Resource r)
Check if this resource is compatible with another. |
boolean |
isRequested()
Check whether this resource is requested or provided. |
boolean |
isReserved()
|
protected void |
setDocument(org.w3c.dom.Document d)
Set the DOM Document that is used to create and
modify this construct. |
void |
setID(java.lang.String resID)
Set the identifier for this resource construct. |
void |
setReserved(boolean b)
|
void |
setSchedule(Schedule s)
Set the availability/reservation schedule for this construct. |
void |
setType(java.lang.String s)
Set the resource type String |
| Methods inherited from class ocean.doc.OCEANDocNode |
genID, getDocument, getRootNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String resourceID
protected java.lang.String resourceType
protected org.w3c.dom.Element resElem
Element named "Resource" in the construct's node tree.protected Schedule schedule
requested is
false or true.protected boolean requested
protected boolean reserved
| Constructor Detail |
protected Resource(boolean req,
org.w3c.dom.Document d)
protected Resource(org.w3c.dom.Node resNode,
boolean req,
org.w3c.dom.Document d)
protected Resource(java.lang.String id,
java.lang.String resType,
boolean req,
org.w3c.dom.Document d)
| Method Detail |
public void setSchedule(Schedule s)
s - the new schedule.public Schedule getSchedule()
null if unspecified.public void setID(java.lang.String resID)
resID - the new identifier.public java.lang.String getID()
public boolean isRequested()
true if the requested (buyer). false if provided
(seller).public java.lang.String getType()
public void setType(java.lang.String s)
Strings - the new resource typepublic boolean isReserved()
public void setReserved(boolean b)
protected org.w3c.dom.Node getResIDNode()
throws OCEANDocException
Node named "ResourceID".resourceID.OCEANDocException - if the trade proposal schema is violated
protected org.w3c.dom.Node getSchedNode()
throws OCEANDocException
Node of the availability/reservation
schedule of this construct.Node of this constrct's Schedule.
null if the schedule is null.
protected abstract void buildNode()
throws OCEANDocException
OCEANDocNodebuildNode in class OCEANDocNodeocean.doc.OCEANDocNodeOCEANDocException - if an attempt is made to construct a node tree
that is invalid with respect to the OCEAN trade proposal schemas.public abstract boolean isCompatible(Resource r)
true if the resources are compatible, false otherwise.public abstract int compareTo(java.lang.Object o)
Comparable interface. Implementing this interface allows resources to
be sorted in a list.compareTo in interface java.lang.Comparableprotected void createRoot(java.lang.String rootName)
createRoot in class OCEANDocNoderootName - the new name of the root node.protected void setDocument(org.w3c.dom.Document d)
OCEANDocNodeDocument that is used to create and
modify this construct.setDocument in class OCEANDocNodeocean.doc.OCEANDocNoded - the new Docuemntpublic abstract java.lang.String getResourceInfo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||