Java Doc for QueryParser.java in  » XML » saxonb » net » sf » saxon » query » 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 » saxonb » net.sf.saxon.query 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.expr.ExpressionParser
      net.sf.saxon.query.QueryParser

QueryParser
class QueryParser extends ExpressionParser (Code)
This class defines extensions to the XPath parser to handle the additional syntax supported in XQuery


Field Summary
protected  Executableexecutable
    
public  SetimportedModules
    
 ListmoduleImports
    
 ListnamespacesToBeSealed
    
 ListschemaImports
    

Constructor Summary
protected  QueryParser()
    

Method Summary
public  voidapplyModuleImport(Import mImport)
    
public  ExecutablegetExecutable()
     Get the executable containing this expression.
protected  StringgetLanguage()
    
protected  voidgrumble(String message, String errorCode)
    
public static  ExpressionmakeStringJoin(Expression exp, StaticContext env)
     Make a string-join expression that concatenates the string-values of items in a sequence with intervening spaces.
protected  StringValuemakeStringLiteral(String token)
     Method to make a string literal from a token identified as a string literal.
public  XQueryExpressionmakeXQueryExpression(String query, StaticQueryContext staticContext, Configuration config)
    
protected  ExpressionparseConstructor()
     Parse a node constructor.
protected  ExpressionparseExtensionExpression()
     Parse an Extension Expression. Syntax: "(#" QName arbitrary-text "#)")+ "{" expr? "}" Currenly Saxon does not recognize any extension expressions, so the pragma is ignored and the following expression is returned.
protected  ExpressionparseForExpression()
     Parse a FLWOR expression.
final public  voidparseLibraryModule(String queryString, StaticQueryContext env)
     Parse a library module. Prolog? Expression
Parameters:
  queryString - The text of the library module.
Parameters:
  env - The static context.
protected  ExpressionparseTypeswitchExpression()
     Parse a Typeswitch Expression.
protected  ExpressionparseValidateExpression()
     Parse a Validate Expression. This construct is XQuery-only.
public  ExpressionsetDefaultValue(String exp)
     Parse the expression (inside a string literal) used to define default values for external variables.
public  voidsetExecutable(Executable exec)
    

Field Detail
executable
protected Executable executable(Code)



importedModules
public Set importedModules(Code)



moduleImports
List moduleImports(Code)



namespacesToBeSealed
List namespacesToBeSealed(Code)



schemaImports
List schemaImports(Code)




Constructor Detail
QueryParser
protected QueryParser()(Code)
Protected Constructor: this class should be instantiated via the StaticQueryContext




Method Detail
applyModuleImport
public void applyModuleImport(Import mImport) throws StaticError(Code)



getExecutable
public Executable getExecutable()(Code)
Get the executable containing this expression.



getLanguage
protected String getLanguage()(Code)
Get the current language (XPath or XQuery)



grumble
protected void grumble(String message, String errorCode) throws StaticError(Code)
Report a static error
Parameters:
  message - the error message
throws:
  net.sf.saxon.trans.StaticError - always thrown: an exception containing thesupplied message



makeStringJoin
public static Expression makeStringJoin(Expression exp, StaticContext env)(Code)
Make a string-join expression that concatenates the string-values of items in a sequence with intervening spaces. This may be simplified later as a result of type-checking.



makeStringLiteral
protected StringValue makeStringLiteral(String token) throws StaticError(Code)
Method to make a string literal from a token identified as a string literal. This is trivial in XPath, but in XQuery the method is overridden to identify pseudo-XML character and entity references
Parameters:
  token - The string value of the string literal, after dereferencing entity andcharacter references



makeXQueryExpression
public XQueryExpression makeXQueryExpression(String query, StaticQueryContext staticContext, Configuration config) throws XPathException(Code)
Create an XQueryExpression



parseConstructor
protected Expression parseConstructor() throws StaticError(Code)
Parse a node constructor. This is allowed only in XQuery. This method handles both the XML-like "direct" constructors, and the XQuery-based "computed" constructors. an Expression for evaluating the parsed constructor
throws:
  net.sf.saxon.trans.StaticError - in the event of a syntax error.



parseExtensionExpression
protected Expression parseExtensionExpression() throws StaticError(Code)
Parse an Extension Expression. Syntax: "(#" QName arbitrary-text "#)")+ "{" expr? "}" Currenly Saxon does not recognize any extension expressions, so the pragma is ignored and the following expression is returned. (We don't even check the QName)



parseForExpression
protected Expression parseForExpression() throws StaticError(Code)
Parse a FLWOR expression. This replaces the XPath "for" expression. Full syntax:

[41] FLWORExpr ::= (ForClause | LetClause)+ WhereClause? OrderByClause? "return" ExprSingle [42] ForClause ::= <"for" "$"> VarName TypeDeclaration? PositionalVar? "in" ExprSingle ("," "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle)* [43] PositionalVar ::= "at" "$" VarName [44] LetClause ::= <"let" "$"> VarName TypeDeclaration? ":=" ExprSingle ("," "$" VarName TypeDeclaration? ":=" ExprSingle)* [45] WhereClause ::= "where" Expr [46] OrderByClause ::= (<"order" "by"> | <"stable" "order" "by">) OrderSpecList [47] OrderSpecList ::= OrderSpec ("," OrderSpec)* [48] OrderSpec ::= ExprSingle OrderModifier [49] OrderModifier ::= ("ascending" | "descending")? (<"empty" "greatest"> | <"empty" "least">)? ("collation" StringLiteral)?

the resulting subexpression
throws:
  net.sf.saxon.trans.StaticError - if any error is encountered



parseLibraryModule
final public void parseLibraryModule(String queryString, StaticQueryContext env) throws StaticError(Code)
Parse a library module. Prolog? Expression
Parameters:
  queryString - The text of the library module.
Parameters:
  env - The static context. The result of parsinga library module is that the static context is populated with a set of functiondeclarations and variable declarations. Each library module must have its ownstatic context objext.
throws:
  net.sf.saxon.trans.StaticError - if the expression contains a syntax error



parseTypeswitchExpression
protected Expression parseTypeswitchExpression() throws StaticError(Code)
Parse a Typeswitch Expression. This construct is XQuery-only. TypeswitchExpr ::= "typeswitch" "(" Expr ")" CaseClause+ "default" ("$" VarName)? "return" ExprSingle CaseClause ::= "case" ("$" VarName "as")? SequenceType "return" Expr



parseValidateExpression
protected Expression parseValidateExpression() throws StaticError(Code)
Parse a Validate Expression. This construct is XQuery-only. The syntax allows: validate mode? { Expr } mode ::= "strict" | "lax"



setDefaultValue
public Expression setDefaultValue(String exp)(Code)
Parse the expression (inside a string literal) used to define default values for external variables. This requires instantiating a nested XPath parser.



setExecutable
public void setExecutable(Executable exec)(Code)
Set the executable used for this query expression



Fields inherited from net.sf.saxon.expr.ExpressionParser
final protected static int SEQUENCE_TYPE(Code)(Java Doc)
final protected static int XPATH(Code)(Java Doc)
final protected static int XQUERY(Code)(Java Doc)
final protected static int XSLT_PATTERN(Code)(Java Doc)
protected StaticContext env(Code)(Java Doc)
protected int language(Code)(Java Doc)
protected NameChecker nameChecker(Code)(Java Doc)
protected Stack rangeVariables(Code)(Java Doc)
protected boolean scanOnly(Code)(Java Doc)
protected Tokenizer t(Code)(Java Doc)

Methods inherited from net.sf.saxon.expr.ExpressionParser
protected String currentTokenDisplay()(Code)(Java Doc)
protected void declareRangeVariable(VariableDeclaration declaration) throws StaticError(Code)(Java Doc)
protected void expect(int token) throws StaticError(Code)(Java Doc)
protected String getLanguage()(Code)(Java Doc)
public Stack getRangeVariableStack()(Code)(Java Doc)
public Tokenizer getTokenizer()(Code)(Java Doc)
protected void grumble(String message) throws StaticError(Code)(Java Doc)
protected void grumble(String message, String errorCode) throws StaticError(Code)(Java Doc)
protected boolean isKeyword(String s)(Code)(Java Doc)
public LocalNameTest makeLocalNameTest(short nodeType, String localName) throws StaticError(Code)(Java Doc)
final public int makeNameCode(String qname, boolean useDefault) throws StaticError(Code)(Java Doc)
public NameTest makeNameTest(short nodeType, String qname, boolean useDefault) throws StaticError(Code)(Java Doc)
public NamespaceTest makeNamespaceTest(short nodeType, String prefix) throws StaticError(Code)(Java Doc)
protected StringValue makeStringLiteral(String currentTokenValue) throws StaticError(Code)(Java Doc)
protected Expression makeTracer(int startOffset, Expression exp, int construct, int objectNameCode)(Code)(Java Doc)
protected void nextToken() throws StaticError(Code)(Java Doc)
public Expression parse(String expression, int start, int terminator, int lineNumber, StaticContext env) throws StaticError(Code)(Java Doc)
protected Expression parseConstructor() throws StaticError(Code)(Java Doc)
protected Expression parseExprSingle() throws StaticError(Code)(Java Doc)
protected Expression parseExpression() throws StaticError(Code)(Java Doc)
protected Expression parseExtensionExpression() throws StaticError(Code)(Java Doc)
protected Expression parseForExpression() throws StaticError(Code)(Java Doc)
protected Expression parseMappingExpression() throws StaticError(Code)(Java Doc)
protected NodeTest parseNodeTest(short nodeType) throws StaticError(Code)(Java Doc)
public Pattern parsePattern(String pattern, StaticContext env) throws StaticError(Code)(Java Doc)
protected Expression parseRelativePath() throws StaticError(Code)(Java Doc)
protected Expression parseRemainingPath(Expression start) throws StaticError(Code)(Java Doc)
public SequenceType parseSequenceType(String input, StaticContext env) throws StaticError(Code)(Java Doc)
protected SequenceType parseSequenceType() throws StaticError(Code)(Java Doc)
protected Expression parseStepExpression() throws StaticError(Code)(Java Doc)
protected Expression parseTypeswitchExpression() throws StaticError(Code)(Java Doc)
protected Expression parseValidateExpression() throws StaticError(Code)(Java Doc)
protected void setLocation(Expression exp)(Code)(Java Doc)
protected void setLocation(Expression exp, int offset)(Code)(Java Doc)
public void setRangeVariableStack(Stack stack)(Code)(Java Doc)
public void setScanOnly(boolean scanOnly)(Code)(Java Doc)
protected void undeclareRangeVariable()(Code)(Java Doc)
protected void warning(String message) throws StaticError(Code)(Java Doc)

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.