public class SadlServerMain
extends java.lang.Object
| Constructor and Description |
|---|
SadlServerMain() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getAllowedRangeClassesOfPropertyOfClass(java.lang.String cls,
java.lang.String property)
This method returns all the names of classes that are allowed in the range of the given property on the given class
|
java.lang.Object[] |
getAllowedValuesOfDataPropertyOfClass(java.lang.String cls,
java.lang.String property)
This method returns all the allowed values of the given property on the given class.
|
java.lang.String[] |
getAllowedValuesOfObjectPropertyOfClass(java.lang.String cls,
java.lang.String property)
This method returns all the names of instances that are allowed values of the given property on the given class
|
java.lang.String[][] |
getDataAsStringArray(java.lang.String query) |
java.lang.String[] |
getInstancesOfClass(java.lang.String cls)
This method returns all the instances of the given class
|
java.lang.String[] |
getLeafClassesOfTaxonomy(java.lang.String root)
This method returns all the leaf classes of the classification hierarchy starting at root
|
static java.lang.String |
getModelQuery(java.lang.String modelName)
This method returns the query associated with this service model name
|
java.lang.String |
getOutputFormat() |
java.lang.String[] |
getPropertyDomain(java.lang.String property)
This method returns the class(es) which are the domain of the property, if any.
|
java.lang.String[] |
getPropertyRange(java.lang.String property)
This method returns the class(es) or XSD types which are the range of the property, if any.
|
java.lang.String[] |
getRequiredRangeClassesOfPropertyOfClass(java.lang.String cls,
java.lang.String property)
This method returns all the classes that must be represented in the range of the given property on the given class
|
java.lang.String |
getSessionKey() |
boolean |
isDatatypeProperty(java.lang.String property)
This method returns true if and only if the property is an DatatypeProperty
|
boolean |
isObjectProperty(java.lang.String property)
This method returns true if and only if the property is an ObjectProperty
|
static boolean |
isOwlFormatValid(java.lang.String format)
Method to test an OWL output format to see if it is supported
|
static void |
main(java.lang.String[] args)
This is the main method, inputs are command-line arguments.
|
java.lang.String |
process(java.lang.String[] args)
This method has the same meaning of args as for the main method but is not a static invocation and returns the session key.
|
void |
setOutputFormat(java.lang.String outputFormat) |
static void |
writeDataSource(javax.activation.DataSource out,
java.io.OutputStream os) |
static void |
writeDataSource(javax.activation.DataSource out,
java.lang.String fileOut) |
public static void main(java.lang.String[] args)
throws java.io.IOException,
javax.naming.NameNotFoundException
args - -- an array of values as described belowjavax.naming.NameNotFoundExceptionInvalidDerivationjava.io.IOExceptionpublic java.lang.String process(java.lang.String[] args)
throws java.io.IOException,
javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
NamedServiceNotFoundException
args - -- see main method documentationApplicationLaunchExceptionjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptionNamedServiceNotFoundExceptionInvalidDerivationpublic static void writeDataSource(javax.activation.DataSource out,
java.lang.String fileOut)
public static void writeDataSource(javax.activation.DataSource out,
java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String[][] getDataAsStringArray(java.lang.String query)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
javax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic static java.lang.String getModelQuery(java.lang.String modelName)
public void setOutputFormat(java.lang.String outputFormat)
public java.lang.String getOutputFormat()
public java.lang.String getSessionKey()
public java.lang.String[] getLeafClassesOfTaxonomy(java.lang.String root)
throws java.io.IOException,
javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
root - -- the localname, prefix:localname, or complete URI of the root classjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getInstancesOfClass(java.lang.String cls)
throws java.io.IOException,
javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
cls - -- the localname, prefix:localname, or complete URI of the classjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic boolean isObjectProperty(java.lang.String property)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertyjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic boolean isDatatypeProperty(java.lang.String property)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertyjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getPropertyDomain(java.lang.String property)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertyjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getPropertyRange(java.lang.String property)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertyjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getRequiredRangeClassesOfPropertyOfClass(java.lang.String cls,
java.lang.String property)
throws java.io.IOException,
javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertycls - -- the localname, prefix:localname, or complete URI of the classjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getAllowedRangeClassesOfPropertyOfClass(java.lang.String cls,
java.lang.String property)
throws javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.ConfigurationException,
com.ge.research.sadl.reasoner.QueryParseException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertycls - -- the localname, prefix:localname, or complete URI of the classjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptioncom.ge.research.sadl.reasoner.QueryParseExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.String[] getAllowedValuesOfObjectPropertyOfClass(java.lang.String cls,
java.lang.String property)
throws java.io.IOException,
javax.naming.NameNotFoundException,
com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertycls - -- the localname, prefix:localname, or complete URI of the classjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic java.lang.Object[] getAllowedValuesOfDataPropertyOfClass(java.lang.String cls,
java.lang.String property)
throws com.ge.research.sadl.reasoner.QueryParseException,
com.ge.research.sadl.reasoner.ReasonerNotFoundException,
com.ge.research.sadl.reasoner.InvalidNameException,
com.ge.research.sadl.reasoner.ConfigurationException,
SessionNotFoundException,
com.ge.research.sadl.reasoner.QueryCancelledException
property - -- the localname, prefix:localname, or complete URI of the propertycls - -- the localname, prefix:localname, or complete URI of the classjava.io.IOExceptionjavax.naming.NameNotFoundExceptioncom.ge.research.sadl.reasoner.ReasonerNotFoundExceptioncom.ge.research.sadl.reasoner.QueryParseExceptioncom.ge.research.sadl.reasoner.ConfigurationExceptioncom.ge.research.sadl.reasoner.InvalidNameExceptionSessionNotFoundExceptioncom.ge.research.sadl.reasoner.QueryCancelledExceptionpublic static boolean isOwlFormatValid(java.lang.String format)