Class JNodePattern

All Implemented Interfaces:
ExportAgent, Locatable, IdentityComparable, Traceable

public class JNodePattern extends Pattern
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(Item item, XPathContext context) throws XPathException
      Description copied from class: Pattern
      Determine whether this Pattern matches the given item. This should be called via matchesItem() to get the XSLT-defined error handling behaviour.

      The method, where required, sets current() to the node being tested.

      Specified by:
      matches in class Pattern
      Parameters:
      item - The item to be tested against the Pattern
      context - The dynamic context.
      Returns:
      true if the node matches the Pattern, false otherwise
      Throws:
      XPathException - if an error occurs while matching the pattern
    • getUType

      public UType getUType()
      Description copied from class: Pattern
      Get a UType indicating which kinds of items this Pattern can match.
      Specified by:
      getUType in class Pattern
      Returns:
      a UType indicating all the primitive types of item that the pattern can match.
    • getItemType

      public ItemType getItemType()
      Description copied from class: Pattern
      Get an ItemType that all the items matching this pattern must satisfy
      Specified by:
      getItemType in class Pattern
      Returns:
      an ItemType, as specific as possible, which all the matching items satisfy
    • export

      public void export(ExpressionPresenter presenter) throws XPathException
      Description copied from class: Expression
      Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.
      Specified by:
      export in interface ExportAgent
      Specified by:
      export in class Pattern
      Parameters:
      presenter - the expression presenter used to display the structure
      Throws:
      XPathException - if the export fails, for example if an expression is found that won't work in the target environment.
    • getDefaultPriority

      public double getDefaultPriority()
      Description copied from class: Pattern
      Determine the default priority to use if this pattern appears as a match pattern for a template with no explicit priority attribute. Note that the default priority of a pattern
      Overrides:
      getDefaultPriority in class Pattern
      Returns:
      the default priority for the pattern
    • copy

      public Pattern copy(RebindingMap rebindings)
      Description copied from class: Expression
      Copy an expression. This makes a deep copy.
      Specified by:
      copy in class Pattern
      Parameters:
      rebindings - a mutable list of (old binding, new binding) pairs that is used to update the bindings held in any local variable references that are copied.
      Returns:
      the copy of the original expression