public class XMLConfiguration extends Object implements QueryBuilder
#readQueryAsXML(File).
build(KnowledgeSource, AlgorithmSource) method to create a query.
| Constructor and Description |
|---|
XMLConfiguration(File file)
Call this constructor to use this class as a QueryBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
Query |
build(KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Builds a
Query. |
static Query |
readQueryAsXML(File file,
KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Read XML from the specified file that describes a Protempa query and
create the query.
|
static Query |
readQueryAsXML(InputStream inputStream,
KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Read XML from the specified input stream that describes a Protempa query
and create the query.
|
static Query |
readQueryAsXML(Reader reader,
KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Read XML from the specified
Reader that describes a Protempa
query and create the query. |
static Query |
readQueryAsXML(String str,
KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Read XML from the specified string that describes a Protempa query and
create the query.
|
static Query |
readQueryAsXML(URL url,
KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Read XML from the specified URL that describes a Protempa query and
create the query.
|
static TableDestination |
readTableQueryResultsHandlerAsXML(InputStream inputStream,
BufferedWriter dataWriter,
KnowledgeSource knowledgeSource)
Read XML from the specified
InputStream that describes a Protempa
TableQueryResultsHandler and create the TableQueryResultsHandler. |
static TableDestination |
readTableQueryResultsHandlerAsXML(Reader reader,
BufferedWriter dataWriter,
KnowledgeSource knowledgeSource)
Read XML from the specified
Reader that describes a Protempa
TableQueryResultsHandler and create the TableQueryResultsHandler. |
static TableDestination |
readTableQueryResultsHandlerAsXML(String str,
BufferedWriter dataWriter,
KnowledgeSource knowledgeSource)
Read XML from the specified string that describes a Protempa
TableQueryResultsHandler and create the
TableQueryResultsHandler. |
static TableDestination |
readTableQueryResultsHandlerAsXML(URL url,
BufferedWriter dataWriter,
KnowledgeSource knowledgeSource)
Read XML from the specified URL that describes a Protempa
TableQueryResultsHandler and create the
TableQueryResultsHandler. |
static TableDestination |
readTableQueryResultsHandlerFactoryAsXML(File file,
BufferedWriter dataWriter,
KnowledgeSource knowledgeSource)
Read XML from the specified file that describes a Protempa
TableQueryResultsHandler and create the
TableQueryResultsHandler. |
static void |
writeQueryAsXML(Query query,
File file)
Write the given Protempa query to the specified file.
|
static void |
writeQueryAsXML(Query query,
File file,
boolean surpressSchemaReference)
Write the given protempa query to the specified file.
|
static void |
writeQueryAsXML(Query query,
Writer writer,
boolean surpressSchemaReference)
Write the given protempa query to the specified file.
|
static void |
writeTableDestinationAsXML(TableDestination destination,
File file,
boolean surpressSchemaReference,
KnowledgeSource knowledgeSource)
Write the given
TableDestination query to the specified
file. |
static void |
writeTableDestinationAsXML(TableDestination destination,
File file,
KnowledgeSource knowledgeSource)
Write the given
TableDestination query to the specified
file. |
static void |
writeTableDestinationAsXML(TableDestination destination,
Writer writer,
boolean surpressSchemaReference,
KnowledgeSource knowledgeSource)
Write the given
TableDestination query using the
specified Writer. |
public XMLConfiguration(File file)
file - The XML file that contains the query description.public static Query readQueryAsXML(File file, KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws IOException
file - The file to read. The top level element of the XML in the file
must be "protempaQuery" and the XML must conform to the
Protempa XML schema.knowledgeSource - algorithmSource - IOException - If there is a problem.public static Query readQueryAsXML(URL url, KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws IOException
url - The url to read. The top level element of the XML must be
"protempaQuery" and the XML must conform to the Protempa XML
schema.knowledgeSource - algorithmSource - IOException - If there is a problem.public static Query readQueryAsXML(Reader reader, KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws IOException
Reader that describes a Protempa
query and create the query.reader - The Reader to read. The top level element of the XML must be
"protempaQuery" and the XML must conform to the Protempa XML
schema.knowledgeSource - algorithmSource - IOException - If there is a problem.public static Query readQueryAsXML(InputStream inputStream, KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws IOException
inputStream - The InputStream to read. The top level element of the XML must
be "protempaQuery" and the XML must conform to the Protempa
XML schema.knowledgeSource - algorithmSource - IOException - If there is a problem.public static Query readQueryAsXML(String str, KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws IOException
str - The string to read. The top level element of the XML must be
"protempaQuery" and the XML must conform to the Protempa XML
schema.knowledgeSource - algorithmSource - IOException - If there is a problem.public static void writeQueryAsXML(Query query, File file) throws IOException
query - The query to be written as XML.file - The file to write the XML to.IOException - If there is a problem writing the file.public static void writeQueryAsXML(Query query, File file, boolean surpressSchemaReference) throws IOException
query - The query to be written as XML.file - The file to write the XML to.surpressSchemaReference - If true, don't include a reference to the schema in the
generated XML file.IOException - If there is a problem writing the file.public static void writeQueryAsXML(Query query, Writer writer, boolean surpressSchemaReference) throws IOException
query - The query to be written as XML.writer - The Writer to us to write the XML.surpressSchemaReference - If true, don't include a reference to the schema in the
generated XML file.IOException - If there is a problem writing the file.public static TableDestination readTableQueryResultsHandlerFactoryAsXML(File file, BufferedWriter dataWriter, KnowledgeSource knowledgeSource) throws IOException
TableQueryResultsHandler.file - The file to read. The top level element of the XML in the file
must be "tableQueryResultsHandler" and the XML must conform to
the Protempa XML schema.dataWriter - The Writer that the described TableQueryResultsHandler will
use to write its output.IOException - If there is a problem.public static TableDestination readTableQueryResultsHandlerAsXML(URL url, BufferedWriter dataWriter, KnowledgeSource knowledgeSource) throws IOException
TableQueryResultsHandler.url - The URL to read. The top level element of the XML in the file
must be "tableQueryResultsHandler" and the XML must conform to
the Protempa XML schema.dataWriter - The Writer that the described TableQueryResultsHandler will
use to write its output.IOException - If there is a problem.public static TableDestination readTableQueryResultsHandlerAsXML(Reader reader, BufferedWriter dataWriter, KnowledgeSource knowledgeSource) throws IOException
Reader that describes a Protempa
TableQueryResultsHandler and create the TableQueryResultsHandler.reader - The Reader to read. The top level element of the XML
must be "tableQueryResultsHandler" and the XML must conform to
the Protempa XML schema.dataWriter - The Writer that the described TableQueryResultsHandler will
use to write its output.IOException - If there is a problem.public static TableDestination readTableQueryResultsHandlerAsXML(InputStream inputStream, BufferedWriter dataWriter, KnowledgeSource knowledgeSource) throws IOException
InputStream that describes a Protempa
TableQueryResultsHandler and create the TableQueryResultsHandler.inputStream - The InputStream to read. The top level element of the
XML must be "tableQueryResultsHandler" and the XML must
conform to the Protempa XML schema.dataWriter - The Writer that the described TableQueryResultsHandler will
use to write its output.IOException - If there is a problem.public static TableDestination readTableQueryResultsHandlerAsXML(String str, BufferedWriter dataWriter, KnowledgeSource knowledgeSource) throws IOException
TableQueryResultsHandler.str - The string to read. The top level element of the XML must be
"tableQueryResultsHandler" and the XML must conform to the
Protempa XML schema.dataWriter - The Writer that the described TableQueryResultsHandler will
use to write its output.IOException - If there is a problem.public static void writeTableDestinationAsXML(TableDestination destination, File file, KnowledgeSource knowledgeSource) throws IOException
TableDestination query to the specified
file.destination - The TableDestination to be written as XML.file - The file to write the XML to.IOException - If there is a problem writing the file.public static void writeTableDestinationAsXML(TableDestination destination, File file, boolean surpressSchemaReference, KnowledgeSource knowledgeSource) throws IOException
TableDestination query to the specified
file.destination - The TableDestination to be written as XML.file - The file to write the XML to.surpressSchemaReference - If true, don't include a reference to the schema in the
generated XML file.IOException - If there is a problem writing the file.public static void writeTableDestinationAsXML(TableDestination destination, Writer writer, boolean surpressSchemaReference, KnowledgeSource knowledgeSource) throws IOException
TableDestination query using the
specified Writer.destination - The TableDestination to be written as XML.writer - The Writer to us to write the XML.surpressSchemaReference - If true, don't include a reference to the schema in the
generated XML file.IOException - If there is a problem writing the file.public Query build(KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws QueryBuildException
QueryBuilderQuery. This method could validate the query
specification using the knowledge source and algorithm source.build in interface QueryBuilderknowledgeSource - a KnowledgeSource.algorithmSource - a AlgorithmSource.Query. Guaranteed not null.QueryBuildException - If the query specification failed
validation or some other error occurred.Copyright © 2012–2016 Emory University. All rights reserved.