Class Step


  • public class Step
    extends java.lang.Object

    Represents a 'step' in an SPath expression.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean depthUnlimited  
      private java.lang.String localPart  
      private java.lang.String name  
      private java.util.List predicates  
      private java.lang.String uri  
    • Constructor Summary

      Constructors 
      Constructor Description
      Step​(boolean depthUnlimited, java.lang.String name, java.util.List predicates)
      Constructs a new Step object, given a name and a (possibly null) list of predicates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the Step's node name.
      java.util.List getPredicates()
      Returns a list of this Step object's predicates.
      boolean isDepthUnlimited()
      Returns true if the Step's depth is unlimited, false otherwise.
      boolean isMatchingName​(java.lang.String uri, java.lang.String localPart)
      Returns true if the given name matches the Step object's name, taking into account the Step object's wildcards; returns false otherwise.
      private java.lang.String mapPrefix​(java.lang.String prefix)
      Returns a URI for the given prefix, given our mappings.
      private void parseStepName()
      Lazily computes some information about our name.
      • Methods inherited from class java.lang.Object

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

      • depthUnlimited

        private boolean depthUnlimited
      • name

        private java.lang.String name
      • predicates

        private java.util.List predicates
      • uri

        private java.lang.String uri
      • localPart

        private java.lang.String localPart
    • Constructor Detail

      • Step

        public Step​(boolean depthUnlimited,
                    java.lang.String name,
                    java.util.List predicates)
        Constructs a new Step object, given a name and a (possibly null) list of predicates. A boolean is also passed, indicating whether this particular Step is relative to the 'descendent-or-self' axis of the node courrently under consideration. If true, it is; if false, then this Step is rooted as a direct child of the node under consideration.
    • Method Detail

      • isMatchingName

        public boolean isMatchingName​(java.lang.String uri,
                                      java.lang.String localPart)
        Returns true if the given name matches the Step object's name, taking into account the Step object's wildcards; returns false otherwise.
      • isDepthUnlimited

        public boolean isDepthUnlimited()
        Returns true if the Step's depth is unlimited, false otherwise.
      • getName

        public java.lang.String getName()
        Returns the Step's node name.
      • getPredicates

        public java.util.List getPredicates()
        Returns a list of this Step object's predicates.
      • parseStepName

        private void parseStepName()
        Lazily computes some information about our name.
      • mapPrefix

        private java.lang.String mapPrefix​(java.lang.String prefix)
        Returns a URI for the given prefix, given our mappings.