Java Doc for Compiler.java in  » Library » Apache-commons-jxpath-1.2-src » org » apache » commons » jxpath » ri » 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 » Library » Apache commons jxpath 1.2 src » org.apache.commons.jxpath.ri 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.jxpath.ri.Compiler

Compiler
public interface Compiler (Code)
The Compiler APIs are completely agnostic to the actual types of objects produced and consumed by the APIs. Arguments and return values are declared as java.lang.Object.

Since objects returned by Compiler methods are passed as arguments to other Compiler methods, the descriptions of these methods use virtual types. There are four virtual object types: EXPRESSION, QNAME, STEP and NODE_TEST.

The following example illustrates this notion. This sequence compiles the xpath "foo[round(1 div 2)]/text()":

 Object qname1 = compiler.qname(null, "foo")
 Object expr1 = compiler.number("1");
 Object expr2 = compiler.number("2");
 Object expr3 = compiler.div(expr1, expr2);
 Object expr4 = compiler.
 coreFunction(Compiler.FUNCTION_ROUND, new Object[]{expr3});
 Object test1 = compiler.nodeNameTest(qname1);
 Object step1 = compiler.
 step(Compiler.AXIS_CHILD, test1, new Object[]{expr4});
 Object test2 = compiler.nodeTypeTest(Compiler.NODE_TYPE_TEXT);
 Object step2 = compiler.nodeTypeTest(Compiler.AXIS_CHILD, test2, null);
 Object expr5 = compiler.locationPath(false, new Object[]{step1, step2});
 

author:
   Dmitri Plotnikov
version:
   $Revision: 1.9 $ $Date: 2004/02/29 14:17:45 $


Field Summary
final public static  intAXIS_ANCESTOR
    
final public static  intAXIS_ANCESTOR_OR_SELF
    
final public static  intAXIS_ATTRIBUTE
    
final public static  intAXIS_CHILD
    
final public static  intAXIS_DESCENDANT
    
final public static  intAXIS_DESCENDANT_OR_SELF
    
final public static  intAXIS_FOLLOWING
    
final public static  intAXIS_FOLLOWING_SIBLING
    
final public static  intAXIS_NAMESPACE
    
final public static  intAXIS_PARENT
    
final public static  intAXIS_PRECEDING
    
final public static  intAXIS_PRECEDING_SIBLING
    
final public static  intAXIS_SELF
    
final public static  intFUNCTION_BOOLEAN
    
final public static  intFUNCTION_CEILING
    
final public static  intFUNCTION_CONCAT
    
final public static  intFUNCTION_CONTAINS
    
final public static  intFUNCTION_COUNT
    
final public static  intFUNCTION_FALSE
    
final public static  intFUNCTION_FLOOR
    
final public static  intFUNCTION_FORMAT_NUMBER
    
final public static  intFUNCTION_ID
    
final public static  intFUNCTION_KEY
    
final public static  intFUNCTION_LANG
    
final public static  intFUNCTION_LAST
    
final public static  intFUNCTION_LOCAL_NAME
    
final public static  intFUNCTION_NAME
    
final public static  intFUNCTION_NAMESPACE_URI
    
final public static  intFUNCTION_NORMALIZE_SPACE
    
final public static  intFUNCTION_NOT
    
final public static  intFUNCTION_NULL
    
final public static  intFUNCTION_NUMBER
    
final public static  intFUNCTION_POSITION
    
final public static  intFUNCTION_ROUND
    
final public static  intFUNCTION_STARTS_WITH
    
final public static  intFUNCTION_STRING
    
final public static  intFUNCTION_STRING_LENGTH
    
final public static  intFUNCTION_SUBSTRING
    
final public static  intFUNCTION_SUBSTRING_AFTER
    
final public static  intFUNCTION_SUBSTRING_BEFORE
    
final public static  intFUNCTION_SUM
    
final public static  intFUNCTION_TRANSLATE
    
final public static  intFUNCTION_TRUE
    
final public static  intNODE_TYPE_COMMENT
    
final public static  intNODE_TYPE_NODE
    
final public static  intNODE_TYPE_PI
    
final public static  intNODE_TYPE_TEXT
    


Method Summary
 Objectand(Object arguments)
    
 Objectdivide(Object left, Object right)
    
 Objectequal(Object left, Object right)
    
 ObjectexpressionPath(Object expression, Object[] predicates, Object[] steps)
    
 Objectfunction(int code, Object[] args)
     Produces an EXPRESSION object representing the computation of a core function with the supplied arguments.
Parameters:
  code - is one of FUNCTION_...
 Objectfunction(Object name, Object[] args)
     Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.
 ObjectgreaterThan(Object left, Object right)
    
 ObjectgreaterThanOrEqual(Object left, Object right)
    
 ObjectlessThan(Object left, Object right)
    
 ObjectlessThanOrEqual(Object left, Object right)
    
 Objectliteral(String value)
     Produces an EXPRESSION object that represents a string constant.
 ObjectlocationPath(boolean absolute, Object[] steps)
    
 Objectminus(Object left, Object right)
    
 Objectminus(Object argument)
    
 Objectmod(Object left, Object right)
    
 Objectmultiply(Object left, Object right)
    
 ObjectnodeNameTest(Object qname)
     Produces a NODE_TEST object that represents a node name test.
 ObjectnodeTypeTest(int nodeType)
     Produces a NODE_TEST object that represents a node type test.
 ObjectnotEqual(Object left, Object right)
    
 Objectnumber(String value)
     Produces an EXPRESSION object that represents a numeric constant.
 Objector(Object arguments)
    
 ObjectprocessingInstructionTest(String instruction)
     Produces a NODE_TEST object that represents a processing instruction test.
 Objectqname(String prefix, String name)
     Produces an QNAME that represents a name with an optional prefix.
 Objectstep(int axis, Object nodeTest, Object[] predicates)
     Produces a STEP object that represents a node test.
Parameters:
  axis - is one of the AXIS_...
 Objectsum(Object[] arguments)
    
 Objectunion(Object[] arguments)
    
 ObjectvariableReference(Object qName)
    

Field Detail
AXIS_ANCESTOR
final public static int AXIS_ANCESTOR(Code)



AXIS_ANCESTOR_OR_SELF
final public static int AXIS_ANCESTOR_OR_SELF(Code)



AXIS_ATTRIBUTE
final public static int AXIS_ATTRIBUTE(Code)



AXIS_CHILD
final public static int AXIS_CHILD(Code)



AXIS_DESCENDANT
final public static int AXIS_DESCENDANT(Code)



AXIS_DESCENDANT_OR_SELF
final public static int AXIS_DESCENDANT_OR_SELF(Code)



AXIS_FOLLOWING
final public static int AXIS_FOLLOWING(Code)



AXIS_FOLLOWING_SIBLING
final public static int AXIS_FOLLOWING_SIBLING(Code)



AXIS_NAMESPACE
final public static int AXIS_NAMESPACE(Code)



AXIS_PARENT
final public static int AXIS_PARENT(Code)



AXIS_PRECEDING
final public static int AXIS_PRECEDING(Code)



AXIS_PRECEDING_SIBLING
final public static int AXIS_PRECEDING_SIBLING(Code)



AXIS_SELF
final public static int AXIS_SELF(Code)



FUNCTION_BOOLEAN
final public static int FUNCTION_BOOLEAN(Code)



FUNCTION_CEILING
final public static int FUNCTION_CEILING(Code)



FUNCTION_CONCAT
final public static int FUNCTION_CONCAT(Code)



FUNCTION_CONTAINS
final public static int FUNCTION_CONTAINS(Code)



FUNCTION_COUNT
final public static int FUNCTION_COUNT(Code)



FUNCTION_FALSE
final public static int FUNCTION_FALSE(Code)



FUNCTION_FLOOR
final public static int FUNCTION_FLOOR(Code)



FUNCTION_FORMAT_NUMBER
final public static int FUNCTION_FORMAT_NUMBER(Code)



FUNCTION_ID
final public static int FUNCTION_ID(Code)



FUNCTION_KEY
final public static int FUNCTION_KEY(Code)



FUNCTION_LANG
final public static int FUNCTION_LANG(Code)



FUNCTION_LAST
final public static int FUNCTION_LAST(Code)



FUNCTION_LOCAL_NAME
final public static int FUNCTION_LOCAL_NAME(Code)



FUNCTION_NAME
final public static int FUNCTION_NAME(Code)



FUNCTION_NAMESPACE_URI
final public static int FUNCTION_NAMESPACE_URI(Code)



FUNCTION_NORMALIZE_SPACE
final public static int FUNCTION_NORMALIZE_SPACE(Code)



FUNCTION_NOT
final public static int FUNCTION_NOT(Code)



FUNCTION_NULL
final public static int FUNCTION_NULL(Code)



FUNCTION_NUMBER
final public static int FUNCTION_NUMBER(Code)



FUNCTION_POSITION
final public static int FUNCTION_POSITION(Code)



FUNCTION_ROUND
final public static int FUNCTION_ROUND(Code)



FUNCTION_STARTS_WITH
final public static int FUNCTION_STARTS_WITH(Code)



FUNCTION_STRING
final public static int FUNCTION_STRING(Code)



FUNCTION_STRING_LENGTH
final public static int FUNCTION_STRING_LENGTH(Code)



FUNCTION_SUBSTRING
final public static int FUNCTION_SUBSTRING(Code)



FUNCTION_SUBSTRING_AFTER
final public static int FUNCTION_SUBSTRING_AFTER(Code)



FUNCTION_SUBSTRING_BEFORE
final public static int FUNCTION_SUBSTRING_BEFORE(Code)



FUNCTION_SUM
final public static int FUNCTION_SUM(Code)



FUNCTION_TRANSLATE
final public static int FUNCTION_TRANSLATE(Code)



FUNCTION_TRUE
final public static int FUNCTION_TRUE(Code)



NODE_TYPE_COMMENT
final public static int NODE_TYPE_COMMENT(Code)



NODE_TYPE_NODE
final public static int NODE_TYPE_NODE(Code)



NODE_TYPE_PI
final public static int NODE_TYPE_PI(Code)



NODE_TYPE_TEXT
final public static int NODE_TYPE_TEXT(Code)





Method Detail
and
Object and(Object arguments)(Code)
Produces an EXPRESSION object representing logical conjunction of all arguments
Parameters:
  arguments - are EXPRESSION objects



divide
Object divide(Object left, Object right)(Code)
Produces an EXPRESSION object representing left divided by right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



equal
Object equal(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left equals to right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



expressionPath
Object expressionPath(Object expression, Object[] predicates, Object[] steps)(Code)
Produces an EXPRESSION object representing a filter expression
Parameters:
  expression - is an EXPRESSION object
Parameters:
  predicates - are EXPRESSION objects
Parameters:
  steps - are STEP objects



function
Object function(int code, Object[] args)(Code)
Produces an EXPRESSION object representing the computation of a core function with the supplied arguments.
Parameters:
  code - is one of FUNCTION_... constants
Parameters:
  args - are EXPRESSION objects



function
Object function(Object name, Object[] args)(Code)
Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.
Parameters:
  name - is a QNAME object (function name)
Parameters:
  args - are EXPRESSION objects



greaterThan
Object greaterThan(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left greater than right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



greaterThanOrEqual
Object greaterThanOrEqual(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left greater than or equal to right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



lessThan
Object lessThan(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left less than right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



lessThanOrEqual
Object lessThanOrEqual(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left less than or equal to right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



literal
Object literal(String value)(Code)
Produces an EXPRESSION object that represents a string constant.



locationPath
Object locationPath(boolean absolute, Object[] steps)(Code)
Produces an EXPRESSION object representing a location path
Parameters:
  absolute - indicates whether the path is absolute
Parameters:
  steps - are STEP objects



minus
Object minus(Object left, Object right)(Code)
Produces an EXPRESSION object representing left minus right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



minus
Object minus(Object argument)(Code)
Produces an EXPRESSION object representing unary negation of the argument
Parameters:
  argument - is an EXPRESSION object



mod
Object mod(Object left, Object right)(Code)
Produces an EXPRESSION object representing left modulo right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



multiply
Object multiply(Object left, Object right)(Code)
Produces an EXPRESSION object representing left multiplied by right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



nodeNameTest
Object nodeNameTest(Object qname)(Code)
Produces a NODE_TEST object that represents a node name test.
Parameters:
  qname - is a QNAME object



nodeTypeTest
Object nodeTypeTest(int nodeType)(Code)
Produces a NODE_TEST object that represents a node type test.
Parameters:
  qname - is a QNAME object



notEqual
Object notEqual(Object left, Object right)(Code)
Produces an EXPRESSION object representing the comparison: left is not equal to right
Parameters:
  left - is an EXPRESSION object
Parameters:
  right - is an EXPRESSION object



number
Object number(String value)(Code)
Produces an EXPRESSION object that represents a numeric constant.



or
Object or(Object arguments)(Code)
Produces an EXPRESSION object representing logical disjunction of all arguments
Parameters:
  arguments - are EXPRESSION objects



processingInstructionTest
Object processingInstructionTest(String instruction)(Code)
Produces a NODE_TEST object that represents a processing instruction test.
Parameters:
  qname - is a QNAME object



qname
Object qname(String prefix, String name)(Code)
Produces an QNAME that represents a name with an optional prefix.



step
Object step(int axis, Object nodeTest, Object[] predicates)(Code)
Produces a STEP object that represents a node test.
Parameters:
  axis - is one of the AXIS_... constants
Parameters:
  nodeTest - is a NODE_TEST object
Parameters:
  predicates - are EXPRESSION objects



sum
Object sum(Object[] arguments)(Code)
Produces an EXPRESSION object representing the sum of all argumens
Parameters:
  arguments - are EXPRESSION objects



union
Object union(Object[] arguments)(Code)
Produces an EXPRESSION object representing union of all node sets
Parameters:
  arguments - are EXPRESSION objects



variableReference
Object variableReference(Object qName)(Code)
Produces an EXPRESSION object representing variable reference
Parameters:
  qname - is a QNAME object



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