|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.greenstone.gs3client.data.NodeData
public abstract class NodeData
Abstract superclass NodeData can represent either a the information in a <classifierNode> (stored in a ClassifierNodeData object) or in a <documentNode> (stored in a DocumentNodeData object).
Field Summary | |
---|---|
boolean |
hasChildren
Since we are setting the descendents lazily (only setting the children each time), we have a little flag to indicate whether this node has any children. |
java.lang.String |
nodeID
The unique nodeID identifying this documentNode or classificationNode |
protected java.util.Map |
nodeMetadata
Map of the metadata (name, value) pairs of this document- or classifier-node |
protected org.w3c.dom.Element |
nodeTag
stores this NodeData's tag element: can be either <documentNode> or <classifierNode> |
Constructor Summary | |
---|---|
NodeData(org.w3c.dom.Element nodeTag)
Constructor that extracts the nodeID value from the given nodeTag: <classifierNode nodeID = "x" /> or <documentNode nodeID = "x" /> |
Method Summary | |
---|---|
abstract NodeData[] |
getChildren()
|
java.util.Map |
getMetadataList()
|
java.lang.String |
getTitle()
|
protected void |
setChildren(java.util.Vector v,
java.util.Map idsToNodes_map)
Called when setting descendents lazily: only the children of this node are set. |
void |
setMetadataList(org.w3c.dom.Element nodeTag)
Sets member metadataList if there is a <metadataList> subelement in docNodeTag: first get the <metadataList> then its <metadata> children |
java.lang.String |
show()
|
java.lang.String |
showMeta()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.lang.String nodeID
public final boolean hasChildren
protected final org.w3c.dom.Element nodeTag
protected java.util.Map nodeMetadata
Constructor Detail |
---|
public NodeData(org.w3c.dom.Element nodeTag)
Method Detail |
---|
public abstract NodeData[] getChildren()
public void setMetadataList(org.w3c.dom.Element nodeTag)
nodeTag
- is a documentNode or classifierNode XML Element that
contains metadata information which is used to set this NodeData object's
metadata (if there are any, the HashMap nodeMetadata will be set).protected void setChildren(java.util.Vector v, java.util.Map idsToNodes_map)
v
- is an empty/non-null Vector which will, at method's end, contain
all the Document- or ClassifierNodeData objects that are children of
this NodeData object.public java.util.Map getMetadataList()
public java.lang.String getTitle()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String show()
public java.lang.String showMeta()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |