Class TypeStrippedDocument

  • All Implemented Interfaces:
    Source, TreeInfo

    public class TypeStrippedDocument
    extends GenericTreeInfo
    A TypeStrippedDocument represents a view of a real Document in which all nodes are untyped
    • Field Detail

      • underlyingTree

        TreeInfo underlyingTree
    • Constructor Detail

      • TypeStrippedDocument

        public TypeStrippedDocument​(TreeInfo doc)
        Create a type-stripped view of a document
        Parameters:
        doc - the underlying document
    • Method Detail

      • isTyped

        public boolean isTyped()
        Ask whether the document contains any nodes whose type annotation is anything other than UNTYPED
        Specified by:
        isTyped in interface TreeInfo
        Overrides:
        isTyped in class GenericTreeInfo
        Returns:
        true if the document contains elements whose type is other than UNTYPED
      • selectID

        public NodeInfo selectID​(String id,
                                 boolean getParent)
        Get the element with a given ID, if any
        Specified by:
        selectID in interface TreeInfo
        Overrides:
        selectID in class GenericTreeInfo
        Parameters:
        id - the required ID value
        getParent -
        Returns:
        the element with the given ID value, or null if there is none.