com.supermap.services
Interface Node
-
public interface NodeThe node interface.
The middle storage to convert the OGC object in SuperMap iServer to the XML document, to store the object node information with the tree structure.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringROOT_NODE_NAMERoot node name The default is "#document".
-
Method Summary
Methods Modifier and Type Method and Description voidappendAttribute(Node attribute)Add the property of the node.NodeappendChild(Node node)Add sub node.NodegetAttribute(int index)Get the node property according to the index.intgetAttributeCount()Get the number of the node properties.java.lang.StringgetName()Gets the node name.NodegetNode(int index)Get the sub node according to the index of the sub node.intgetNodeCount()Get the number of the sub nodes.java.lang.StringgetValue()Gets the node value.voidsetName(java.lang.String name)Sets the node name.voidsetValue(java.lang.String value)Sets the node value.java.lang.StringtoString()Convert the node to string.voidwriteToStream(java.io.OutputStream outputStream)Output the node to output stream.
-
-
-
Field Detail
-
ROOT_NODE_NAME
static final java.lang.String ROOT_NODE_NAME
Root node name The default is "#document".- See Also:
- Constant Field Values
-
-
Method Detail
-
appendChild
Node appendChild(Node node)
Add sub node.- Parameters:
node- the sub node to add.- Returns:
- the added child node.
-
appendAttribute
void appendAttribute(Node attribute)
Add the property of the node.- Parameters:
attribute- the property of the node (Represented with Node, name means its property name, value means the property value).
-
getName
java.lang.String getName()
Gets the node name.- Returns:
- the node name.
-
setName
void setName(java.lang.String name)
Sets the node name.- Parameters:
name- the node name.
-
getValue
java.lang.String getValue()
Gets the node value.- Returns:
- the node value.
-
setValue
void setValue(java.lang.String value)
Sets the node value.- Parameters:
value- the node value.
-
getNode
Node getNode(int index)
Get the sub node according to the index of the sub node.- Parameters:
index- the index of the sub node.- Returns:
- the node.
-
getAttribute
Node getAttribute(int index)
Get the node property according to the index.- Parameters:
index- the index of the property.- Returns:
- the node property.
-
getNodeCount
int getNodeCount()
Get the number of the sub nodes.- Returns:
- the number of the sub nodes.
-
getAttributeCount
int getAttributeCount()
Get the number of the node properties.- Returns:
- the number of the node properties.
-
toString
java.lang.String toString()
Convert the node to string.The expression way of XML document.
- Overrides:
toStringin classjava.lang.Object- Returns:
- string.
-
writeToStream
void writeToStream(java.io.OutputStream outputStream) throws java.io.IOExceptionOutput the node to output stream.- Parameters:
outputStream- the output stream.- Throws:
java.io.IOException- it occurs the exception information if there is I/O error.
-
-