Class TinyDocumentImpl

    • Constructor Detail

      • TinyDocumentImpl

        public TinyDocumentImpl​(TinyTree tree)
    • Method Detail

      • getTree

        public TinyTree getTree()
        Get the tree containing this node
        getTree in class TinyNodeImpl
        the TinyTree. Note that this may also contain other unrelated trees
      • getRootNode

        public NodeInfo getRootNode()
        Get the NodeInfo object representing the document node at the root of the tree
        the document node
      • getConfiguration

        public Configuration getConfiguration()
        Get the configuration previously set using setConfiguration
        Specified by:
        getConfiguration in interface NodeInfo
        getConfiguration in class TinyNodeImpl
        the Configuration to which the tree belongs. The default implementation invokes getTreeInfo().getConfiguration().
      • setSystemId

        public void setSystemId​(java.lang.String uri)
        Set the system id of this node
        Specified by:
        setSystemId in interface NodeInfo
        Specified by:
        setSystemId in interface javax.xml.transform.Source
        setSystemId in class TinyNodeImpl
      • getSystemId

        public java.lang.String getSystemId()
        Get the system id of this root node
        Specified by:
        getSystemId in interface Location
        Specified by:
        getSystemId in interface org.xml.sax.Locator
        Specified by:
        getSystemId in interface NodeInfo
        Specified by:
        getSystemId in interface javax.xml.transform.Source
        Specified by:
        getSystemId in interface javax.xml.transform.SourceLocator
        getSystemId in class TinyNodeImpl
        the System Identifier of the entity in the source document containing the node, or null if not known or not applicable.
      • setBaseURI

        public void setBaseURI​(java.lang.String uri)
        Set the base URI of this document node
        uri - the base URI
      • getBaseURI

        public java.lang.String getBaseURI()
        Get the base URI of this root node.
        Specified by:
        getBaseURI in interface NodeInfo
        getBaseURI in class TinyNodeImpl
        the base URI of the node. This may be null if the base URI is unknown, including the case where the node has no parent.
      • getLineNumber

        public int getLineNumber()
        Get the line number of this root node.
        Specified by:
        getLineNumber in interface Location
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        Specified by:
        getLineNumber in interface NodeInfo
        Specified by:
        getLineNumber in interface javax.xml.transform.SourceLocator
        getLineNumber in class TinyNodeImpl
        0 always
      • isTyped

        public boolean isTyped()
        Ask whether the document contains any nodes whose type annotation is anything other than UNTYPED
        true if the document contains elements whose type is other than UNTYPED
      • getNodeKind

        public final int getNodeKind()
        Return the type of node.
        Type.DOCUMENT (always)
        See Also:
      • getRoot

        public NodeInfo getRoot()
        Get the root node
        Specified by:
        getRoot in interface NodeInfo
        getRoot in class TinyNodeImpl
        the NodeInfo that is the root of the tree - not necessarily a document node
      • generateId

        public void generateId​(java.lang.StringBuilder buffer)
        Get a character string that uniquely identifies this node
        Specified by:
        generateId in interface NodeInfo
        generateId in class TinyNodeImpl
        buffer - to contain an identifier based on the document number
      • atomize

        public AtomicSequence atomize()
        Get the typed value.
        the typed value. This will either be a single AtomicValue or a Value whose items are atomic values.
      • getSchemaType

        public SchemaType getSchemaType()
        Get the type annotation of this node, if any. The type annotation is represented as SchemaType object.

        Types derived from a DTD are not reflected in the result of this method.

        Specified by:
        getSchemaType in interface NodeInfo
        getSchemaType in class TinyNodeImpl
        For element and attribute nodes: the type annotation derived from schema validation (defaulting to xs:untyped and xs:untypedAtomic in the absence of schema validation). For comments, text nodes, processing instructions, and namespaces: null. For document nodes, either xs:untyped if the document has not been validated, or xs:anyType if it has.
      • copy

        public void copy​(Receiver out,
                         int copyOptions,
                         Location locationId)
                  throws XPathException
        Copy this node to a given outputter
        out - the Receiver to which the node should be copied. It is the caller's responsibility to ensure that this Receiver is open before the method is called (or that it is self-opening), and that it is closed after use.
        copyOptions - a selection of the options defined in CopyOptions
        locationId - If non-null, identifies the location of the instruction that requested this copy. If null, indicates that the location information is not available
        XPathException - if any downstream error occurs
      • showSize

        public void showSize()
      • hashCode

        public int hashCode()
        The hashCode() method obeys the contract for hashCode(): that is, if two objects are equal (represent the same node) then they must have the same hashCode()
        Specified by:
        hashCode in interface NodeInfo
        hashCode in class TinyNodeImpl
        8.7 Previously, the effect of the equals() and hashCode() methods was not defined. Callers should therefore be aware that third party implementations of the NodeInfo interface may not implement the correct semantics.