Class DocumentTypeNode

  • All Implemented Interfaces:
    ExpressionNode

    public class DocumentTypeNode
    extends Object
    implements ExpressionNode
    A document type node which returns the document type if exactly the type sopecified or false otherwise: For using the exact document type as a condition.
    Author:
    bratseth
    • Constructor Detail

      • DocumentTypeNode

        public DocumentTypeNode​(String type)
    • Method Detail

      • getType

        public String getType()
      • evaluate

        public Object evaluate​(Context context)
        Description copied from interface: ExpressionNode
        Evaluate the content of this node based on document object, and return that value.
        Specified by:
        evaluate in interface ExpressionNode
        Parameters:
        context - the document to evaluate over
        Returns:
        the value of this
      • accept

        public void accept​(Visitor visitor)
        Description copied from interface: ExpressionNode
        Perform visitation of this node.
        Specified by:
        accept in interface ExpressionNode
        Parameters:
        visitor - the visitor that wishes to visit the node