|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgalapi.Galax
The Galax
class contains methods needed to perform
queries and to manipulate data under different representations.
Field Summary | |
static int |
Buffer_Input
|
static boolean |
ExternalContextItem
Module does take an external context item |
static int |
File_Input
|
static int |
Http_Input
|
static boolean |
NoExternalContextItem
Module does not take an external context item |
Constructor Summary | |
Galax()
|
Method Summary | |
static ProcessingContext |
defaultProcessingContext()
Returns the default ProcessingContext
which just contains flags for controlling debugging, printing, and
the processing phases. |
static ItemList |
evalCompiledStatement(PreparedProlog pp,
Item cs)
Given the PreparedProlog ,
evaluates a single compiled statement. |
static PreparedProlog |
evalProlog(CompiledProlog compiled_prolog,
ExternalContext exc)
Evaluates the expressions for all - possibly mutually dependent - global variables. |
static ItemList |
evalStatement(CompiledProlog c,
int input_source_kind,
java.lang.String input)
Given the CompiledProlog , evaluates the XQuery
statement in the string argument. |
static CompiledProlog |
importLibraryModule(CompiledProlog compiled_prolog,
int input_source_kind,
java.lang.String input)
Used to import other library modules. |
static CompiledModule |
importMainModule(CompiledProlog compiled_prolog,
boolean has_ext_ctxt_item,
int input_source_kind,
java.lang.String input)
Used to import a main module defined in a file. |
static void |
init()
Does the initialization stuff, that is it passes program arguments to the OCaml Sys module. |
static NodeList |
loadDocument(ProcessingContext pc,
int input_source_kind,
java.lang.String input)
Loads an XML document into the Galax data model. |
static CompiledProlog |
loadStandardLibrary(ProcessingContext pc)
Load the standard Galax library, which contains the built-in types, namespaces, and functions. |
protected static int |
nativeDefaultProcessingContext()
|
protected static int |
nativeEvalCompiledStatement(int prepared_prolog,
int compiled_stmt)
|
protected static int |
nativeEvalProlog(int compiled_prolog,
int external_context)
|
protected static int |
nativeEvalStatement(int c,
int input_source_kind,
java.lang.String input)
|
protected static int |
nativeImportLibraryModule(int compiled_prolog,
int input_source_kind,
java.lang.String input)
|
protected static int |
nativeImportMainModule(int compiled_prolog,
boolean ext_ctxt_bool,
int input_source_kind,
java.lang.String input)
|
protected static int |
nativeLoadDocument(int pc,
int input_source_kind,
java.lang.String filename)
|
protected static int |
nativeLoadStandardLibrary(int pc)
|
protected static void |
nativeSerializeToFile(int pc,
java.lang.String filename,
int xml)
|
protected static void |
nativeSerializeToStdout(int pc,
int xml)
|
protected static java.lang.String |
nativeSerializeToString(int pc,
int xml)
|
static void |
serializeToFile(ProcessingContext pc,
java.lang.String filename,
ItemList xml)
Serializes an XQuery data model value to a file |
static void |
serializeToStdout(ProcessingContext pc,
ItemList xml)
Serializes an XQuery data model value to standard output |
static java.lang.String |
serializeToString(ProcessingContext pc,
ItemList xml)
Serializes an XQuery data model value to a string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int File_Input
public static final int Buffer_Input
public static final int Http_Input
public static final boolean NoExternalContextItem
public static final boolean ExternalContextItem
Constructor Detail |
public Galax()
Method Detail |
public static void init() throws GalapiException
GalapiException
public static NodeList loadDocument(ProcessingContext pc, int input_source_kind, java.lang.String input) throws GalapiException
pc
- Processing context for loading documentinput_source_kind
- How the input XML is providedinput
- The input itself (string, file, etc.)
GalapiException
public static java.lang.String serializeToString(ProcessingContext pc, ItemList xml) throws GalapiException
xml
- a collection of items representing an XML value
GalapiException
public static void serializeToStdout(ProcessingContext pc, ItemList xml) throws GalapiException
xml
- a collection of items representing an XML value
GalapiException
public static void serializeToFile(ProcessingContext pc, java.lang.String filename, ItemList xml) throws GalapiException
filename
- the name of the output file to be producedxml
- a collection of items representing an XML value
GalapiException
public static ProcessingContext defaultProcessingContext() throws GalapiException
ProcessingContext
which just contains flags for controlling debugging, printing, and
the processing phases.
GalapiException
public static CompiledProlog loadStandardLibrary(ProcessingContext pc) throws GalapiException
GalapiException
public static CompiledProlog importLibraryModule(CompiledProlog compiled_prolog, int input_source_kind, java.lang.String input) throws GalapiException
CompiledProlog
argument extended
with the module in the string filename argument.
GalapiException
public static CompiledModule importMainModule(CompiledProlog compiled_prolog, boolean has_ext_ctxt_item, int input_source_kind, java.lang.String input) throws GalapiException
has_ext_ctxt_item
- True, if the main module expects the context item to be provided by the external environment.input_source_kind
- Specifies whether main module is in
file, string buffer or HTTP URL.
CompiledModule
argument contains a compiled prolog and an ItemList
containing statements to evaluate.
GalapiException
CompiledModule
public static PreparedProlog evalProlog(CompiledProlog compiled_prolog, ExternalContext exc) throws GalapiException
It must be called before the other evalXXX functions.
compiled_prolog
- a context obtained with one of the methods from
this class
GalapiException
public static ItemList evalStatement(CompiledProlog c, int input_source_kind, java.lang.String input) throws GalapiException
CompiledProlog
, evaluates the XQuery
statement in the string argument.
GalapiException
public static ItemList evalCompiledStatement(PreparedProlog pp, Item cs) throws GalapiException
PreparedProlog
,
evaluates a single compiled statement.
GalapiException
protected static int nativeLoadDocument(int pc, int input_source_kind, java.lang.String filename)
protected static java.lang.String nativeSerializeToString(int pc, int xml)
protected static void nativeSerializeToStdout(int pc, int xml)
protected static void nativeSerializeToFile(int pc, java.lang.String filename, int xml)
protected static int nativeDefaultProcessingContext()
protected static int nativeLoadStandardLibrary(int pc)
protected static int nativeImportLibraryModule(int compiled_prolog, int input_source_kind, java.lang.String input)
protected static int nativeImportMainModule(int compiled_prolog, boolean ext_ctxt_bool, int input_source_kind, java.lang.String input)
protected static int nativeEvalProlog(int compiled_prolog, int external_context)
protected static int nativeEvalStatement(int c, int input_source_kind, java.lang.String input)
protected static int nativeEvalCompiledStatement(int prepared_prolog, int compiled_stmt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |