|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.api.spi.ExtensionAPI
public class ExtensionAPI
An API for extensions of the basic SSWAP API. These are methods primarily for advanced users to aid in debugging. The methods in this API may not be be implemented by all API providers.
Constructor Summary | |
---|---|
ExtensionAPI()
|
Method Summary | ||
---|---|---|
static com.hp.hpl.jena.rdf.model.Model |
asJenaModel(SSWAPModel model)
Returns the representation of the given SSWAPModel using Jena interface |
|
static SSWAPElement |
copyElement(SSWAPDocument dstDocument,
SSWAPElement element)
Performs a deep copy of an element, possibly to another document. |
|
static RDG |
createCompositeService(java.net.URI serviceURI,
java.lang.String name,
java.lang.String description,
java.net.URI providerURI,
RDG firstService,
RDG lastService)
|
|
static
|
createDocument(com.hp.hpl.jena.rdf.model.Model model,
java.lang.Class<T> clazz)
Creates a SSWAP document from the specified Jena model. |
|
static
|
createDocument(com.hp.hpl.jena.rdf.model.Model model,
java.lang.Class<T> clazz,
java.net.URI uri)
Creates a SSWAP document from the specified Jena model with the specified URI |
|
static RQG |
generateRQG(RDG upstreamService,
RDG downstreamService)
|
|
static RQG |
generateRQG(RDG upstreamService,
RDG downstreamService,
java.net.URI resultURI)
|
|
static RIG |
getAsyncRIG(java.net.URI serviceURI,
java.net.URI upstreamRRG)
|
|
static SSWAPDocument |
getClosureDocument(SSWAPDocument document)
Gets the SSWAPDocument that contains the closure of the specified document. |
|
static SSWAPDocument |
getInferredABox(SSWAPDocument document)
Gets the document that contains the ABox of this document (including both inferred and asserted statements). |
|
static SSWAPDocument |
getInferredDocument(SSWAPDocument document)
Gets the SSWAPDocument that contains all the inferred facts for the specified document (and subsequently it also contains its closure, which is required to compute the inferred facts). |
|
static SSWAPDocument |
getInferredTBox(SSWAPDocument document)
Gets the document that contains the TBox of this document (including both inferred and asserted statements). |
|
static java.util.Collection<java.lang.String> |
getInferredTypeURIs(SSWAPIndividual individual)
|
|
static
|
getUntranslatedNode(T translatedNode)
Return the source node ( SSWAPResource or SSWAPSubject )
from which the translatedNode was derived. |
|
static RQG |
inputOnlyRQG(RQG rqg)
|
|
static boolean |
isUnrestricted(RQG rqg)
|
|
static RQG |
outputOnlyRQG(RQG rqg)
|
|
static void |
setClosureEnabled(SSWAPDocument document,
boolean enabled)
Sets flag whether this source model will perform the closure to deliver terms to its reasoning service, or whether the reasoning service should solely rely on terms in this source model. |
|
static void |
setExplanationSyntax(java.lang.String explanationSyntax)
Sets the syntax in which explanations will be provided, if reasoning service finds an inconsistent ontology. |
|
static void |
setMaxClosureBytes(SSWAPModel model,
long byteLimit)
Sets a model-specific byte limit to retrieve the closure |
|
static void |
setMaxClosureThreads(SSWAPModel model,
int threads)
Sets a model-specific limit on the number of threads used to retrieve the closure |
|
static void |
setMaxClosureTime(SSWAPModel model,
long timeLimit)
Sets a model-specific time limit to retrieve the closure |
|
static void |
setValueValidation(SSWAPDocument document,
boolean enabled)
Turns on/off value validation performed when setting values of properties for SSWAPIndividual. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtensionAPI()
Method Detail |
---|
public static SSWAPDocument getInferredTBox(SSWAPDocument document)
document
- The source document from which to get the inferred TBox
public static SSWAPDocument getInferredABox(SSWAPDocument document)
document
- The source document from which to get the inferred ABox
public static SSWAPDocument getClosureDocument(SSWAPDocument document)
document
- the closure document
public static SSWAPDocument getInferredDocument(SSWAPDocument document)
document
- the documents for which all the inferred facts should be retrieved
public static com.hp.hpl.jena.rdf.model.Model asJenaModel(SSWAPModel model)
model
- the SSWAPModel
public static <T extends SSWAPDocument> T createDocument(com.hp.hpl.jena.rdf.model.Model model, java.lang.Class<T> clazz)
T
- template parameter to specify the desired document typemodel
- Jena model that will be the source of triples for the documentclazz
- the name of the interface (e.g., SSWAPDocument.class or RDG.class) for the requested document
public static <T extends SSWAPDocument> T createDocument(com.hp.hpl.jena.rdf.model.Model model, java.lang.Class<T> clazz, java.net.URI uri)
T
- template parameter to specify the desired document typemodel
- Jena model that will be the source of triples for the documentclazz
- the name of the interface (e.g., SSWAPDocument.class or RDG.class) for the requested documenturi
- the URI of the generated document (matters only for SSWAPProtocol documents)
public static void setMaxClosureBytes(SSWAPModel model, long byteLimit) throws java.lang.UnsupportedOperationException
model
- the model for which the limit should be setbyteLimit
- the maximum number of bytes to retrieve the closure, or -1 to remove any
previous model-specific limit (a system-wide limit will be used for this model)
java.lang.UnsupportedOperationException
- if the operation is not supported by this API Implementationpublic static void setMaxClosureThreads(SSWAPModel model, int threads) throws java.lang.UnsupportedOperationException
model
- the model for which the limit should be setthreads
- the number of threads, or -1 to remove any previous model-specific limit
(a system-wide limit will be used for this model)
java.lang.UnsupportedOperationException
- if the operation is not supported by this API Implementationpublic static void setMaxClosureTime(SSWAPModel model, long timeLimit) throws java.lang.UnsupportedOperationException
model
- the model for which the limit should be settimeLimit
- the maximum number of milliseconds to retrieve the closure, or -1 to remove any
previous model-specific limit (a system-wide limit will be used for this model)
java.lang.UnsupportedOperationException
- if the operation is not supported by this API Implementationpublic static void setExplanationSyntax(java.lang.String explanationSyntax) throws java.lang.UnsupportedOperationException
explanationSyntax
- the desired syntax
java.lang.UnsupportedOperationException
- if the operation is not supported by this API implementationpublic static RQG generateRQG(RDG upstreamService, RDG downstreamService) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static RQG generateRQG(RDG upstreamService, RDG downstreamService, java.net.URI resultURI) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static RIG getAsyncRIG(java.net.URI serviceURI, java.net.URI upstreamRRG) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static SSWAPElement copyElement(SSWAPDocument dstDocument, SSWAPElement element) throws java.lang.UnsupportedOperationException
dstDocument
- the document where the copy should be placed.element
- the element to be copied.
java.lang.UnsupportedOperationException
- if the operation is not supported by this API implementationpublic static void setValueValidation(SSWAPDocument document, boolean enabled) throws java.lang.UnsupportedOperationException
document
- the document in which the validation should be turned on/offenabled
- true if the validation should be turned on, false, if the validation should be turned off
java.lang.UnsupportedOperationException
public static void setClosureEnabled(SSWAPDocument document, boolean enabled) throws java.lang.UnsupportedOperationException
document
- the document in which the closure would be turned on or offenabled
- true if the closure computation should be turned on, false, if the closure computation should be turned off
java.lang.UnsupportedOperationException
public static java.util.Collection<java.lang.String> getInferredTypeURIs(SSWAPIndividual individual) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static RDG createCompositeService(java.net.URI serviceURI, java.lang.String name, java.lang.String description, java.net.URI providerURI, RDG firstService, RDG lastService) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static RQG inputOnlyRQG(RQG rqg) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static RQG outputOnlyRQG(RQG rqg) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static boolean isUnrestricted(RQG rqg) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static <T extends SSWAPNode> T getUntranslatedNode(T translatedNode) throws java.lang.UnsupportedOperationException
SSWAPResource
or SSWAPSubject
)
from which the translatedNode
was derived. If the translatedNode
was not
actually translated (i.e. is an untranslated SSWAPNode
), then it itself is returned.
T
- SSWAPResource
or SSWAPSubject
translatedNode
- translated individual for which its source is sought
RIG
SSWAPResource
or SSWAPSubject
)
java.lang.UnsupportedOperationException
- upon an error retrieving the translation from the API providerRIG#translate(SSWAPNode)}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |