public class QueryTree extends AbstractImplementation implements ExecutableIF
ImplementationIF| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHE_REF_NAME
The cache reference name (value="QUERYTREE_CACHE").
|
arguments, ctx, descriptor, NEW_LINE| Constructor and Description |
|---|
QueryTree()
Create the using a context.
|
QueryTree(XSDContextIF ctx,
java.util.Properties arguments,
Querytree queryTreeXSD)
Create the QueryTree using a context.
|
QueryTree(XSDContextIF ctx,
Querytree queryTreeXSD)
Create the QueryTree using a context.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkDescriptor(java.lang.Object descriptor)
Check the descriptor.
|
static QueryTree |
createInstance(XSDContextIF ctx,
java.io.InputStream is)
Use this method to create a QueryTree object from XML input stream
|
static QueryTree |
createInstance(XSDContextIF ctx,
java.lang.String buf)
Use this method to create a QueryTree object XML string
|
static QueryTree |
createInstance(XSDContextIF ctx,
java.lang.String[] buf)
Use this method to create a QueryTree object from XML string array
|
static QueryTree |
createInstance(XSDContextIF ctx,
java.lang.StringBuffer buf)
Use this method to create a object from XML string buffer
|
AoSession |
createSession()
Create a session from XML aosession descriptor.
|
void |
execute()
Execute the QueryTree.
|
protected static void |
execute(XSDContextIF ctx,
ExecutableIF executable,
java.util.logging.Logger messenger,
java.lang.String classname,
java.lang.String method)
Execute an implementation.
|
protected static void |
executeSequence(XSDContextIF ctx,
java.lang.String classname,
java.lang.String ident,
Implementationseq implSeq)
Execute a sequence of executable interfaces.
|
static java.lang.String |
getLocalFilename(XSDContextIF ctx,
java.lang.String filename)
Get the local filename.
|
java.lang.String |
getPostfix()
Get the postfix string value belong to the tree element.
|
java.lang.String |
getPrefix()
Get the prefix string value belong to the tree element.
|
NodeQuery |
getQuery(TreeNodeIF node)
Get node query object.
|
java.util.Iterator<TreeNodeIF> |
getRoot()
Get the tree root.
|
AoSession |
getSession()
Get the internal session.
|
void |
init()
Initialize the program.
|
static void |
main(java.lang.String[] args)
The main program to execute an QueryTree XML fromn commandline.
|
void |
print(java.io.PrintStream out,
XSDContextIF ctx,
TreeNodeIF node)
Print one special node to the stream.
|
void |
printTree(java.io.PrintStream out)
Print the tree.
|
void |
setDescriptor(java.lang.Object descriptor)
Set the XML tree descriptor.
|
void |
setSession(AoSession aoSession)
Set the session.
|
void |
terminate()
Terminate the QueryTree.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContext, getDescriptor, setArguments, setContextpublic static final java.lang.String CACHE_REF_NAME
public QueryTree()
public QueryTree(XSDContextIF ctx, java.util.Properties arguments, Querytree queryTreeXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.arguments - the arguments (may be null)queryTreeXSD - the XML tree node of the drop job.InvalidArgumentException - if arguments are invalid.InvalidDescriptorException - if descriptor is invalid.public QueryTree(XSDContextIF ctx, Querytree queryTreeXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.queryTreeXSD - the XML tree node of the drop job.InvalidArgumentException - if arguments are invalid.InvalidDescriptorException - if descriptor is invalid.public static QueryTree createInstance(XSDContextIF ctx, java.lang.StringBuffer buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx - the contextbuf - the string bufferjava.io.FileNotFoundException - if schema file was not found.javax.xml.bind.JAXBException - if the XML context was wrong.java.io.IOException - if an IO problem occurs.InvalidArgumentException - if there are wrong arguments for the implementation.InvalidDescriptorException - if the descriptor is wrong.InitializationFailedException - if initialization fails.public static QueryTree createInstance(XSDContextIF ctx, java.lang.String[] buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx - the contextbuf - the string arrayjava.io.FileNotFoundException - if schema file was not found.javax.xml.bind.JAXBException - if the XML context was wrong.java.io.IOException - if an IO problem occurs.InvalidArgumentException - if there are wrong arguments for the implementation.InvalidDescriptorException - if the descriptor is wrong.InitializationFailedException - if initialization fails.public static QueryTree createInstance(XSDContextIF ctx, java.lang.String buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx - the contextbuf - the stringjava.io.FileNotFoundException - if schema file was not found.javax.xml.bind.JAXBException - if the XML context was wrong.java.io.IOException - if an IO problem occurs.InvalidArgumentException - if there are wrong arguments for the implementation.InvalidDescriptorException - if the descriptor is wrong.InitializationFailedException - if initialization fails.public static QueryTree createInstance(XSDContextIF ctx, java.io.InputStream is) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx - the contextis - the input streamjava.io.FileNotFoundException - if schema file was not found.javax.xml.bind.JAXBException - if the XML context was wrong.java.io.IOException - if an IO problem occurs.InvalidArgumentException - if there are wrong arguments for the implementation.InvalidDescriptorException - if the descriptor is wrong.InitializationFailedException - if initialization fails.public void setDescriptor(java.lang.Object descriptor)
throws InvalidDescriptorException
setDescriptor in interface ImplementationIFsetDescriptor in class AbstractImplementationdescriptor - the tree node.InvalidDescriptorException - if descriptor is not valid.public static void checkDescriptor(java.lang.Object descriptor)
throws InvalidDescriptorException
descriptor - the descriptor.InvalidDescriptorException - if descriptor is invliad.public void init()
throws InitializationFailedException
init in interface ImplementationIFinit in class AbstractImplementationInitializationFailedException - if initialization fails.public void execute()
throws ExecutableException
execute in interface ExecutableIFExecutableException - if execution fails.public void terminate()
terminate in interface ExecutableIFpublic java.lang.String getPrefix()
public java.lang.String getPostfix()
public java.util.Iterator<TreeNodeIF> getRoot()
public NodeQuery getQuery(TreeNodeIF node) throws InitializationFailedException
node - the tree node.InitializationFailedException - if the query registry
could not be build initially.public void printTree(java.io.PrintStream out)
throws AoException,
java.text.ParseException,
InitializationFailedException
out - the output stream.AoException - if ASAM ODS fails.java.text.ParseException - if unable to parse the XML structure.InitializationFailedException - if the query registry
could not be build initially.public void print(java.io.PrintStream out,
XSDContextIF ctx,
TreeNodeIF node)
throws AoException,
java.text.ParseException,
InitializationFailedException
out - the output stream.ctx - the contextnode - the nodeAoException - If ASAM ODS fails.java.text.ParseException - if the parser fails.InitializationFailedException - if the query registry
could not be build initially.protected static void executeSequence(XSDContextIF ctx, java.lang.String classname, java.lang.String ident, Implementationseq implSeq) throws java.io.FileNotFoundException, InvalidDescriptorException, InvalidArgumentException, InitializationFailedException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
ident - The method ident.implSeq - the sequence.java.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionInitializationFailedExceptionInvalidArgumentExceptionInvalidDescriptorExceptionjava.io.FileNotFoundExceptionprotected static void execute(XSDContextIF ctx, ExecutableIF executable, java.util.logging.Logger messenger, java.lang.String classname, java.lang.String method)
ctx - the context.executable - the executable definition.messenger - the messenger.classname - the name of the class to be executed.method - the name of the method that calls this method.public void setSession(AoSession aoSession) throws AoException
aoSession - the ASAM ODS session.AoException - if ASAM ODS call fails.public AoSession createSession() throws AoException, java.lang.Exception
AoExceptionjava.lang.Exceptionpublic AoSession getSession()
public static void main(java.lang.String[] args)
args - the command line arguments.public static java.lang.String getLocalFilename(XSDContextIF ctx, java.lang.String filename) throws java.io.IOException
ctx - the context.filename - a filename spec.java.io.IOException