Class AbstractNodeInfo

  • All Implemented Interfaces:
    javax.xml.transform.Source, net.sf.saxon.evpull.PullEvent, net.sf.saxon.om.Item, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.SiblingCountingNode, net.sf.saxon.om.ValueRepresentation, net.sf.saxon.om.VirtualNode
    Direct Known Subclasses:
    AttributeNode, DocumentNode, ElementNode

    public class AbstractNodeInfo
    extends java.lang.Object
    implements net.sf.saxon.om.VirtualNode, net.sf.saxon.om.SiblingCountingNode
    This is a basic implementation of the Saxon NodeInfo and related interfaces. Most methods are trivial implementations which immediately throw UnsupportedOperationException. A few of the methods actually have useful implementations, such as iterateAxis(byte, NodeTest) and isSameNodeInfo(NodeInfo).
    • Constructor Detail

      • AbstractNodeInfo

        public AbstractNodeInfo()
    • Method Detail

      • getSystemId

        public java.lang.String getSystemId()
        Specified by:
        getSystemId in interface net.sf.saxon.om.NodeInfo
        Specified by:
        getSystemId in interface javax.xml.transform.Source
      • setSystemId

        public void setSystemId​(java.lang.String systemId)
        Specified by:
        setSystemId in interface javax.xml.transform.Source
      • getStringValue

        public java.lang.String getStringValue()
        Specified by:
        getStringValue in interface net.sf.saxon.om.Item
        Specified by:
        getStringValue in interface net.sf.saxon.om.NodeInfo
        Specified by:
        getStringValue in interface net.sf.saxon.om.ValueRepresentation
      • getStringValueCS

        public java.lang.CharSequence getStringValueCS()
        Specified by:
        getStringValueCS in interface net.sf.saxon.om.Item
        Specified by:
        getStringValueCS in interface net.sf.saxon.om.ValueRepresentation
      • getTypedValue

        public net.sf.saxon.om.SequenceIterator getTypedValue()
                                                       throws net.sf.saxon.trans.XPathException
        Specified by:
        getTypedValue in interface net.sf.saxon.om.Item
        Throws:
        net.sf.saxon.trans.XPathException
      • getUnderlyingNode

        public java.lang.Object getUnderlyingNode()
        Specified by:
        getUnderlyingNode in interface net.sf.saxon.om.VirtualNode
      • getSiblingPosition

        public int getSiblingPosition()
        Specified by:
        getSiblingPosition in interface net.sf.saxon.om.SiblingCountingNode
      • atomize

        public net.sf.saxon.value.Value atomize()
                                         throws net.sf.saxon.trans.XPathException
        Specified by:
        atomize in interface net.sf.saxon.om.NodeInfo
        Throws:
        net.sf.saxon.trans.XPathException
      • compareOrder

        public int compareOrder​(net.sf.saxon.om.NodeInfo other)
        Specified by:
        compareOrder in interface net.sf.saxon.om.NodeInfo
      • copy

        public void copy​(net.sf.saxon.event.Receiver receiver,
                         int whichNamespaces,
                         boolean copyAnnotations,
                         int locationId)
                  throws net.sf.saxon.trans.XPathException
        Specified by:
        copy in interface net.sf.saxon.om.NodeInfo
        Throws:
        net.sf.saxon.trans.XPathException
      • equals

        public boolean equals​(java.lang.Object other)
        This implementation considers to NodeInfo objects to be equal, if their underlying nodes are equal.
        Specified by:
        equals in interface net.sf.saxon.om.NodeInfo
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface net.sf.saxon.om.NodeInfo
        Overrides:
        hashCode in class java.lang.Object
      • generateId

        public void generateId​(net.sf.saxon.om.FastStringBuffer buffer)
        Specified by:
        generateId in interface net.sf.saxon.om.NodeInfo
      • getAttributeValue

        public java.lang.String getAttributeValue​(int fingerprint)
        Specified by:
        getAttributeValue in interface net.sf.saxon.om.NodeInfo
      • getBaseURI

        public java.lang.String getBaseURI()
        Specified by:
        getBaseURI in interface net.sf.saxon.om.NodeInfo
      • getColumnNumber

        public int getColumnNumber()
        Specified by:
        getColumnNumber in interface net.sf.saxon.om.NodeInfo
      • getConfiguration

        public net.sf.saxon.Configuration getConfiguration()
        Specified by:
        getConfiguration in interface net.sf.saxon.om.NodeInfo
      • getDeclaredNamespaces

        public int[] getDeclaredNamespaces​(int[] buffer)
        Specified by:
        getDeclaredNamespaces in interface net.sf.saxon.om.NodeInfo
      • getDisplayName

        public java.lang.String getDisplayName()
        Specified by:
        getDisplayName in interface net.sf.saxon.om.NodeInfo
      • getDocumentNumber

        public int getDocumentNumber()
        This implementation always returns 0.
        Specified by:
        getDocumentNumber in interface net.sf.saxon.om.NodeInfo
      • getDocumentRoot

        public net.sf.saxon.om.DocumentInfo getDocumentRoot()
        Specified by:
        getDocumentRoot in interface net.sf.saxon.om.NodeInfo
      • getFingerprint

        public int getFingerprint()
        Specified by:
        getFingerprint in interface net.sf.saxon.om.NodeInfo
      • getLineNumber

        public int getLineNumber()
        Specified by:
        getLineNumber in interface net.sf.saxon.om.NodeInfo
      • getLocalPart

        public java.lang.String getLocalPart()
        Specified by:
        getLocalPart in interface net.sf.saxon.om.NodeInfo
      • getNameCode

        public int getNameCode()
        Specified by:
        getNameCode in interface net.sf.saxon.om.NodeInfo
      • getNamePool

        public net.sf.saxon.om.NamePool getNamePool()
        Specified by:
        getNamePool in interface net.sf.saxon.om.NodeInfo
      • getNodeKind

        public int getNodeKind()
        Specified by:
        getNodeKind in interface net.sf.saxon.om.NodeInfo
      • getParent

        public net.sf.saxon.om.NodeInfo getParent()
        Specified by:
        getParent in interface net.sf.saxon.om.NodeInfo
      • getPrefix

        public java.lang.String getPrefix()
        Specified by:
        getPrefix in interface net.sf.saxon.om.NodeInfo
      • getRoot

        public net.sf.saxon.om.NodeInfo getRoot()
        Specified by:
        getRoot in interface net.sf.saxon.om.NodeInfo
      • getTypeAnnotation

        public int getTypeAnnotation()
        Specified by:
        getTypeAnnotation in interface net.sf.saxon.om.NodeInfo
      • getURI

        public java.lang.String getURI()
        Specified by:
        getURI in interface net.sf.saxon.om.NodeInfo
      • hasChildNodes

        public boolean hasChildNodes()
        Specified by:
        hasChildNodes in interface net.sf.saxon.om.NodeInfo
      • isId

        public boolean isId()
        Specified by:
        isId in interface net.sf.saxon.om.NodeInfo
      • isIdref

        public boolean isIdref()
        Specified by:
        isIdref in interface net.sf.saxon.om.NodeInfo
      • isNilled

        public boolean isNilled()
        Specified by:
        isNilled in interface net.sf.saxon.om.NodeInfo
      • isSameNodeInfo

        public boolean isSameNodeInfo​(net.sf.saxon.om.NodeInfo other)
        This implementation delegates to equals(Object), per the Saxon documentation's description of this method's behavior.
        Specified by:
        isSameNodeInfo in interface net.sf.saxon.om.NodeInfo
      • iterateAxis

        public net.sf.saxon.om.AxisIterator iterateAxis​(byte axisNumber)
        Specified by:
        iterateAxis in interface net.sf.saxon.om.NodeInfo
      • iterateAxis

        public net.sf.saxon.om.AxisIterator iterateAxis​(byte axisNumber,
                                                        net.sf.saxon.pattern.NodeTest nodeTest)
        This implementation calls iterateAxis(byte) to get an AxisIterator which is then optionally filtered using Navigator.AxisFilter.
        Specified by:
        iterateAxis in interface net.sf.saxon.om.NodeInfo
      • createUnsupportedOperationException

        protected java.lang.UnsupportedOperationException createUnsupportedOperationException​(java.lang.String name)
        Used to create a customized instance of UnsupportedOperationException. The caller of this method is intended to throw the exception.
        Parameters:
        name - Method name that is not supported.
        Returns:
        A UnsupportedOperationException indicated the method is not supported by the implementation class.