|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.impl.empire.APIProviderImpl
public class APIProviderImpl
Provides implementation of the API that is called by SSWAP factory class. This class is implemented as a singleton. Normal access to the instance is provided via the get() static method.
Field Summary | |
---|---|
private static APIProviderImpl |
instance
The instance singleton instance of this class. |
Constructor Summary | |
---|---|
private |
APIProviderImpl()
Private constructor (following singleton design pattern). |
Method Summary | ||
---|---|---|
com.hp.hpl.jena.rdf.model.Model |
asJenaModel(SSWAPModel model)
Returns the representation of the given SSWAPModel using Jena interface |
|
private void |
clearIndividual(SSWAPIndividual individual)
|
|
protected
|
clone(T original,
java.lang.Class<T> clazz)
|
|
SSWAPElement |
copyElement(SSWAPDocument dstDocument,
SSWAPElement element)
|
|
RDG |
createCompositeService(java.net.URI serviceURI,
java.lang.String name,
java.lang.String description,
java.net.URI providerURI,
RDG firstService,
RDG lastService)
|
|
|
createDocument(com.hp.hpl.jena.rdf.model.Model model,
java.lang.Class<T> clazz)
|
|
|
createDocument(com.hp.hpl.jena.rdf.model.Model model,
java.lang.Class<T> clazz,
java.net.URI uri)
|
|
PDG |
createPDG(java.net.URI providerURI,
java.lang.String name,
java.lang.String oneLineDescription)
Creates a new PDG (Provider Description Graph). |
|
SSWAPProvider |
createProvider(java.net.URI uri)
Gets an undereferenced SSWAPProvider implementation |
|
RDG |
createRDG(java.net.URI resourceURI,
java.lang.String name,
java.lang.String oneLineDescription,
java.net.URI providerURI)
Creates a new RDG object. |
|
SSWAPResource |
createResource(java.net.URI uri)
Gets an undereferenced SSWAPResource implementation |
|
RQG |
createRQG(java.net.URI resourceURI)
Creates a basic RQG from scratch. |
|
SSWAPDocument |
createSSWAPDocument(java.net.URI uri)
Creates an empty SSWAPModel. |
|
private java.util.Collection<SSWAPObject> |
generateCompositeServiceObjects(RDG lastService,
RDG result)
|
|
private java.util.Collection<SSWAPSubject> |
generateCompositeServiceSubjects(RDG firstService,
RDG lastService,
RDG result)
|
|
RQG |
generateRQG(RDG upstreamService,
RDG downstreamService)
|
|
RQG |
generateRQG(RDG upstreamService,
RDG downstreamService,
java.net.URI resultURI)
|
|
private java.util.Collection<SSWAPObject> |
generateRQGObjects(RDG downstreamService,
RQG rqg)
|
|
private java.util.Collection<SSWAPSubject> |
generateRQGSubjects(RDG upstreamService,
RDG downstreamService,
RQG rqg)
|
|
static APIProviderImpl |
get()
The getter method for the singleton instance. |
|
RIG |
getAsyncRIG(java.net.URI serviceURI,
java.net.URI upstreamRRG)
|
|
Cache |
getCache()
|
|
SSWAPDocument |
getClosureDocument(SSWAPDocument document)
|
|
private
|
getImplementationClass(java.lang.Class<S> interfaceClass)
Gets the implementation of a specific SSWAPProtocol interface |
|
SSWAPDocument |
getInferredABox(SSWAPDocument document)
Gets the document that contains the ABox of this document (including both inferred and asserted statements). |
|
SSWAPDocument |
getInferredDocument(SSWAPDocument document)
|
|
SSWAPDocument |
getInferredTBox(SSWAPDocument document)
Gets the document that contains the TBox of this document (including both inferred and asserted statements). |
|
java.util.Collection<java.lang.String> |
getInferredTypeURIs(SSWAPIndividual individual)
|
|
PDG |
getPDG(java.net.URI uri)
Gets an undereferenced PDG implementation. |
|
RDG |
getRDG(java.net.URI uri)
Gets a dereferenced RDG implementation |
|
|
getResourceGraph(java.io.InputStream is,
java.lang.Class<T> clazz,
java.net.URI uri)
Creates a SSWAPDocument graph from its serialization in an input stream. |
|
RQG |
getRQG(java.io.InputStream is)
Reads an RQG from an input stream. |
|
|
getUntranslatedNode(T translatedNode)
|
|
RQG |
inputOnlyRQG(RQG rqg)
|
|
private static boolean |
isEmptyObject(SSWAPObject object)
|
|
private static boolean |
isEmptySubject(SSWAPSubject subject)
|
|
boolean |
isUnrestricted(RQG rqg)
|
|
RQG |
outputOnlyRQG(RQG rqg)
|
|
void |
setClosureEnabled(SSWAPDocument document,
boolean enabled)
|
|
void |
setExplanationSyntax(java.lang.String explanationSyntax)
|
|
void |
setMaxClosureBytes(SSWAPModel model,
long byteLimit)
Sets a model-specific byte limit to retrieve the closure |
|
void |
setMaxClosureThreads(SSWAPModel model,
int threads)
Sets a model-specific limit on the number of threads used to retrieve the closure |
|
void |
setMaxClosureTime(SSWAPModel model,
long timeLimit)
Sets a model-specific time limit to retrieve the closure |
|
void |
setValueValidation(SSWAPDocument document,
boolean enabled)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final APIProviderImpl instance
Constructor Detail |
---|
private APIProviderImpl()
Method Detail |
---|
public static APIProviderImpl get()
public PDG getPDG(java.net.URI uri) throws DataAccessException
APIProvider
getPDG
in interface APIProvider
uri
- URI of the PDG
DataAccessException
public SSWAPProvider createProvider(java.net.URI uri) throws DataAccessException
APIProvider
createProvider
in interface APIProvider
uri
- URI of the provider
DataAccessException
public RDG getRDG(java.net.URI uri) throws DataAccessException
APIProvider
getRDG
in interface APIProvider
uri
- URI of the RDG
DataAccessException
- if an error should occur while trying to access RDG's datapublic SSWAPResource createResource(java.net.URI uri) throws DataAccessException
APIProvider
createResource
in interface APIProvider
uri
- URI of the Resource
DataAccessException
public RDG createRDG(java.net.URI resourceURI, java.lang.String name, java.lang.String oneLineDescription, java.net.URI providerURI) throws DataAccessException
APIProvider
createRDG
in interface APIProvider
resourceURI
- the URI of the SSWAP Resource (and the RDG itself)name
- the name of the service described in this RDGoneLineDescription
- a short description of the RDGproviderURI
- an URI of the provider of this service
DataAccessException
public RQG getRQG(java.io.InputStream is) throws DataAccessException
APIProvider
getRQG
in interface APIProvider
is
- the input stream containing the representation of the RQG
DataAccessException
public RQG createRQG(java.net.URI resourceURI) throws DataAccessException
APIProvider
createRQG
in interface APIProvider
resourceURI
- the URI of the resource in the RQG; may be null for anonymous resources
DataAccessException
public SSWAPDocument createSSWAPDocument(java.net.URI uri) throws DataAccessException
APIProvider
createSSWAPDocument
in interface APIProvider
uri
- the URI of the SSWAP model
DataAccessException
public PDG createPDG(java.net.URI providerURI, java.lang.String name, java.lang.String oneLineDescription) throws DataAccessException
APIProvider
createPDG
in interface APIProvider
providerURI
- the URI of the SSWAP Provider (and the PDG itself)name
- the name of the provider described in this PDGoneLineDescription
- the one line description of the provider
DataAccessException
private <S extends SSWAPDocument> java.lang.Class<? extends SourceModelImpl> getImplementationClass(java.lang.Class<S> interfaceClass)
S
- the interfaceinterfaceClass
- the interface class
public <T extends SSWAPDocument> T getResourceGraph(java.io.InputStream is, java.lang.Class<T> clazz, java.net.URI uri) throws DataAccessException
APIProvider
getResourceGraph
in interface APIProvider
T
- the template parameter that specifies the type of SSWAPDocument graph to be created (e.g., RDG, RIG, etc.).is
- the input stream from which the contents of the graph should be readclazz
- the Java Class object that identifies the type of SSWAPDocument graph (and provides the instantiation
for the template parameter; e.g., RDG.class, RIG.class, etc.)uri
- the URI to dereference to obtain the graph
DataAccessException
- on parsing or other data errorpublic com.hp.hpl.jena.rdf.model.Model asJenaModel(SSWAPModel model) throws java.lang.UnsupportedOperationException
APIProvider
asJenaModel
in interface APIProvider
model
- the SSWAPModel
java.lang.UnsupportedOperationException
- if the specified provider does not support this featurepublic SSWAPDocument getInferredABox(SSWAPDocument document) throws java.lang.UnsupportedOperationException
APIProvider
getInferredABox
in interface APIProvider
document
- source SSWAPDocument
java.lang.UnsupportedOperationException
- if the specified provider does not support this featurepublic SSWAPDocument getInferredTBox(SSWAPDocument document) throws java.lang.UnsupportedOperationException
APIProvider
getInferredTBox
in interface APIProvider
document
- source SSWAPDocument
java.lang.UnsupportedOperationException
- if the specified provider does not support this featurepublic void setMaxClosureBytes(SSWAPModel model, long byteLimit) throws java.lang.UnsupportedOperationException
APIProvider
setMaxClosureBytes
in interface APIProvider
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 void setMaxClosureThreads(SSWAPModel model, int threads) throws java.lang.UnsupportedOperationException
APIProvider
setMaxClosureThreads
in interface APIProvider
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 void setMaxClosureTime(SSWAPModel model, long timeLimit) throws java.lang.UnsupportedOperationException
APIProvider
setMaxClosureTime
in interface APIProvider
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 <T extends SSWAPDocument> T createDocument(com.hp.hpl.jena.rdf.model.Model model, java.lang.Class<T> clazz) throws java.lang.UnsupportedOperationException
createDocument
in interface APIProvider
java.lang.UnsupportedOperationException
public <T extends SSWAPDocument> T createDocument(com.hp.hpl.jena.rdf.model.Model model, java.lang.Class<T> clazz, java.net.URI uri) throws java.lang.UnsupportedOperationException
createDocument
in interface APIProvider
java.lang.UnsupportedOperationException
public SSWAPDocument getClosureDocument(SSWAPDocument document) throws java.lang.UnsupportedOperationException
getClosureDocument
in interface APIProvider
java.lang.UnsupportedOperationException
public SSWAPDocument getInferredDocument(SSWAPDocument document) throws java.lang.UnsupportedOperationException
getInferredDocument
in interface APIProvider
java.lang.UnsupportedOperationException
public void setExplanationSyntax(java.lang.String explanationSyntax) throws java.lang.UnsupportedOperationException
setExplanationSyntax
in interface APIProvider
java.lang.UnsupportedOperationException
public RQG generateRQG(RDG upstreamService, RDG downstreamService) throws java.lang.UnsupportedOperationException
generateRQG
in interface APIProvider
java.lang.UnsupportedOperationException
public RQG generateRQG(RDG upstreamService, RDG downstreamService, java.net.URI resultURI) throws java.lang.UnsupportedOperationException
generateRQG
in interface APIProvider
java.lang.UnsupportedOperationException
private java.util.Collection<SSWAPSubject> generateRQGSubjects(RDG upstreamService, RDG downstreamService, RQG rqg)
private java.util.Collection<SSWAPObject> generateRQGObjects(RDG downstreamService, RQG rqg)
public RIG getAsyncRIG(java.net.URI serviceURI, java.net.URI upstreamRRG) throws DataAccessException
getAsyncRIG
in interface APIProvider
DataAccessException
public SSWAPElement copyElement(SSWAPDocument dstDocument, SSWAPElement element) throws java.lang.UnsupportedOperationException
copyElement
in interface APIProvider
java.lang.UnsupportedOperationException
public Cache getCache()
getCache
in interface APIProvider
public void setValueValidation(SSWAPDocument document, boolean enabled) throws java.lang.UnsupportedOperationException
setValueValidation
in interface APIProvider
java.lang.UnsupportedOperationException
public void setClosureEnabled(SSWAPDocument document, boolean enabled) throws java.lang.UnsupportedOperationException
setClosureEnabled
in interface APIProvider
java.lang.UnsupportedOperationException
public java.util.Collection<java.lang.String> getInferredTypeURIs(SSWAPIndividual individual) throws java.lang.UnsupportedOperationException
getInferredTypeURIs
in interface APIProvider
java.lang.UnsupportedOperationException
public 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
createCompositeService
in interface APIProvider
java.lang.UnsupportedOperationException
private java.util.Collection<SSWAPSubject> generateCompositeServiceSubjects(RDG firstService, RDG lastService, RDG result)
private java.util.Collection<SSWAPObject> generateCompositeServiceObjects(RDG lastService, RDG result)
protected <T extends SSWAPDocument> T clone(T original, java.lang.Class<T> clazz)
private void clearIndividual(SSWAPIndividual individual)
public RQG inputOnlyRQG(RQG rqg) throws java.lang.UnsupportedOperationException
inputOnlyRQG
in interface APIProvider
java.lang.UnsupportedOperationException
public RQG outputOnlyRQG(RQG rqg) throws java.lang.UnsupportedOperationException
outputOnlyRQG
in interface APIProvider
java.lang.UnsupportedOperationException
public boolean isUnrestricted(RQG rqg) throws java.lang.UnsupportedOperationException
isUnrestricted
in interface APIProvider
java.lang.UnsupportedOperationException
private static boolean isEmptySubject(SSWAPSubject subject)
private static boolean isEmptyObject(SSWAPObject object)
public <T extends SSWAPNode> T getUntranslatedNode(T translatedNode) throws java.lang.UnsupportedOperationException
getUntranslatedNode
in interface APIProvider
java.lang.UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |