|
Data Request Broker 2-3-release |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.gael.drb.query.Environment
public class Environment
Environment of static analysis and dynamic evaluation of an XQuery.
The environment variable is provided to the query engine in input of its processings. The query engine uses the environment as context either during the static analysis or the dynamic evaluation phases.
The environment provides the active namespaces, the default namespace for unprefixed elements, types or functions. The environment also provides the base URI as well as mechanisms to resolve external variables that may be required by the XQuery script to be processed.
The current implementation of the environment does not already support schema definitions, external functions, collations, collections and validation mechanism.
It is important to notice that environment provides information that may be overrided during the different processing phases of the XQuery script. As an example, the default namespace used during the processing may differ from the environment is the XQuery defines explicitely a new one.
| Field Summary | |
|---|---|
static String |
DRB_FUNCTIONS_PREFIX
Prefix for DRB built-in functions drb = "http://www.gael.fr/drb" |
static String |
DRB_FUNCTIONS_URI
Namespace for DRB built-in functions drb = "http://www.gael.fr/drb" |
static String |
GAEL_FUNCTIONS_URI
Namespace for GAEL built-in functions gael = "http://www.gael.fr" |
protected boolean |
isBackwardCompatibilityModeSet
True if the compatibility mode property has been set by the user or deduced from the corresponding system property. |
static String |
MATH_FUNCTIONS_URI
Namespace for Math built-in functions math = "http://exslt.org/math" |
protected ParameterResolver |
resolver
Host the deprecated parameter resolver. |
static String |
XPATH_FUNCTIONS_URI
Namespace for XPath built-in functions fn = "http://www.w3.org/2005/xpath-functions" |
static String |
XQT_ERRORS_PREFIX
Prefix for XPath and XQuery error codes and messages err = "http://www.w3.org/2005/xqt-errors" |
static String |
XQT_ERRORS_URI
Namespace for XPath and XQuery error codes and messages err = "http://www.w3.org/2005/xqt-errors" |
static String |
XQUERY_LOCAL_FUNCTIONS_URI
Namespace for XPath and XQuery error codes and messages local = "http://www.w3.org/2005/xquery-local-functions" |
| Constructor Summary | |
|---|---|
Environment()
Environment constructor. |
|
| Method Summary | |
|---|---|
protected void |
addExternalVariable(ExternalVariable variable)
Add external variables. |
boolean |
containsExternalVariable(fr.gael.drb.query.QName name)
Check if an external variable is declared. |
boolean |
containsExternalVariable(String name)
Check if an external variable is declared. |
String |
getBaseURI()
Returns the base URI of the enviroment. |
String |
getDefaultElementNamespaceURI()
Returns the default namespace URI of elements and types. |
String |
getDefaultFunctionNamespaceURI()
Returns the default namespace URI of functions. |
ExternalVariable |
getExternalVariable(fr.gael.drb.query.QName name)
Return an external variable if already declared. |
ExternalVariable |
getExternalVariable(String name)
Return an external variable if already declared. |
protected Map<fr.gael.drb.query.QName,ExternalVariable> |
getExternalVariableMap()
Return a reference to the external variable list. |
ExternalVariable[] |
getExternalVariables()
Returns the set of external variables. |
Namespace |
getNamespace()
Returns the namespace of the environment. |
boolean |
isBackwardCompatibilityMode()
True denotes whether static and dynamic evaluations should attempt to support depreciated syntaxes, expressions or behaviors. |
fr.gael.drb.query.QName |
resolveQName(String name)
Returns a qualified name from its string form. |
fr.gael.drb.query.QName |
resolveQName(String name,
String default_namespace)
Returns a qualified name from its string form. |
void |
setBackwardCompatibilityMode(boolean isBackwardCompatibilityMode)
True denotes whether static and dynamic evaluations should attempt to support depreciated syntaxes, expressions or behaviors. |
void |
setBaseURI(String base_uri)
Set the base URI of the environment. |
void |
setDefaultElementNamespaceURI(String namespace_uri)
Set the default namespace URI for elements and types. |
void |
setDefaultFunctionNamespaceURI(String namespace_uri)
Set the default namespace URI for functions. |
protected void |
setExternalVariableMap(Map<fr.gael.drb.query.QName,ExternalVariable> variable_list)
Set a new external variable list. |
void |
setNamespace(Namespace namespace)
Set the namespace provided in parameter. |
String |
toString()
Returns relevant information of the environment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String XPATH_FUNCTIONS_URI
public static final String XQT_ERRORS_PREFIX
public static final String XQT_ERRORS_URI
public static final String XQUERY_LOCAL_FUNCTIONS_URI
public static final String DRB_FUNCTIONS_PREFIX
public static final String GAEL_FUNCTIONS_URI
public static final String DRB_FUNCTIONS_URI
public static final String MATH_FUNCTIONS_URI
protected ParameterResolver resolver
protected boolean isBackwardCompatibilityModeSet
| Constructor Detail |
|---|
public Environment()
The following default namespaces are inserted:
| xml | http://www.w3.org/XML/1998/namespace |
| fn | http://www.w3.org/2005/xpath-functions |
| xs | http://www.w3.org/2001/XMLSchema |
| xsi | http://www.w3.org/2001/XMLSchema-instance |
| xdt | http://www.w3.org/2003/11/xpath-datatypes |
| local | http://www.w3.org/2005/xquery-local-functions |
| drb | http://www.gael.fr/drb |
| math | http://exslt.org/math |
| gael | http://www.gael.fr |
| esa | http://www.esa.int |
| Method Detail |
|---|
public Namespace getNamespace()
public fr.gael.drb.query.QName resolveQName(String name)
public fr.gael.drb.query.QName resolveQName(String name,
String default_namespace)
public void setNamespace(Namespace namespace)
namespace - the namespace to be considered.public String getDefaultElementNamespaceURI()
public void setDefaultElementNamespaceURI(String namespace_uri)
namespace_uri - the new default namespace URI to consider.public String getDefaultFunctionNamespaceURI()
public void setDefaultFunctionNamespaceURI(String namespace_uri)
namespace_uri - the new default namespace URI to consider.public String getBaseURI()
public void setBaseURI(String base_uri)
base_uri - the new base URI to consider.protected void addExternalVariable(ExternalVariable variable)
variable - the external variable to be added.protected void setExternalVariableMap(Map<fr.gael.drb.query.QName,ExternalVariable> variable_list)
variable_list - new list of external variables.protected Map<fr.gael.drb.query.QName,ExternalVariable> getExternalVariableMap()
public ExternalVariable getExternalVariable(String name)
name - the string form of the variable qualified name.
public ExternalVariable getExternalVariable(fr.gael.drb.query.QName name)
name - the variable qualified name.
public ExternalVariable[] getExternalVariables()
public boolean containsExternalVariable(String name)
name - string form of the qualified name of the external variable.
public boolean containsExternalVariable(fr.gael.drb.query.QName name)
name - string form of the qualified name of the external variable.
public void setBackwardCompatibilityMode(boolean isBackwardCompatibilityMode)
isBackwardCompatibilityMode - the mode to set.public boolean isBackwardCompatibilityMode()
This mode does not guarantee that all previous behaviors could be emulated and in particular for more than one backward software version. Callers should not rely on this mode but only for very short periods when the latest version is required but efforts to adapt the software to all incompatible improvements is too heavy, or in equivalent situation.
The default value is false, unless an explicit user call to the
setBackwardCompatibilityMode(boolean) method with a true
parameter or a 'true' value of the system property
fr.gael.drb.query.BackwardCompatibilityMode.
setBackwardCompatibilityMode(boolean)public String toString()
toString in class Object
|
Data Request Broker - DRB API® 2-3-release |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||