public interface ISadlServerPE extends ISadlServer
Modifier and Type | Method and Description |
---|---|
boolean |
addAllValuesFromRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
java.lang.String restrictionName)
Call this method to restrict the values of a object property on a class to instances from a particular class in the named model.
|
boolean |
addCardinalityRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
int cardValue)
Call this method to add a cardinality restriction to a property on a class in the named model.
|
boolean |
addClass(java.lang.String modelName,
java.lang.String className,
java.lang.String superClassName)
Call this method to create a new class in the specified named model
|
boolean |
addExistingModel(java.lang.String modelPublicUri,
java.lang.String modelAltUrl,
java.lang.String modelPrefix)
Call this method to create a new mapping to the specified existing model.
|
boolean |
addHasValueRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
java.lang.String valueInstanceName)
Call this method to add to restrict an object property on a class to a particular value in the named model.
|
boolean |
addImport(java.lang.String modelName,
java.lang.String importedModelUri)
Call this model to add an import to the named model.
|
boolean |
addInstance(java.lang.String modelName,
java.lang.String instName,
java.lang.String className)
Call this method to create a new instance of the specified class in the named model.
|
boolean |
addMaxCardinalityRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
int cardValue)
Call this method to add a max cardinality restriction to a property on a class in the named model.
|
boolean |
addMinCardinalityRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
int cardValue)
Call this method to add a min cardinality restriction to a property on a class in the named model.
|
boolean |
addObjectPropertyRangeClass(java.lang.String modelName,
java.lang.String propertyName,
java.lang.String rangeClassName)
Call this method to add a class to the range of an object property in the named model.
|
boolean |
addOntProperty(java.lang.String modelName,
java.lang.String propertyName,
java.lang.String superPropertyName)
Call this method to create a new ontology property, either ObjectProperty or DatatypeProperty, in the named model.
|
boolean |
addOntPropertyDomainClass(java.lang.String modelName,
java.lang.String propertyName,
java.lang.String domainClassName)
Call this method to add a class to the domain of a property in the named model.
|
boolean |
addRule(java.lang.String modelName,
java.lang.String ruleAsString)
Call this method to add a rule to the specified model
|
boolean |
addSomeValuesFromRestriction(java.lang.String modelName,
java.lang.String className,
java.lang.String propertyName,
java.lang.String restrictionName)
Call this method to require that the values of a object property on a class include instances from a particular class in the named model.
|
boolean |
addTriple(java.lang.String modelName,
java.lang.String subject,
java.lang.String predicate,
java.lang.Object value)
Call this method to add the specified triple to the specified existing model.
|
com.ge.research.sadl.reasoner.ResultSet |
ask(java.lang.String modelName,
java.lang.String subjName,
java.lang.String propName,
java.lang.Object objValue)
This method retrieves the results of an RDF triple matching request as a list of matching statements.
|
java.lang.String |
createInstance(java.lang.String modelName,
java.lang.String name,
java.lang.String className)
This method creates a new Individual of the class identified in the specified named model.
|
boolean |
createServiceModel(java.lang.String kbid,
java.lang.String serviceName,
java.lang.String modelName,
java.lang.String owlFileName,
java.lang.String prefix)
Call this method to create a new named service with the specified new model name
and global prefix to be saved to the specified OWL file in the specified kbase.
|
boolean |
deleteModel(java.lang.String modelName)
Call this method to delete a model from the knowledge base.
|
boolean |
deleteTriple(java.lang.String modelName,
java.lang.String subject,
java.lang.String predicate,
java.lang.Object value)
Call this method to delete the specified triple from the specified existing model.
|
java.util.List<com.ge.research.sadl.reasoner.ModelError> |
getErrors()
Call this method to retrieve the errors that have been accumulated.
|
java.lang.String |
getUniqueInstanceUri(java.lang.String namespace,
java.lang.String baseLocalName)
Call this method to obtain a unique unused URI based on the namespace and baseLocalName provided.
|
java.lang.String |
getUniqueInstanceUri(java.lang.String modelName,
java.lang.String namespace,
java.lang.String baseLocalName)
Call this method to obtain a unique unused URI based on the namespace and baseLocalName provided.
|
java.lang.String |
getUniqueNamespaceUri(java.lang.String baseNamespace)
Call this method to obtain a unique unused namespace URI based on the base namespace provided.
|
boolean |
persistChangesToServiceModels()
Call this method to persist any changes that have been made to the
service model or to any of the models that it imports.
|
boolean |
persistInstanceModel(java.lang.String owlInstanceFileName,
java.lang.String globalPrefix)
Call this method to persist the instance data which has been added
during this session as model on the server.
|
boolean |
persistInstanceModel(java.lang.String modelName,
java.lang.String owlInstanceFileName,
java.lang.String globalPrefix)
Call this method to persist the instance data which has been added
during this session as model on the server with the specified model URI.
|
com.ge.research.sadl.reasoner.ResultSet |
query(java.lang.String modelName,
java.lang.String query)
This method retrieves the results of a kbase query as a List array, 1st element being a List of
the column headings and second being a List of rows, each of which is a List of values.
|
boolean |
setDatatypePropertyRange(java.lang.String modelName,
java.lang.String propertyName,
java.lang.String xsdRange)
Call this method to set the range of a datatype property in the named model.
|
boolean |
updateRdfsLabel(java.lang.String uri,
java.lang.String label,
java.lang.String language)
Method to add or update the rdfs:label for the ontology Resource identified by uri and of the specified language
|
boolean |
updateRdfsLabel(java.lang.String modelName,
java.lang.String uri,
java.lang.String label,
java.lang.String language)
Method to add or update the rdfs:label for the ontology Resource identified by uri and of the specified language
|
addTriple, ask, atomicQuery, atomicQueryCsvData, clearCache, collectTimingInformation, construct, createInstance, deleteTriple, getClassName, getDerivations, getInstanceDataNamespace, getInstanceModelName, getKBaseIdentifier, getKbaseRoot, getModelName, getReasonerVersion, getServiceNameMap, getServiceVersion, getTimingInformation, loadCsvData, loadData, parameterizeQuery, prepareQuery, query, reset, selectServiceModel, selectServiceModel, selectServiceModel, selectServiceModel, sendCsvData, sendData, sendData, setInstanceDataNamespace, setKbaseRoot, setOwlFileOutputFormat, setQueryTimeout, setServiceNameMap
boolean persistInstanceModel(java.lang.String owlInstanceFileName, java.lang.String globalPrefix) throws com.ge.research.sadl.reasoner.ConfigurationException, SessionNotFoundException, java.io.IOException
owlInstanceFileName
- File name containing instance in OWL format. For absolute paths use "file:///"globalPrefix
- Global prefix (must be unique in the knowledge base)com.ge.research.sadl.server.ConfigurationException
SessionNotFoundException
java.io.IOException
com.ge.research.sadl.reasoner.ConfigurationException
boolean persistInstanceModel(java.lang.String modelName, java.lang.String owlInstanceFileName, java.lang.String globalPrefix) throws com.ge.research.sadl.reasoner.ConfigurationException, SessionNotFoundException, java.io.IOException
modelName
- Model nameowlInstanceFileName
- File name containing instance in OWL formatglobalPrefix
- Global prefixcom.ge.research.sadl.server.ConfigurationException
SessionNotFoundException
java.io.IOException
com.ge.research.sadl.reasoner.ConfigurationException
boolean persistChangesToServiceModels() throws SessionNotFoundException
SessionNotFoundException
java.util.List<com.ge.research.sadl.reasoner.ModelError> getErrors() throws SessionNotFoundException
SessionNotFoundException
boolean addTriple(java.lang.String modelName, java.lang.String subject, java.lang.String predicate, java.lang.Object value) throws com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.TripleNotFoundException, com.ge.research.sadl.reasoner.ReasonerNotFoundException, SessionNotFoundException
modelName
- Model namesubject
- Subjectpredicate
- Predicatevalue
- Object valuecom.ge.research.sadl.server.ConfigurationException
com.ge.research.sadl.server.ReasonerNotFoundException
com.ge.research.sadl.server.TripleNotFoundException
SessionNotFoundException
com.ge.research.sadl.reasoner.ConfigurationException
com.ge.research.sadl.reasoner.TripleNotFoundException
com.ge.research.sadl.reasoner.ReasonerNotFoundException
java.lang.String createInstance(java.lang.String modelName, java.lang.String name, java.lang.String className) throws com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.InvalidNameException, SessionNotFoundException, java.io.IOException
modelName
- Model namename
- -- the name of the new instance to be created or null to create a blank nodeclassName
- -- the name of the OntClass to which the new Individual will belongcom.ge.research.sadl.reasoner.ConfigurationException
com.ge.research.sadl.reasoner.InvalidNameException
SessionNotFoundException
java.io.IOException
boolean deleteTriple(java.lang.String modelName, java.lang.String subject, java.lang.String predicate, java.lang.Object value) throws com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.TripleNotFoundException, com.ge.research.sadl.reasoner.ReasonerNotFoundException, SessionNotFoundException
modelName
- Model namesubject
- Subjectpredicate
- Predicatevalue
- Object valuecom.ge.research.sadl.server.ConfigurationException
com.ge.research.sadl.server.ReasonerNotFoundException
com.ge.research.sadl.server.TripleNotFoundException
SessionNotFoundException
com.ge.research.sadl.reasoner.ConfigurationException
com.ge.research.sadl.reasoner.TripleNotFoundException
com.ge.research.sadl.reasoner.ReasonerNotFoundException
boolean addClass(java.lang.String modelName, java.lang.String className, java.lang.String superClassName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class name or null if nonesuperClassName
- Super class name or null if noneSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
java.lang.String getUniqueInstanceUri(java.lang.String namespace, java.lang.String baseLocalName) throws com.ge.research.sadl.reasoner.InvalidNameException, SessionNotFoundException
namespace
- -- namespace of the new URIbaseLocalName
- -- local fragment base of the URISessionNotFoundException
com.ge.research.sadl.server.InvalidNameException
com.ge.research.sadl.reasoner.InvalidNameException
java.lang.String getUniqueInstanceUri(java.lang.String modelName, java.lang.String namespace, java.lang.String baseLocalName) throws com.ge.research.sadl.reasoner.InvalidNameException, SessionNotFoundException
modelName
- Model namenamespace
- -- namespace of the new URIbaseLocalName
- -- local fragment base of the URISessionNotFoundException
com.ge.research.sadl.server.InvalidNameException
com.ge.research.sadl.reasoner.InvalidNameException
java.lang.String getUniqueNamespaceUri(java.lang.String baseNamespace) throws com.ge.research.sadl.reasoner.InvalidNameException, SessionNotFoundException, java.net.MalformedURLException, com.ge.research.sadl.reasoner.ConfigurationException
baseNamespace
- -- base namespace of the new URISessionNotFoundException
com.ge.research.sadl.server.InvalidNameException
com.ge.research.sadl.reasoner.ConfigurationException
java.net.MalformedURLException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addInstance(java.lang.String modelName, java.lang.String instName, java.lang.String className) throws com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.InvalidNameException, SessionNotFoundException
modelName
- Model nameinstName
- Instance nameclassName
- Class name or null if nonecom.ge.research.sadl.server.ConfigurationException
SessionNotFoundException
com.ge.research.sadl.server.InvalidNameException
com.ge.research.sadl.reasoner.ConfigurationException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addOntProperty(java.lang.String modelName, java.lang.String propertyName, java.lang.String superPropertyName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model namepropertyName
- Property namesuperPropertyName
- Super property nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addMaxCardinalityRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, int cardValue) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namecardValue
- Cardinality valueSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addMinCardinalityRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, int cardValue) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namecardValue
- Cardinality valueSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addCardinalityRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, int cardValue) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namecardValue
- Cardinality valueSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addHasValueRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, java.lang.String valueInstanceName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namevalueInstanceName
- Value instance nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addSomeValuesFromRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, java.lang.String restrictionName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namerestrictionName
- Restriction nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addAllValuesFromRestriction(java.lang.String modelName, java.lang.String className, java.lang.String propertyName, java.lang.String restrictionName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model nameclassName
- Class namepropertyName
- Property namerestrictionName
- Restriction nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean createServiceModel(java.lang.String kbid, java.lang.String serviceName, java.lang.String modelName, java.lang.String owlFileName, java.lang.String prefix) throws SessionNotFoundException
kbid
- Knowledge base identifierserviceName
- Service namemodelName
- Model nameowlFileName
- OWL file nameprefix
- global prefix nameSessionNotFoundException
boolean addExistingModel(java.lang.String modelPublicUri, java.lang.String modelAltUrl, java.lang.String modelPrefix) throws com.ge.research.sadl.reasoner.InvalidNameException, com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, java.net.URISyntaxException
modelPublicUri
- modelAltUrl
- modelPrefix
- com.ge.research.sadl.reasoner.InvalidNameException
com.ge.research.sadl.reasoner.ConfigurationException
java.net.URISyntaxException
java.io.IOException
boolean addImport(java.lang.String modelName, java.lang.String importedModelUri) throws com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, com.ge.research.sadl.reasoner.InvalidNameException, java.net.URISyntaxException
modelName
- importedModelUri
- com.ge.research.sadl.reasoner.ConfigurationException
java.net.URISyntaxException
com.ge.research.sadl.reasoner.InvalidNameException
java.io.IOException
boolean addOntPropertyDomainClass(java.lang.String modelName, java.lang.String propertyName, java.lang.String domainClassName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model namepropertyName
- Property namedomainClassName
- Domain class nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addObjectPropertyRangeClass(java.lang.String modelName, java.lang.String propertyName, java.lang.String rangeClassName) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model namepropertyName
- Property namerangeClassName
- Range class nameSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean setDatatypePropertyRange(java.lang.String modelName, java.lang.String propertyName, java.lang.String xsdRange) throws SessionNotFoundException, com.ge.research.sadl.reasoner.InvalidNameException
modelName
- Model namepropertyName
- Property namexsdRange
- XSD range fragment: string | boolean | decimal | int | long | float | double | duration | dateTime | time | date | gYearMonth | gYear | gMonthDay | gDay | gMonth | hexBinary | base64Binary | anyURI | dataSessionNotFoundException
com.ge.research.sadl.reasoner.InvalidNameException
boolean addRule(java.lang.String modelName, java.lang.String ruleAsString) throws com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, SessionNotFoundException
modelName
- Model nameruleAsString
- Rulecom.ge.research.sadl.server.ConfigurationException
java.io.IOException
SessionNotFoundException
com.ge.research.sadl.reasoner.ConfigurationException
boolean deleteModel(java.lang.String modelName) throws com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, SessionNotFoundException
modelName
- -- the public URI identifying the model to be deletedjava.io.IOException
com.ge.research.sadl.reasoner.ConfigurationException
SessionNotFoundException
boolean updateRdfsLabel(java.lang.String uri, java.lang.String label, java.lang.String language) throws com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, com.ge.research.sadl.reasoner.InvalidNameException, java.net.URISyntaxException
uri
- -- uri identifying Resource for which the label is to be added or updatedlabel
- -- the new labellanguage
- -- the language to be updated; if null update any labelcom.ge.research.sadl.reasoner.ConfigurationException
java.net.URISyntaxException
com.ge.research.sadl.reasoner.InvalidNameException
java.io.IOException
boolean updateRdfsLabel(java.lang.String modelName, java.lang.String uri, java.lang.String label, java.lang.String language) throws com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, com.ge.research.sadl.reasoner.InvalidNameException, java.net.URISyntaxException
modelName
- -- the public URI identifying the model to be editeduri
- -- uri identifying Resource for which the label is to be added or updatedlabel
- -- the new labellanguage
- -- the language to be updated; if null update any labeljava.net.URISyntaxException
com.ge.research.sadl.reasoner.InvalidNameException
java.io.IOException
com.ge.research.sadl.reasoner.ConfigurationException
com.ge.research.sadl.reasoner.ResultSet ask(java.lang.String modelName, java.lang.String subjName, java.lang.String propName, java.lang.Object objValue) throws com.ge.research.sadl.reasoner.TripleNotFoundException, com.ge.research.sadl.reasoner.ReasonerNotFoundException, com.ge.research.sadl.reasoner.QueryCancelledException, SessionNotFoundException, java.io.IOException, com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.InvalidNameException, java.net.URISyntaxException
modelName
- -- the public URI identifying the model to be editedsubjName
- propName
- objValue
- com.ge.research.sadl.reasoner.QueryCancelledException
com.ge.research.sadl.reasoner.TripleNotFoundException
com.ge.research.sadl.reasoner.ReasonerNotFoundException
SessionNotFoundException
java.net.URISyntaxException
com.ge.research.sadl.reasoner.InvalidNameException
com.ge.research.sadl.reasoner.ConfigurationException
java.io.IOException
com.ge.research.sadl.reasoner.ResultSet query(java.lang.String modelName, java.lang.String query) throws com.ge.research.sadl.reasoner.QueryCancelledException, com.ge.research.sadl.reasoner.QueryParseException, com.ge.research.sadl.reasoner.ReasonerNotFoundException, SessionNotFoundException, java.io.IOException, com.ge.research.sadl.reasoner.ConfigurationException, com.ge.research.sadl.reasoner.InvalidNameException, java.net.URISyntaxException
modelName
- -- the public URI identifying the model to be editedquery
- a query stringcom.ge.research.sadl.reasoner.QueryCancelledException
com.ge.research.sadl.reasoner.QueryParseException
com.ge.research.sadl.reasoner.ReasonerNotFoundException
SessionNotFoundException
java.net.URISyntaxException
com.ge.research.sadl.reasoner.InvalidNameException
com.ge.research.sadl.reasoner.ConfigurationException
java.io.IOException