com.supermap.services

Interface Node



  • public interface Node
    

    The 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.String ROOT_NODE_NAME
      Root node name The default is "#document".
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void appendAttribute(Node attribute)
      Add the property of the node.
      Node appendChild(Node node)
      Add sub node.
      Node getAttribute(int index)
      Get the node property according to the index.
      int getAttributeCount()
      Get the number of the node properties.
      java.lang.String getName()
      Gets the node name.
      Node getNode(int index)
      Get the sub node according to the index of the sub node.
      int getNodeCount()
      Get the number of the sub nodes.
      java.lang.String getValue()
      Gets the node value.
      void setName(java.lang.String name)
      Sets the node name.
      void setValue(java.lang.String value)
      Sets the node value.
      java.lang.String toString()
      Convert the node to string.
      void writeToStream(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:
        toString in class java.lang.Object
        Returns:
        string.
      • writeToStream

        void writeToStream(java.io.OutputStream outputStream)
                           throws java.io.IOException
        
        Output 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.