| java.lang.Object gnu.expr.Language gnu.xquery.lang.XQuery
All known Subclasses: gnu.kawa.xslt.XSLT,
XQuery | public class XQuery extends Language (Code) | | The XQuery language.
|
Constructor Summary | |
public | XQuery() |
Method Summary | |
public void | applyWithFocus(Procedure proc, Object item, int position, int size, Consumer out) Call a procedure with a given focus (context). | public Object | applyWithFocus(Procedure proc, Object item, int position, int size) Call a procedure with a given focus (context). | public void | applyWithFocus(Procedure proc, Object values, Consumer out) Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. | public Object | applyWithFocus(Procedure proc, Object values) Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. | public void | applyWithFocus$X(Procedure proc, Object values, CallContext ctx) Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. | public static char | asChar(Object x) | public static gnu.math.Numeric | asNumber(Object arg) | public void | define(String name, Object value) | protected void | define_method(String name, String cname, String mname) | public Procedure | evalToFocusProc(String expr) Parse an XQuery expression that is the body of a procedure. | public Procedure | evalToFocusProc(Reader in, SourceMessages messages) Parse an XQuery expression from a Reader that is the body of a procedure. | public void | evalWithFocus(Reader in, SourceMessages messages, Object values, Consumer out) Evaluate an expression with each item in a sequence as the context item. | public Object | evalWithFocus(String expr, Object values) Evaluate an expression with each item in a sequence as the context item. | public Object | evalWithFocus(String expr, Object item, int position, int size) Evaluate an expression with a given focus (context). | public void | evalWithFocus(Reader in, SourceMessages messages, Object item, int position, int size, Consumer out) Evaluate an expression with a given focus (context). | public void | eval_with_focus$X(String expr, Object values, CallContext ctx) Evaluate an expression with a given focus (context). | public void | eval_with_focus$X(String expr, Object item, int position, int size, CallContext ctx) Evaluate an expression with a given focus (context). | public String | formatType(Type type) | public Compilation | getCompilation(Lexer lexer, SourceMessages messages) | public static Object | getExternal(Symbol name, Object type) | public static XQuery | getInstance() | public gnu.text.Lexer | getLexer(InPort inp, SourceMessages messages) | public String | getName() | public int | getNamespaceOf(Declaration decl) | public Consumer | getOutputConsumer(java.io.Writer out) | public Procedure | getPrompter() | public static Type | getStandardType(String name) | public Symbol | getSymbol(String name) | public Type | getTypeFor(String name) | public Type | getTypeFor(Class clas) | public boolean | hasNamespace(Declaration decl, int namespace) | public boolean | hasSeparateFunctionNamespace() | public boolean | isTrue(Object value) | public static String | makeClassName(String source) | static void | mangle(String name, int start, int length, StringBuffer sbuf, char mode) Mangle an XML name as specified by JAXB. | public static String | mangle(String name) | public static int | namespaceForFunctions(int argCount) | public boolean | parse(Compilation tr, int options) | public static void | registerEnvironment() The compiler insert calls to this method for applications and applets. | public void | resolve(Compilation comp) |
DEFAULT_ELEMENT_PREFIX | final public static String DEFAULT_ELEMENT_PREFIX(Code) | | Pseudo-namespace "prefix" for the default element namespace.
|
DEFAULT_FUNCTION_PREFIX | final public static String DEFAULT_FUNCTION_PREFIX(Code) | | Pseudo-namespace "prefix" for the default function namespace.
|
KAWA_FUNCTION_NAMESPACE | final public static String KAWA_FUNCTION_NAMESPACE(Code) | | |
LOCAL_NAMESPACE | final public static String LOCAL_NAMESPACE(Code) | | |
PARSE_WITH_FOCUS | final public static int PARSE_WITH_FOCUS(Code) | | Special parser flag used by evalToFocusProc .
|
QEXO_FUNCTION_NAMESPACE | final public static String QEXO_FUNCTION_NAMESPACE(Code) | | |
SCHEMA_INSTANCE_NAMESPACE | final public static String SCHEMA_INSTANCE_NAMESPACE(Code) | | |
SCHEMA_NAMESPACE | final public static String SCHEMA_NAMESPACE(Code) | | |
VARIADIC_FUNCTION_NAMESPACE | final public static int VARIADIC_FUNCTION_NAMESPACE(Code) | | |
XHTML_NAMESPACE | final public static String XHTML_NAMESPACE(Code) | | |
XQUERY_FUNCTION_NAMESPACE | final public static String XQUERY_FUNCTION_NAMESPACE(Code) | | |
charIsInt | static boolean charIsInt(Code) | | |
defaultFunctionNamespacePath | final public static Namespace[] defaultFunctionNamespacePath(Code) | | |
envCounter | static int envCounter(Code) | | |
extensionsEnvEnv | public static Environment extensionsEnvEnv(Code) | | Environment of pre-defined non-standard Qexo/Kawa functions.
|
kawaFunctionNamespace | final public static Namespace kawaFunctionNamespace(Code) | | |
qexoFunctionNamespace | final public static Namespace qexoFunctionNamespace(Code) | | |
xqueryFunctionNamespace | final public static Namespace xqueryFunctionNamespace(Code) | | |
applyWithFocus | public void applyWithFocus(Procedure proc, Object item, int position, int size, Consumer out) throws Throwable(Code) | | Call a procedure with a given focus (context).
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: item - the context item, passed as the first argument to proc Parameters: position - the context position, passed as the second argument Parameters: size - the context size, passed as the second argument Parameters: out - where to send the result of proc |
applyWithFocus | public Object applyWithFocus(Procedure proc, Object item, int position, int size) throws Throwable(Code) | | Call a procedure with a given focus (context).
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: item - the context item, passed as the first argument to proc Parameters: position - the context position, passed as the second argument Parameters: size - the context size, passed as the second argument the result of applying proc |
applyWithFocus | public void applyWithFocus(Procedure proc, Object values, Consumer out) throws Throwable(Code) | | Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. The proc is called once for eachitem, with the item as the first argument, a 1-based index as thesecond argument, and the sequence size as the third argument. Parameters: out - where to send the result of proc |
applyWithFocus | public Object applyWithFocus(Procedure proc, Object values) throws Throwable(Code) | | Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. The proc is called once for eachitem, with the item as the first argument, a 1-based index as thesecond argument, and the sequence size as the third argument. the result of applying proc |
applyWithFocus$X | public void applyWithFocus$X(Procedure proc, Object values, CallContext ctx) throws Throwable(Code) | | Call a procedure with each item in a sequence as the context item.
Parameters: proc - a 3-operand Procedure as returned byevalToFocusProc Parameters: values - a sequence. The proc is called once for eachitem, with the item as the first argument, a 1-based index as thesecond argument, and the sequence size as the third argument. Parameters: ctx - the CallContext . The $X in themethod name tells Kawa that this argument is implicit when invokedfrom XQuery. |
evalToFocusProc | public Procedure evalToFocusProc(String expr) throws Throwable(Code) | | Parse an XQuery expression that is the body of a procedure.
Helper method used by evalWithFocus methods.
Parameters: expr - an XQuery expression (query) to evaluate a 3-operand Procedure whose arguments becomethe context item, position, and size. |
evalToFocusProc | public Procedure evalToFocusProc(Reader in, SourceMessages messages) throws Throwable(Code) | | Parse an XQuery expression from a Reader that is the body of a procedure.
Helper method used by evalWithFocus methods.
Parameters: in - where we read the expression from Parameters: messages - where to write syntax errors a 3-operand Procedure whose arguments becomethe context item, position, and size. |
evalWithFocus | public void evalWithFocus(Reader in, SourceMessages messages, Object values, Consumer out) throws Throwable(Code) | | Evaluate an expression with each item in a sequence as the context item.
Parameters: in - where we read the expression from Parameters: messages - where to write syntax errors Parameters: values - becomes the context sequence whileevaluating expr . Parameters: out - where to send the result of the expression |
evalWithFocus | public Object evalWithFocus(String expr, Object values) throws Throwable(Code) | | Evaluate an expression with each item in a sequence as the context item.
Parameters: expr - an XQuery expression (query) to evaluate Parameters: values - becomes the context sequence whileevaluating the expression the result of evaluating the expression |
evalWithFocus | public Object evalWithFocus(String expr, Object item, int position, int size) throws Throwable(Code) | | Evaluate an expression with a given focus (context).
Parameters: expr - an XQuery expression (query) to evaluate Parameters: item - becomes the context item while evaluating expr . Parameters: position - becomes the context position Parameters: size - becomes the context size the result of evaluating expr |
evalWithFocus | public void evalWithFocus(Reader in, SourceMessages messages, Object item, int position, int size, Consumer out) throws Throwable(Code) | | Evaluate an expression with a given focus (context).
Parameters: in - where we read the expression from Parameters: messages - where to write syntax errors Parameters: item - becomes the context item while evaluating the expression Parameters: position - becomes the context position Parameters: size - becomes the context size Parameters: out - where to send the result of the expression |
eval_with_focus$X | public void eval_with_focus$X(String expr, Object values, CallContext ctx) throws Throwable(Code) | | Evaluate an expression with a given focus (context).
Similar to evalWithFocus(String, Object, Consumer) .
The "$X" in the method name tells the Kawa compiler that the CallContext
argument is implicit, so it can be invoked from XQuery code thus:
XQuery:eval-with-focus($xquery, "expr", $sequence)
|
eval_with_focus$X | public void eval_with_focus$X(String expr, Object item, int position, int size, CallContext ctx) throws Throwable(Code) | | Evaluate an expression with a given focus (context).
Similar to evalWithFocus(String, Object, int, int, Consumer) .
The "$X" in the method name tells the Kawa compiler that the CallContext
argument is implicit, so it can be invoked from XQuery code thus:
XQuery:eval-with-focus($xquery, "expr", $item, $pos, $size)
|
hasSeparateFunctionNamespace | public boolean hasSeparateFunctionNamespace()(Code) | | |
mangle | static void mangle(String name, int start, int length, StringBuffer sbuf, char mode)(Code) | | Mangle an XML name as specified by JAXB.
|
namespaceForFunctions | public static int namespaceForFunctions(int argCount)(Code) | | |
registerEnvironment | public static void registerEnvironment()(Code) | | The compiler insert calls to this method for applications and applets.
|
Methods inherited from gnu.expr.Language | final public Type asType(Object spec)(Code)(Java Doc) public Object booleanObject(boolean b)(Code)(Java Doc) public Object coerceFromObject(Class clas, Object obj)(Code)(Java Doc) public Object coerceToObject(Class clas, Object obj)(Code)(Java Doc) public Object coerceToObject(int val)(Code)(Java Doc) public Declaration declFromField(ModuleExp mod, Object fvalue, Field fld)(Code)(Java Doc) protected void defAliasStFld(String name, String cname, String fname)(Code)(Java Doc) protected void defProcStFld(String name, String cname, String fname)(Code)(Java Doc) protected void defProcStFld(String name, String cname)(Code)(Java Doc) public void define(String sym, Object p)(Code)(Java Doc) final public void defineFunction(Named proc)(Code)(Java Doc) public void defineFunction(String name, Object proc)(Code)(Java Doc) public static Language detect(InputStream in) throws IOException(Code)(Java Doc) public static Language detect(InPort port) throws IOException(Code)(Java Doc) public static Language detect(String line)(Code)(Java Doc) public void emitCoerceToBoolean(CodeAttr code)(Code)(Java Doc) public void emitPushBoolean(boolean value, CodeAttr code)(Code)(Java Doc) final public Object eval(String string) throws Throwable(Code)(Java Doc) final public Object eval(Reader in) throws Throwable(Code)(Java Doc) final public Object eval(InPort port) throws Throwable(Code)(Java Doc) final public void eval(String string, Writer out) throws Throwable(Code)(Java Doc) final public void eval(String string, PrintConsumer out) throws Throwable(Code)(Java Doc) final public void eval(String string, Consumer out) throws Throwable(Code)(Java Doc) final public void eval(Reader in, Writer out) throws Throwable(Code)(Java Doc) public void eval(Reader in, Consumer out) throws Throwable(Code)(Java Doc) public void eval(InPort port, CallContext ctx) throws Throwable(Code)(Java Doc) public String formatType(Type type)(Code)(Java Doc) public Compilation getCompilation(Lexer lexer, SourceMessages messages)(Code)(Java Doc) public static Language getDefaultLanguage()(Code)(Java Doc) public Object getEnvPropertyFor(java.lang.reflect.Field fld, Object value)(Code)(Java Doc) public Object getEnvPropertyFor(Declaration decl)(Code)(Java Doc) final public Environment getEnvironment()(Code)(Java Doc) public AbstractFormat getFormat(boolean readable)(Code)(Java Doc) public static Language getInstance(String name)(Code)(Java Doc) public static Language getInstance(String langName, Class langClass)(Code)(Java Doc) public static Language getInstanceFromFilenameExtension(String filename)(Code)(Java Doc) public Environment getLangEnvironment()(Code)(Java Doc) final public Type getLangTypeFor(Type type)(Code)(Java Doc) public static String[][] getLanguages()(Code)(Java Doc) abstract public Lexer getLexer(InPort inp, SourceMessages messages)(Code)(Java Doc) public String getName()(Code)(Java Doc) public int getNamespaceOf(Declaration decl)(Code)(Java Doc) final public Environment getNewEnvironment()(Code)(Java Doc) public Consumer getOutputConsumer(Writer out)(Code)(Java Doc) public Procedure getPrompter()(Code)(Java Doc) public Symbol getSymbol(String name)(Code)(Java Doc) public Type getTypeFor(Class clas)(Code)(Java Doc) public Type getTypeFor(String name)(Code)(Java Doc) final public Type getTypeFor(Object spec, boolean lenient)(Code)(Java Doc) final public Type getTypeFor(Expression exp)(Code)(Java Doc) public Type getTypeFor(Expression exp, boolean lenient)(Code)(Java Doc) public boolean hasNamespace(Declaration decl, int namespace)(Code)(Java Doc) public boolean hasSeparateFunctionNamespace()(Code)(Java Doc) public boolean isTrue(Object value)(Code)(Java Doc) public void loadClass(String name) throws java.lang.ClassNotFoundException(Code)(Java Doc) public Object lookup(String name)(Code)(Java Doc) public NamedLocation lookupBuiltin(Symbol name, Object property, int hash)(Code)(Java Doc) public Object noValue()(Code)(Java Doc) final public Compilation parse(InPort port, gnu.text.SourceMessages messages, int options) throws java.io.IOException, gnu.text.SyntaxException(Code)(Java Doc) final public Compilation parse(InPort port, gnu.text.SourceMessages messages, ModuleInfo info) throws java.io.IOException, gnu.text.SyntaxException(Code)(Java Doc) final public Compilation parse(Lexer lexer, int options, ModuleInfo info) throws java.io.IOException, gnu.text.SyntaxException(Code)(Java Doc) abstract public boolean parse(Compilation comp, int options) throws java.io.IOException, gnu.text.SyntaxException(Code)(Java Doc) public static void registerLanguage(String[] langMapping)(Code)(Java Doc) public void resolve(Compilation comp)(Code)(Java Doc) public void runAsApplication(String[] args)(Code)(Java Doc) public static void setDefaultLanguage(Language language)(Code)(Java Doc) public static synchronized void setDefaults(Language lang)(Code)(Java Doc) public static Type string2Type(String name)(Code)(Java Doc)
|
|
|