Java Doc for WalkerFactory.java in  » XML » xalan » org » apache » xpath » axes » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xpath.axes 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xpath.axes.WalkerFactory

WalkerFactory
public class WalkerFactory (Code)
This class is both a factory for XPath location path expressions, which are built from the opcode map output, and an analysis engine for the location path expressions in order to provide optimization hints.


Field Summary
final public static  intBITMASK_TRAVERSES_OUTSIDE_SUBTREE
     If any of these bits are on, the expression may likely traverse outside the given subtree.
final public static  intBITS_COUNT
     First 8 bits are the number of top-level location steps.
final public static  intBITS_RESERVED
     4 bits are reserved for future use.
final public static  intBIT_ANCESTOR
     Bit is on if any of the walkers contain an ancestor step.
final public static  intBIT_ANCESTOR_OR_SELF
     Bit is on if any of the walkers contain an ancestor-or-self step.
final public static  intBIT_ANY_DESCENDANT_FROM_ROOT
    
final public static  intBIT_ATTRIBUTE
     Bit is on if any of the walkers contain an attribute step.
final public static  intBIT_BACKWARDS_SELF
     Bit is on if any of the walkers can go backwards in document order from the context node.
final public static  intBIT_CHILD
     Bit is on if any of the walkers contain a child step.
final public static  intBIT_DESCENDANT
     Bit is on if any of the walkers contain a descendant step.
final public static  intBIT_DESCENDANT_OR_SELF
     Bit is on if any of the walkers contain a descendant-or-self step.
final public static  intBIT_FILTER
     Bit is on if any of the walkers contain a filter (i.e.
final public static  intBIT_FOLLOWING
     Bit is on if any of the walkers contain a following step.
final public static  intBIT_FOLLOWING_SIBLING
     Bit is on if any of the walkers contain a following-sibiling step.
final public static  intBIT_MATCH_PATTERN
     Bit is on if the expression is a match pattern.
final public static  intBIT_NAMESPACE
     Bit is on if any of the walkers contain a namespace step.
final public static  intBIT_NODETEST_ANY
     Bit is on if any of the walkers contain an node() test.
final public static  intBIT_PARENT
     Bit is on if any of the walkers contain a parent step.
final public static  intBIT_PRECEDING
     Bit is on if any of the walkers contain a preceding step.
final public static  intBIT_PRECEDING_SIBLING
     Bit is on if any of the walkers contain a preceding-sibling step.
final public static  intBIT_PREDICATE
     Bit is on if the expression contains a top-level predicate.
final public static  intBIT_ROOT
     Bit is on if any of the walkers contain a root step.
final public static  intBIT_SELF
     Bit is on if any of the walkers contain a self step.
final static  booleanDEBUG_ITERATOR_CREATION
    
final static  booleanDEBUG_PATTERN_CREATION
    
final static  booleanDEBUG_WALKER_CREATION
    


Method Summary
static  booleananalyzePredicate(Compiler compiler, int opPos, int stepType)
     Analyze a step and give information about it's predicates.
public static  booleancanCrissCross(int analysis)
    
public static  booleancanSkipSubtrees(int analysis)
    
public static  voiddiagnoseIterator(String name, int analysis, Compiler compiler)
    
static  booleanfunctionProximateOrContainsProximate(Compiler compiler, int opPos)
    
public static  intgetAnalysisBitFromAxes(int axis)
     Get a corresponding BIT_XXX from an axis.
Parameters:
  axis - One of Axis.ANCESTOR, etc.
public static  StringgetAnalysisString(int analysis)
    
public static  intgetAxisFromStep(Compiler compiler, int stepOpCodePos)
     Special purpose function to see if we can optimize the pattern for a DescendantIterator.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step.
public static  intgetStepCount(int analysis)
    
public static  booleanhasPredicate(int analysis)
    
public static  booleanisAbsolute(int analysis)
    
public static  booleanisDownwardAxisOfMany(int axis)
     Tell if the given axis goes downword.
public static  booleanisNaturalDocOrder(int analysis)
     Tell if the pattern can be 'walked' with the iteration steps in natural document order, without duplicates.
Parameters:
  analysis - The general analysis of the pattern.
public static  booleanisOneStep(int analysis)
    
static  booleanisProximateInnerExpr(Compiler compiler, int opPos)
    
public static  booleanisSet(int analysis, int bits)
    
public static  booleanisWild(int analysis)
    
static  AxesWalkerloadOneWalker(WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
     This method is for building an array of possible levels where the target element(s) could be found for a match.
Parameters:
  lpi - The owning location path iterator.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step.
static  StepPatternloadSteps(MatchPatternIterator mpi, Compiler compiler, int stepOpCodePos, int stepIndex)
     Read a LocationPath as a generalized match pattern.
static  AxesWalkerloadWalkers(WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
     This method is for building an array of possible levels where the target element(s) could be found for a match.
Parameters:
  lpi - The owning location path iterator object.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step.
Parameters:
  stepIndex - The top-level step index withing the iterator.
public static  booleanmightBeProximate(Compiler compiler, int opPos, int stepType)
     Tell if the predicates need to have proximity knowledge.
public static  DTMIteratornewDTMIterator(Compiler compiler, int opPos, boolean isTopLevel)
     Create a new LocPathIterator iterator.
public static  booleanwalksAncestors(int analysis)
    
public static  booleanwalksAttributes(int analysis)
    
public static  booleanwalksChildren(int analysis)
    
public static  booleanwalksChildrenAndExtraAndSelfOnly(int analysis)
    
public static  booleanwalksChildrenOnly(int analysis)
    
public static  booleanwalksDescendants(int analysis)
    
public static  booleanwalksDescendantsAndExtraAndSelfOnly(int analysis)
    
public static  booleanwalksDownExtraOnly(int analysis)
    
public static  booleanwalksDownOnly(int analysis)
    
public static  booleanwalksExtraNodes(int analysis)
    
public static  booleanwalksExtraNodesOnly(int analysis)
    
public static  booleanwalksFilteredList(int analysis)
    
public static  booleanwalksFollowingOnlyMaybeAbsolute(int analysis)
    
public static  booleanwalksInDocOrder(int analysis)
    
public static  booleanwalksNamespaces(int analysis)
    
public static  booleanwalksSelfOnly(int analysis)
    
public static  booleanwalksSideways(int analysis)
    
public static  booleanwalksSubtree(int analysis)
    
public static  booleanwalksSubtreeOnly(int analysis)
    
public static  booleanwalksSubtreeOnlyFromRootOrContext(int analysis)
    
public static  booleanwalksSubtreeOnlyMaybeAbsolute(int analysis)
    
public static  booleanwalksUp(int analysis)
    
public static  booleanwalksUpOnly(int analysis)
    

Field Detail
BITMASK_TRAVERSES_OUTSIDE_SUBTREE
final public static int BITMASK_TRAVERSES_OUTSIDE_SUBTREE(Code)
If any of these bits are on, the expression may likely traverse outside the given subtree.



BITS_COUNT
final public static int BITS_COUNT(Code)
First 8 bits are the number of top-level location steps. Hopefully there will never be more that 255 location steps!!!



BITS_RESERVED
final public static int BITS_RESERVED(Code)
4 bits are reserved for future use.



BIT_ANCESTOR
final public static int BIT_ANCESTOR(Code)
Bit is on if any of the walkers contain an ancestor step.



BIT_ANCESTOR_OR_SELF
final public static int BIT_ANCESTOR_OR_SELF(Code)
Bit is on if any of the walkers contain an ancestor-or-self step.



BIT_ANY_DESCENDANT_FROM_ROOT
final public static int BIT_ANY_DESCENDANT_FROM_ROOT(Code)
Found "//foo" pattern



BIT_ATTRIBUTE
final public static int BIT_ATTRIBUTE(Code)
Bit is on if any of the walkers contain an attribute step.



BIT_BACKWARDS_SELF
final public static int BIT_BACKWARDS_SELF(Code)
Bit is on if any of the walkers can go backwards in document order from the context node.



BIT_CHILD
final public static int BIT_CHILD(Code)
Bit is on if any of the walkers contain a child step.



BIT_DESCENDANT
final public static int BIT_DESCENDANT(Code)
Bit is on if any of the walkers contain a descendant step.



BIT_DESCENDANT_OR_SELF
final public static int BIT_DESCENDANT_OR_SELF(Code)
Bit is on if any of the walkers contain a descendant-or-self step.



BIT_FILTER
final public static int BIT_FILTER(Code)
Bit is on if any of the walkers contain a filter (i.e. id(), extension function, etc.) step.



BIT_FOLLOWING
final public static int BIT_FOLLOWING(Code)
Bit is on if any of the walkers contain a following step.



BIT_FOLLOWING_SIBLING
final public static int BIT_FOLLOWING_SIBLING(Code)
Bit is on if any of the walkers contain a following-sibiling step.



BIT_MATCH_PATTERN
final public static int BIT_MATCH_PATTERN(Code)
Bit is on if the expression is a match pattern.



BIT_NAMESPACE
final public static int BIT_NAMESPACE(Code)
Bit is on if any of the walkers contain a namespace step.



BIT_NODETEST_ANY
final public static int BIT_NODETEST_ANY(Code)
Bit is on if any of the walkers contain an node() test. This is really only useful if the count is 1.



BIT_PARENT
final public static int BIT_PARENT(Code)
Bit is on if any of the walkers contain a parent step.



BIT_PRECEDING
final public static int BIT_PRECEDING(Code)
Bit is on if any of the walkers contain a preceding step.



BIT_PRECEDING_SIBLING
final public static int BIT_PRECEDING_SIBLING(Code)
Bit is on if any of the walkers contain a preceding-sibling step.



BIT_PREDICATE
final public static int BIT_PREDICATE(Code)
Bit is on if the expression contains a top-level predicate.



BIT_ROOT
final public static int BIT_ROOT(Code)
Bit is on if any of the walkers contain a root step.



BIT_SELF
final public static int BIT_SELF(Code)
Bit is on if any of the walkers contain a self step.



DEBUG_ITERATOR_CREATION
final static boolean DEBUG_ITERATOR_CREATION(Code)
Set to true for diagnostics about iterator creation



DEBUG_PATTERN_CREATION
final static boolean DEBUG_PATTERN_CREATION(Code)
Set to true for diagnostics about walker creation



DEBUG_WALKER_CREATION
final static boolean DEBUG_WALKER_CREATION(Code)
Set to true for diagnostics about walker creation





Method Detail
analyzePredicate
static boolean analyzePredicate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException(Code)
Analyze a step and give information about it's predicates. Right now this just returns true or false if the step has a predicate.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  opPos - The opcode position for the step.
Parameters:
  stepType - The type of step, one of OP_GROUP, etc. true if step has a predicate.
throws:
  javax.xml.transform.TransformerException -



canCrissCross
public static boolean canCrissCross(int analysis)(Code)



canSkipSubtrees
public static boolean canSkipSubtrees(int analysis)(Code)



diagnoseIterator
public static void diagnoseIterator(String name, int analysis, Compiler compiler)(Code)



functionProximateOrContainsProximate
static boolean functionProximateOrContainsProximate(Compiler compiler, int opPos)(Code)



getAnalysisBitFromAxes
public static int getAnalysisBitFromAxes(int axis)(Code)
Get a corresponding BIT_XXX from an axis.
Parameters:
  axis - One of Axis.ANCESTOR, etc. One of BIT_ANCESTOR, etc.



getAnalysisString
public static String getAnalysisString(int analysis)(Code)



getAxisFromStep
public static int getAxisFromStep(Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException(Code)
Special purpose function to see if we can optimize the pattern for a DescendantIterator.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step. 32 bits as an integer that give information about the locationpath as a whole.
throws:
  javax.xml.transform.TransformerException -



getStepCount
public static int getStepCount(int analysis)(Code)



hasPredicate
public static boolean hasPredicate(int analysis)(Code)



isAbsolute
public static boolean isAbsolute(int analysis)(Code)



isDownwardAxisOfMany
public static boolean isDownwardAxisOfMany(int axis)(Code)
Tell if the given axis goes downword. Bogus name, if you can think of a better one, please do tell. This really has to do with inverting attribute axis.
Parameters:
  axis - One of Axis.XXX. true if the axis is not a child axis and does not go up from the axis root.



isNaturalDocOrder
public static boolean isNaturalDocOrder(int analysis)(Code)
Tell if the pattern can be 'walked' with the iteration steps in natural document order, without duplicates.
Parameters:
  analysis - The general analysis of the pattern. true if the walk can be done in natural order.
throws:
  javax.xml.transform.TransformerException -



isOneStep
public static boolean isOneStep(int analysis)(Code)



isProximateInnerExpr
static boolean isProximateInnerExpr(Compiler compiler, int opPos)(Code)



isSet
public static boolean isSet(int analysis, int bits)(Code)



isWild
public static boolean isWild(int analysis)(Code)



loadOneWalker
static AxesWalker loadOneWalker(WalkingIterator lpi, Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException(Code)
This method is for building an array of possible levels where the target element(s) could be found for a match.
Parameters:
  lpi - The owning location path iterator.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step. non-null AxesWalker derivative.
throws:
  javax.xml.transform.TransformerException -



loadSteps
static StepPattern loadSteps(MatchPatternIterator mpi, Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException(Code)
Read a LocationPath as a generalized match pattern. What this means is that the LocationPath is read backwards, as a test on a given node, to see if it matches the criteria of the selection, and ends up at the context node. Essentially, this is a backwards query from a given node, to find the context node.

So, the selection "foo/daz[2]" is, in non-abreviated expanded syntax, "self::node()/following-sibling::foo/child::daz[position()=2]". Taking this as a match pattern for a probable node, it works out to "self::daz/parent::foo[child::daz[position()=2 and isPrevStepNode()] precedingSibling::node()[isContextNodeOfLocationPath()]", adding magic isPrevStepNode and isContextNodeOfLocationPath operations. Predicates in the location path have to be executed by the following step, because they have to know the context of their execution.
Parameters:
  mpi - The MatchPatternIterator to which the steps will be attached.
Parameters:
  compiler - The compiler that holds the syntax tree/op map toconstruct from.
Parameters:
  stepOpCodePos - The current op code position within the opmap.
Parameters:
  stepIndex - The top-level step index withing the iterator. A StepPattern object, which may contain relative StepPatterns.
throws:
  javax.xml.transform.TransformerException -




loadWalkers
static AxesWalker loadWalkers(WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException(Code)
This method is for building an array of possible levels where the target element(s) could be found for a match.
Parameters:
  lpi - The owning location path iterator object.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  stepOpCodePos - The opcode position for the step.
Parameters:
  stepIndex - The top-level step index withing the iterator. non-null AxesWalker derivative.
throws:
  javax.xml.transform.TransformerException -



mightBeProximate
public static boolean mightBeProximate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException(Code)
Tell if the predicates need to have proximity knowledge.



newDTMIterator
public static DTMIterator newDTMIterator(Compiler compiler, int opPos, boolean isTopLevel) throws javax.xml.transform.TransformerException(Code)
Create a new LocPathIterator iterator. The exact type of iterator returned is based on an analysis of the XPath operations.
Parameters:
  compiler - non-null reference to compiler object that has processedthe XPath operations into an opcode map.
Parameters:
  opPos - The position of the operation code for this itterator. non-null reference to a LocPathIterator or derivative.
throws:
  javax.xml.transform.TransformerException -



walksAncestors
public static boolean walksAncestors(int analysis)(Code)



walksAttributes
public static boolean walksAttributes(int analysis)(Code)



walksChildren
public static boolean walksChildren(int analysis)(Code)



walksChildrenAndExtraAndSelfOnly
public static boolean walksChildrenAndExtraAndSelfOnly(int analysis)(Code)



walksChildrenOnly
public static boolean walksChildrenOnly(int analysis)(Code)



walksDescendants
public static boolean walksDescendants(int analysis)(Code)



walksDescendantsAndExtraAndSelfOnly
public static boolean walksDescendantsAndExtraAndSelfOnly(int analysis)(Code)



walksDownExtraOnly
public static boolean walksDownExtraOnly(int analysis)(Code)



walksDownOnly
public static boolean walksDownOnly(int analysis)(Code)



walksExtraNodes
public static boolean walksExtraNodes(int analysis)(Code)



walksExtraNodesOnly
public static boolean walksExtraNodesOnly(int analysis)(Code)



walksFilteredList
public static boolean walksFilteredList(int analysis)(Code)



walksFollowingOnlyMaybeAbsolute
public static boolean walksFollowingOnlyMaybeAbsolute(int analysis)(Code)



walksInDocOrder
public static boolean walksInDocOrder(int analysis)(Code)



walksNamespaces
public static boolean walksNamespaces(int analysis)(Code)



walksSelfOnly
public static boolean walksSelfOnly(int analysis)(Code)



walksSideways
public static boolean walksSideways(int analysis)(Code)



walksSubtree
public static boolean walksSubtree(int analysis)(Code)



walksSubtreeOnly
public static boolean walksSubtreeOnly(int analysis)(Code)



walksSubtreeOnlyFromRootOrContext
public static boolean walksSubtreeOnlyFromRootOrContext(int analysis)(Code)



walksSubtreeOnlyMaybeAbsolute
public static boolean walksSubtreeOnlyMaybeAbsolute(int analysis)(Code)



walksUp
public static boolean walksUp(int analysis)(Code)



walksUpOnly
public static boolean walksUpOnly(int analysis)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.