Class Pattern

java.lang.Object
org.jaxen.pattern.Pattern
Direct Known Subclasses:
LocationPathPattern, NodeTest, UnionPattern

public abstract class Pattern extends Object
Deprecated.
will be removed in Jaxen 2.0

Pattern defines the behaviour for pattern in the XSLT processing model.

Version:
$Revision$
Author:
James Strachan
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    Deprecated.
    Matches any node
    static final short
    Deprecated.
    Matches attribute nodes
    static final short
    Deprecated.
    Matches CDATA section nodes
    static final short
    Deprecated.
    Matches comment nodes
    static final short
    Deprecated.
    Matches document nodes
    static final short
    Deprecated.
    Matches DocumentType nodes
    static final short
    Deprecated.
    Matches Element nodes
    static final short
    Deprecated.
    Matches entity reference nodes
    static final short
    Deprecated.
    The maximum number of node types for sizing purposes
    static final short
    Deprecated.
    Matches a Namespace Node
    static final short
    Deprecated.
    Matches no nodes
    static final short
    Deprecated.
    Matches ProcessingInstruction
    static final short
    Deprecated.
    Matches text nodes
    static final short
    Deprecated.
    Does not match any valid node
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    For patterns which only match an ATTRIBUTE_NODE or an ELEMENT_NODE then this pattern may return the name of the element or attribute it matches.
    short
    Deprecated.
    Returns the type of node the pattern matches.
    double
    Deprecated.
    Returns the default resolution policy of the pattern according to the XSLT conflict resolution rules.
    abstract String
    Deprecated.
    Returns a textual representation of this pattern
    Deprecated.
    If this pattern is a union pattern then this method should return an array of patterns which describe the union pattern, which should contain more than one pattern.
    abstract boolean
    matches(Object node, Context context)
    Deprecated.
     
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ELEMENT_NODE

      public static final short ELEMENT_NODE
      Deprecated.
      Matches Element nodes
      See Also:
    • ATTRIBUTE_NODE

      public static final short ATTRIBUTE_NODE
      Deprecated.
      Matches attribute nodes
      See Also:
    • TEXT_NODE

      public static final short TEXT_NODE
      Deprecated.
      Matches text nodes
      See Also:
    • CDATA_SECTION_NODE

      public static final short CDATA_SECTION_NODE
      Deprecated.
      Matches CDATA section nodes
      See Also:
    • ENTITY_REFERENCE_NODE

      public static final short ENTITY_REFERENCE_NODE
      Deprecated.
      Matches entity reference nodes
      See Also:
    • PROCESSING_INSTRUCTION_NODE

      public static final short PROCESSING_INSTRUCTION_NODE
      Deprecated.
      Matches ProcessingInstruction
      See Also:
    • COMMENT_NODE

      public static final short COMMENT_NODE
      Deprecated.
      Matches comment nodes
      See Also:
    • DOCUMENT_NODE

      public static final short DOCUMENT_NODE
      Deprecated.
      Matches document nodes
      See Also:
    • DOCUMENT_TYPE_NODE

      public static final short DOCUMENT_TYPE_NODE
      Deprecated.
      Matches DocumentType nodes
      See Also:
    • NAMESPACE_NODE

      public static final short NAMESPACE_NODE
      Deprecated.
      Matches a Namespace Node
      See Also:
    • UNKNOWN_NODE

      public static final short UNKNOWN_NODE
      Deprecated.
      Does not match any valid node
      See Also:
    • MAX_NODE_TYPE

      public static final short MAX_NODE_TYPE
      Deprecated.
      The maximum number of node types for sizing purposes
      See Also:
    • ANY_NODE

      public static final short ANY_NODE
      Deprecated.
      Matches any node
      See Also:
    • NO_NODE

      public static final short NO_NODE
      Deprecated.
      Matches no nodes
      See Also:
  • Constructor Details

    • Pattern

      public Pattern()
      Deprecated.
  • Method Details

    • matches

      public abstract boolean matches(Object node, Context context) throws JaxenException
      Deprecated.
      Parameters:
      node - ????
      context - ????
      Returns:
      true if the pattern matches the given node
      Throws:
      JaxenException - if ????
    • getPriority

      public double getPriority()
      Deprecated.
      Returns the default resolution policy of the pattern according to the XSLT conflict resolution rules.
      Returns:
      0.5; the default priority defined in XSLT
      See Also:
    • getUnionPatterns

      public Pattern[] getUnionPatterns()
      Deprecated.
      If this pattern is a union pattern then this method should return an array of patterns which describe the union pattern, which should contain more than one pattern. Otherwise this method should return null.
      Returns:
      an array of the patterns which make up this union pattern or null if this pattern is not a union pattern
    • getMatchType

      public short getMatchType()
      Deprecated.
      Returns the type of node the pattern matches.
      Returns:
      ANY_NODE unless overridden
    • getMatchesNodeName

      public String getMatchesNodeName()
      Deprecated.
      For patterns which only match an ATTRIBUTE_NODE or an ELEMENT_NODE then this pattern may return the name of the element or attribute it matches. This allows a more efficient rule matching algorithm to be performed, rather than a brute force approach of evaluating every pattern for a given Node.
      Returns:
      the name of the element or attribute this pattern matches or null if this pattern matches any or more than one name
    • simplify

      public Pattern simplify()
      Deprecated.
    • getText

      public abstract String getText()
      Deprecated.
      Returns a textual representation of this pattern
      Returns:
      the usual string form of this XSLT pattern