|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xml_project.morganaxquery.StaticXQueryContext
public class StaticXQueryContext
The static context of a query (XPath or XQuery).
| Nested Class Summary | |
|---|---|
static class |
StaticXQueryContext.Modes
The constructions modes. |
static class |
StaticXQueryContext.OrderingModes
The ordering modes. |
| Constructor Summary | |
|---|---|
StaticXQueryContext(com.xml_project.morganaxquery.configuration.XQueryConfiguration config,
com.xml_project.morganaxquery.CompilerCommons.CompilerMode mode)
Creates a new static query context. |
|
| Method Summary | |
|---|---|
void |
addModule(com.xml_project.morganaxquery.XQueryModule module)
Adds a module to the static context. |
void |
declareInscopeVariable(com.xml_project.morganaxquery.internal.VariableDeclaration decl)
Declares an inscope variable. |
boolean |
dependsOnContextItem()
|
protected void |
dumpVariables()
Dumps. |
XS_AnyURI |
getBaseURI()
Returns the baseURI of this query. |
StaticXQueryContext.Modes |
getBoundarySpacePolicy()
Returns the Boundary Space Policy. |
com.xml_project.morganaxquery.configuration.Collation |
getCollation(java.lang.String collationURI)
Returns the collation with the given uri. |
com.xml_project.morganaxquery.configuration.XQueryConfiguration |
getConfiguration()
Return the configuration for this static context. |
StaticXQueryContext.Modes |
getConstructionMode()
Returns the construction mode. |
java.lang.String |
getDefaultCollation()
Return the default collation |
java.lang.String |
getDefaultElementNamespace()
Return the default element namespace. |
java.lang.String |
getDefaultFunctionNamespace()
Return the default function namespace. |
boolean |
getDefaultOrderForEmptySequences()
Returns the value for empty order declaration. |
java.lang.String |
getEncoding()
Return the used encoding. |
XPathFunction |
getFunction(javax.xml.namespace.QName fnName,
int arity)
Returns the function with the given name and arity from either default library or installed modules. |
boolean |
getInheritNamespaceInCopy()
Return the current value for inherit namespace. |
java.lang.Object |
getInscopeElementDeclaration(javax.xml.namespace.QName name)
Returns an inscope element declaration. |
java.lang.Class<? extends XS_AnyType> |
getInscopeSchemaType(javax.xml.namespace.QName name)
Return an inscope schema type. |
java.util.List<com.xml_project.morganaxquery.internal.VariableDeclaration> |
getInscopeVariables()
Returns all declare inscope variables. |
com.xml_project.morganaxquery.XQueryModule |
getModule(java.lang.String namespace)
Gets a module from the static context. |
StaticXQueryContext.OrderingModes |
getOrderingMode()
Return the ordering mode. |
boolean |
getPreserveNamespaceInCopy()
Return the current value for preserve namespace. |
java.util.Set<javax.xml.namespace.QName> |
getReferencedVariables()
Returns the variable names used in this XPath- / XQuery-expression |
com.xml_project.morganaxquery.internal.NamespaceList |
getStaticallyKnownNamespaces()
Returns a list of statically known namespaces. |
void |
markContextItemDependency()
|
void |
markVariable(javax.xml.namespace.QName name)
Marks usage of a variable name for analytic purposes |
void |
setBaseURI(XS_AnyURI uri)
Sets the base uri of this query. |
void |
setBoundarySpacePolicy(StaticXQueryContext.Modes newMode)
Sets the boundary whitespace policy. |
void |
setConstructionMode(StaticXQueryContext.Modes newMode)
Sets the construction mode. |
void |
setCopyNamespaces(boolean preserve,
boolean inherit)
Sets the policy for namespace when copying elements. |
void |
setDefaultCollation(java.lang.String uri)
Sets the default collation |
void |
setDefaultFunctionNamespace(java.lang.String uri)
Sets the default function namespace. |
void |
setDefaultOrderForEmptySequences(boolean emptyFirst)
Sets the rule for sorting with empty sequences. |
void |
setEncoding(java.lang.String newEncoding)
Sets encoding |
void |
setOrderingMode(StaticXQueryContext.OrderingModes newMode)
Sets the ordering mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticXQueryContext(com.xml_project.morganaxquery.configuration.XQueryConfiguration config,
com.xml_project.morganaxquery.CompilerCommons.CompilerMode mode)
config - the configuration.mode - the compiler mode.| Method Detail |
|---|
public void addModule(com.xml_project.morganaxquery.XQueryModule module)
module - the modulepublic com.xml_project.morganaxquery.XQueryModule getModule(java.lang.String namespace)
namespace - the namespace for the module to get.
public XS_AnyURI getBaseURI()
public StaticXQueryContext.Modes getBoundarySpacePolicy()
public com.xml_project.morganaxquery.configuration.Collation getCollation(java.lang.String collationURI)
throws XPathException
collationURI - the uri of the collaction to return.
XPathException - thrown, if the uri is defective or the collation is not supported.public com.xml_project.morganaxquery.configuration.XQueryConfiguration getConfiguration()
public boolean getDefaultOrderForEmptySequences()
public java.lang.String getDefaultCollation()
public java.lang.String getDefaultElementNamespace()
public java.lang.String getDefaultFunctionNamespace()
public java.util.Set<javax.xml.namespace.QName> getReferencedVariables()
public com.xml_project.morganaxquery.internal.NamespaceList getStaticallyKnownNamespaces()
public java.lang.String getEncoding()
public StaticXQueryContext.Modes getConstructionMode()
public StaticXQueryContext.OrderingModes getOrderingMode()
public void setBaseURI(XS_AnyURI uri)
throws XPathException
uri - the base uri.
XPathExceptionpublic void markVariable(javax.xml.namespace.QName name)
name - the name of the used variablepublic void setBoundarySpacePolicy(StaticXQueryContext.Modes newMode)
newMode - the boundary whitespace policy.public void setConstructionMode(StaticXQueryContext.Modes newMode)
newMode - the construction mode to use.public java.lang.Class<? extends XS_AnyType> getInscopeSchemaType(javax.xml.namespace.QName name)
name - the inscope schema type.
public java.lang.Object getInscopeElementDeclaration(javax.xml.namespace.QName name)
name - the name of the inscope element declation.
public boolean getPreserveNamespaceInCopy()
public boolean getInheritNamespaceInCopy()
public void setDefaultCollation(java.lang.String uri)
throws XPathException
uri - the uri of the default collation.
XPathException - thrown, if the uri is defective or the collation is unknown/unsupported.
public void setCopyNamespaces(boolean preserve,
boolean inherit)
preserve - value for preserve.inherit - value for inherit.
public void setDefaultFunctionNamespace(java.lang.String uri)
throws XPathException
uri - the uri of the default function namespace.
XPathException - thrown, if the uri is not allowed as default function namespace.public void setDefaultOrderForEmptySequences(boolean emptyFirst)
emptyFirst - the new rule.public void setEncoding(java.lang.String newEncoding)
newEncoding - the encoding to use.
public XPathFunction getFunction(javax.xml.namespace.QName fnName,
int arity)
throws XPathException
fnName - the name of the function.arity - the arity of the function.
XPathException - thrown, if the function can not be found in the default library, but should be there.public void setOrderingMode(StaticXQueryContext.OrderingModes newMode)
newMode - the new ordering mode to use.public boolean dependsOnContextItem()
public void markContextItemDependency()
public void declareInscopeVariable(com.xml_project.morganaxquery.internal.VariableDeclaration decl)
decl - the declaration.public java.util.List<com.xml_project.morganaxquery.internal.VariableDeclaration> getInscopeVariables()
protected void dumpVariables()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||