|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.sswap.impl.empire.model.ModelImpl
info.sswap.impl.empire.model.SourceModelImpl
info.sswap.impl.empire.model.ProtocolImpl
info.sswap.impl.empire.model.RIGImpl
public abstract class RIGImpl
Implementation of RIG.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class info.sswap.impl.empire.model.ProtocolImpl |
|---|
ProtocolImpl.DefaultMappingValidator<T extends SSWAPNode>, ProtocolImpl.MappingValidator<T> |
| Nested classes/interfaces inherited from interface com.clarkparsia.empire.SupportsRdfId |
|---|
com.clarkparsia.empire.SupportsRdfId.BNodeKey, com.clarkparsia.empire.SupportsRdfId.RdfKey<T>, com.clarkparsia.empire.SupportsRdfId.URIKey |
| Field Summary | |
|---|---|
private boolean |
clientSideTranslation
|
private java.util.Collection<SSWAPGraph> |
matchingGraphs
|
private RDG |
rdg
|
private java.util.Map<SSWAPNode,SSWAPNode> |
translatedNodes
|
| Fields inherited from class info.sswap.impl.empire.model.SourceModelImpl |
|---|
SSWAP_ONTOLOGY_URI |
| Constructor Summary | |
|---|---|
RIGImpl()
|
|
| Method Summary | ||
|---|---|---|
private HTTPAPIImpl.RRGResponse |
doInvoke(java.lang.Long timeout)
Invokes the service with this RIG and the specified connect/read timeout (if provided). |
|
java.lang.String |
getGraphType()
Gets the human readable name of the particular graph implementation (e.g., RDG, RQG, RIG, RRG) This method is mostly provided to generate meaningful messages in exceptions (rather than to include class name, which may not be familiar to most users) |
|
java.util.Collection<SSWAPGraph> |
getMatchingGraphs()
|
|
(package private) RDG |
getRDG()
|
|
RRG |
getRRG()
Gets the RRG that can be used to create a response to the RIG. |
|
RRG |
getRRG(java.io.InputStream is)
Creates an RRG based on the serialized RRG data (e.g., sent by a provider of the service in response to this RIG having been sent to the provider). |
|
SSWAPResource |
getTranslatedResource()
Returns a read-only copy of the SSWAPResource with
properties and types of this RIG translated into the
vocabulary of the RDG. |
|
java.util.Collection<SSWAPSubject> |
getTranslatedSubjects()
Returns a read-only copy of the SSWAPSubject from all
matching SSWAPGraphs with properties and types of this
RIG translated into the vocabulary of the RDG. |
|
protected java.util.Map<SSWAPNode,SSWAPNode> |
getTranslationMap()
Gets the translation map for implementations of Protocol Graphs that support translation. |
|
HTTPAPIImpl.RRGResponse |
invoke()
Invokes the service with this RIG, blocks until the service responds, and reads back the RRG. |
|
HTTPAPIImpl.RRGResponse |
invoke(long timeout)
Invokes the service with this RIG, blocks until the service responds, and reads back the RRG |
|
(package private) void |
setClientSideTranslation(boolean clientSideTranslation)
|
|
protected void |
setMatchingGraphs(java.util.Collection<SSWAPGraph> matchingGraphs)
|
|
(package private) void |
setRDG(RDG rdg)
|
|
protected boolean |
supportsTranslation()
Checks whether the particular implementation of Protocol Graph supports translation of terms (e.g., RIG) |
|
|
translate(T node)
Translates a SSWAPNode in this RIG to the vocabulary used by the RDG (the translation only makes sense for SSWAPResources and SSWAPSubjects; for all others the nodes are returned unmodified). |
|
| Methods inherited from class info.sswap.impl.empire.model.ModelImpl |
|---|
assertModel, assertSourceModel, getAllDependentObjects, getDependentObject, getDocument, getExpressivity, getInputStream, getSourceModel, getTypeSignature, getURI, hasSourceModel, hasSourceModelWithEntityManager, isDereferenced, rdfIdEquals, rdfIdHashCode, refreshSiblings, setDereferenced, setSourceModel, setURI |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface info.sswap.api.model.SSWAPProtocol |
|---|
createGraph, createObject, createObject, createSubject, createSubject, getMappings, getProvider, getResource, isMultiGraphs, isPattern |
| Methods inherited from interface info.sswap.api.model.SSWAPDocument |
|---|
createAnonymousDatatype, createAnonymousType, createIndividual, createIndividual, createIntersectionOf, createList, createLiteral, createTypedLiteral, createUnionOf, getDatatype, getPredicate, getType, newIndividual, newIndividual |
| Methods inherited from interface info.sswap.api.model.SSWAPModel |
|---|
addImport, checkProfile, dereference, dereference, doClosure, getDocument, getImports, getInputStream, getNsPrefixMap, getReasoningService, getTypeSignature, getURI, isDereferenced, removeImport, removeNsPrefix, serialize, serialize, setNsPrefix, validate |
| Methods inherited from interface info.sswap.impl.empire.model.SourceModel |
|---|
isDereferenced |
| Methods inherited from interface com.clarkparsia.empire.SupportsRdfId |
|---|
getRdfId, setRdfId |
| Field Detail |
|---|
private RDG rdg
private java.util.Map<SSWAPNode,SSWAPNode> translatedNodes
private java.util.Collection<SSWAPGraph> matchingGraphs
private boolean clientSideTranslation
| Constructor Detail |
|---|
public RIGImpl()
| Method Detail |
|---|
public java.util.Collection<SSWAPGraph> getMatchingGraphs()
protected void setMatchingGraphs(java.util.Collection<SSWAPGraph> matchingGraphs)
setMatchingGraphs in class ProtocolImpl
public RRG getRRG()
throws DataAccessException,
ValidationException
RIG
getRRG in interface RIGDataAccessException - if an error should occur while accessing the data in the RIG
to create the RRG
ValidationException - if the RRG is not valid with respect to the RIG invoking the
service
public RRG getRRG(java.io.InputStream is)
throws DataAccessException
RIG
getRRG in interface RIGis - the input stream from which the serialized RRG data can be read
DataAccessException - if an error should occur while reading the data (either an I/O error or problem parsing the data)RDG getRDG()
void setRDG(RDG rdg)
void setClientSideTranslation(boolean clientSideTranslation)
protected boolean supportsTranslation()
ProtocolImpl
supportsTranslation in class ProtocolImplprotected java.util.Map<SSWAPNode,SSWAPNode> getTranslationMap()
ProtocolImpl
getTranslationMap in class ProtocolImplpublic <T extends SSWAPNode> T translate(T node)
RIG
translate in interface RIGnode - the node that must belong to this RIG
public HTTPAPIImpl.RRGResponse invoke()
RIG
invoke in interface RIGpublic HTTPAPIImpl.RRGResponse invoke(long timeout)
RIG
invoke in interface RIGtimeout - connect and read timeout in milliseconds; if communication with the service should stall for more than the specified time
the call will be interrupted and the returned RRGResponse will contain the error code.
private HTTPAPIImpl.RRGResponse doInvoke(java.lang.Long timeout)
timeout - connect/read timeout in milliseconds (may be null; in such a case the default timeout
will be used as specified in Config's info.sswap.impl.empire.model.RIG_INVOCATION_TIMEOUT parameter).
public java.lang.String getGraphType()
ProtocolImpl
getGraphType in class ProtocolImplpublic SSWAPResource getTranslatedResource()
RIGSSWAPResource with
properties and types of this RIG translated into the
vocabulary of the RDG.
The translated resource contains only properties that are described in
the RDG (this includes using the name of a super-property,
if the RIG used a subproperty with respect to the
RDG), and types defined in the RDG.
getTranslatedResource in interface RIGpublic java.util.Collection<SSWAPSubject> getTranslatedSubjects()
RIGSSWAPSubject from all
matching SSWAPGraphs with properties and types of this
RIG translated into the vocabulary of the RDG.
The translated subjects contain only properties that are described in the
RDG (this includes using the name of a super-property, if
the RIG used a subproperty with respect to the
RDG ), and types defined in the RDG.
The special case of SSWAPSubject.addObject(SSWAPObject) and its
set() variants are not read-only and changes the underlying
SSWAPSubject.
getTranslatedSubjects in interface RIG
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||