|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PreprocessorEngine
The WAQL preprocessor engine is the central preprocessor API also representing the current preprocessor state. There are three main state-changing operations for the engine, which are typically called in the given order:
Method Summary | |
---|---|
void |
addDataPrinter(DataPrinter printer)
Adds a new data printer on top of the printer pipeline. |
java.util.Collection<DataDependency> |
getDependencies()
Returns available unresolved data dependencies from the original query. |
void |
parse(java.io.InputStream input)
Parses a WAQL query in textual form from the given input stream. |
void |
resolveDependency(DataDependency dependency,
java.lang.Object content)
Resolves the given data dependency by providing actual content. |
void |
transform(java.io.OutputStream output)
Transforms the WAQL query into a valid XQuery (without any WAQL extensions) and writes it to the given output stream. |
Method Detail |
---|
void parse(java.io.InputStream input) throws MalformedQueryException
input
- An input stream of the WAQL query to be consumed.
MalformedQueryException
- In case of syntactical oder grammatical
errors in the input.java.util.Collection<DataDependency> getDependencies()
resolveDependency(org.antforge.waqlpp.core.DataDependency, java.lang.Object)
because new ones might become available.
void resolveDependency(DataDependency dependency, java.lang.Object content)
DataPrinter
for details about that. Note that
resolving dependencies can generate new ones in case of nested
dependencies in the input. The application should therefore call
getDependencies()
afterwards to retrieve those new dependencies.
dependency
- The data dependency to be resolved.content
- An object representing the content to be inserted.void addDataPrinter(DataPrinter printer)
DataPrinter
documentation for details about
how the printer pipeline works.
printer
- The data printer to be added to the pipeline.void transform(java.io.OutputStream output) throws UnresolvedDependencyException
output
- An output stream for the final XQuery.
UnresolvedDependencyException
- In case the query still contains
unresolved data dependencies.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |