|
||||||||||
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.RRGImpl
public abstract class RRGImpl
Implementation of RRG interface
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 |
mutable
A flag indicating whether this RRG is mutable. |
private java.util.Map<SSWAPNode,SSWAPNode> |
translatedNodes
|
Fields inherited from class info.sswap.impl.empire.model.SourceModelImpl |
---|
SSWAP_ONTOLOGY_URI |
Constructor Summary | |
---|---|
RRGImpl()
|
Method Summary | |
---|---|
void |
addImport(java.net.URI uri)
Adds an import to the list of OWL imports of this model. |
private void |
assertMutable()
|
private void |
copyDeclaredTypes(SSWAPObject srcObject,
SSWAPObject dstObject)
Copy types from one SSWAPObject onto another SSWAPObject |
private void |
copyObjectToObject(SSWAPObject src,
SSWAPObject dst)
|
private void |
copyObjectToSubject(SSWAPObject object,
SSWAPSubject subject,
SSWAPProtocol protocolDoc)
|
SSWAPGraph |
createGraph()
Creates a graph that will be associated with this SSWAPModel. |
SSWAPObject |
createObject()
Creates an anonymous object (blank node) that will be associated with this SSWAPModel. |
SSWAPObject |
createObject(java.net.URI uri)
Creates an object of the resource URI that will be associated with this SSWAPModel. |
SSWAPResource |
createResource(java.net.URI uri)
Creates a new ResourceImpl in this protocol graph |
RIG |
createRIG(RDG rdg)
Returns a new Resource Invocation Graph ( RIG ) based on the
contents of this Resource Response Graph (RRG ) suitable for
the service represented by the Resource Description Graph
(RRG ). |
private java.util.Collection<SSWAPObject> |
createRIGObjects(RIG rig,
java.util.Collection<SSWAPObject> templateObjects)
|
RQG |
createRQG()
|
SSWAPSubject |
createSubject()
Creates an anonymous object (blank node) subject that will be associated with this SSWAPModel. |
private SSWAPSubject |
createSubject(SSWAPObject object,
RIG rig,
java.util.Map<java.net.URI,SSWAPSubject> subjectCache)
|
SSWAPSubject |
createSubject(java.net.URI uri)
Creates a subject of the resource URI that will be associated with this SSWAPModel. |
private java.util.Collection<SSWAPObject> |
getAllObjects()
|
private static java.util.Collection<SSWAPObject> |
getAllObjects(SSWAPGraph graph)
|
private java.util.Collection<SSWAPSubject> |
getAllRIGSubjects(RIG rig)
|
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) |
protected ProtocolImpl.MappingValidator<SSWAPObject> |
getObjectMappingValidator()
|
protected java.util.Map<SSWAPNode,SSWAPNode> |
getTranslationMap()
Gets the translation map for implementations of Protocol Graphs that support translation. |
boolean |
isMutable()
Checks whether this object is mutable. |
private SSWAPSubject |
selectTemplateSubject(java.util.Collection<SSWAPSubject> subjects,
SSWAPObject rrgObject)
|
(package private) void |
setMutable(boolean mutable)
Sets whether this object is mutable. |
void |
setNsPrefix(java.lang.String prefix,
java.net.URI uri)
Sets a namespace prefix that will be used in serialization of this model. |
protected boolean |
supportsTranslation()
Checks whether the particular implementation of Protocol Graph supports translation of terms (e.g., RIG) |
void |
validateAgainstRDG(RDG rdg)
In addition to the regular validation (provided by the superclass), it also performs computation of type triples for objects in RRG. |
protected boolean |
validatesObjects()
|
Methods inherited from class info.sswap.impl.empire.model.ProtocolImpl |
---|
anonymizeSSWAPNodes, closeWorld, createCopyObject, dereference, doClosure, getGraph, getMappings, getObject, getObjectMappings, getPattern, getProvider, getResource, getResourceMappingValidator, getResources, getSubject, getSubjectMappings, getSubjectMappingValidator, isMultiGraphs, isPattern, needsClosedWorldForValidation, needsDefaultParametersSet, serialize, setMatchingGraphs, uncloseWorld, validate, validate, validatesResourceURIMatch |
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 |
---|
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 |
---|
checkProfile, dereference, dereference, doClosure, getDocument, getImports, getInputStream, getNsPrefixMap, getReasoningService, getTypeSignature, getURI, isDereferenced, removeImport, removeNsPrefix, serialize, serialize, 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 boolean mutable
private java.util.Map<SSWAPNode,SSWAPNode> translatedNodes
Constructor Detail |
---|
public RRGImpl()
Method Detail |
---|
private void assertMutable()
protected boolean supportsTranslation()
ProtocolImpl
supportsTranslation
in class ProtocolImpl
protected java.util.Map<SSWAPNode,SSWAPNode> getTranslationMap()
ProtocolImpl
getTranslationMap
in class ProtocolImpl
void setMutable(boolean mutable)
mutable
- true, if the object should be mutable, false otherwisepublic boolean isMutable()
public void setNsPrefix(java.lang.String prefix, java.net.URI uri)
SSWAPModel
setNsPrefix
in interface SSWAPModel
setNsPrefix
in interface SourceModel
setNsPrefix
in class SourceModelImpl
prefix
- the prefixuri
- the corresponding URIpublic void addImport(java.net.URI uri)
ModelImpl
addImport
in interface SSWAPModel
addImport
in interface SourceModel
addImport
in class SourceModelImpl
uri
- the URI of the import to be addedpublic SSWAPGraph createGraph()
SSWAPProtocol
Note: creating a graph does not assign it to the
SSWAPResource
; see
SSWAPResource.setGraph(SSWAPGraph)
variant methods to assign a
graph to the resource.
createGraph
in interface SSWAPProtocol
createGraph
in class ProtocolImpl
public SSWAPSubject createSubject()
SSWAPProtocol
Note: creating a subject does not assign it to a SSWAPGraph
;
see SSWAPGraph.setSubject(SSWAPSubject)
and variant methods to assign a subject to a
graph.
createSubject
in interface SSWAPProtocol
createSubject
in class ProtocolImpl
public SSWAPSubject createSubject(java.net.URI uri)
SSWAPProtocol
uri
is null
it creates an
anonymous subject (blank node).
Note: creating a subject does not assign it to a SSWAPGraph
;
see SSWAPGraph.setSubject(SSWAPSubject)
and variant methods to assign a subject to a
graph.
createSubject
in interface SSWAPProtocol
createSubject
in class ProtocolImpl
uri
- URI of the resource
public SSWAPObject createObject()
SSWAPProtocol
Note: creating an object does not assign it to a
SSWAPSubject
; see
SSWAPSubject.addObject(SSWAPObject)
variant methods to assign an
object to a subject.
createObject
in interface SSWAPProtocol
createObject
in class ProtocolImpl
public SSWAPObject createObject(java.net.URI uri)
SSWAPProtocol
uri
is null
it creates an
anonymous object (blank node).
Note: creating an object does not assign it to a
SSWAPSubject
; see
SSWAPSubject.addObject(SSWAPObject)
variant methods to assign an
object to a subject.
createObject
in interface SSWAPProtocol
createObject
in class ProtocolImpl
uri
- the URI of the object
public SSWAPResource createResource(java.net.URI uri)
ProtocolImpl
createResource
in class ProtocolImpl
uri
- the URI of the resource to be created
private SSWAPSubject createSubject(SSWAPObject object, RIG rig, java.util.Map<java.net.URI,SSWAPSubject> subjectCache)
private SSWAPSubject selectTemplateSubject(java.util.Collection<SSWAPSubject> subjects, SSWAPObject rrgObject)
private java.util.Collection<SSWAPObject> createRIGObjects(RIG rig, java.util.Collection<SSWAPObject> templateObjects)
private java.util.Collection<SSWAPObject> getAllObjects()
private java.util.Collection<SSWAPSubject> getAllRIGSubjects(RIG rig)
public RIG createRIG(RDG rdg) throws DataAccessException
RRG
RIG
) based on the
contents of this Resource Response Graph (RRG
) suitable for
the service represented by the Resource Description Graph
(RRG
). This allows the output of one service to become the
input to another service. Conversion involves transferring the
SSWAPObject
s of the RRG
into
SSWAPSubject
s of the RIG
and updating the
SSWAPResource
.
createRIG
in interface RRG
rdg
- service for which to create the RIG
RIG
suitable for invocation
DataAccessException
- on inability to create a pre-transformed RIG
for
the RDG
private static java.util.Collection<SSWAPObject> getAllObjects(SSWAPGraph graph)
private void copyObjectToObject(SSWAPObject src, SSWAPObject dst)
private void copyObjectToSubject(SSWAPObject object, SSWAPSubject subject, SSWAPProtocol protocolDoc)
public java.lang.String getGraphType()
ProtocolImpl
getGraphType
in class ProtocolImpl
public void validateAgainstRDG(RDG rdg) throws ValidationException
validateAgainstRDG
in class ProtocolImpl
rdg
- RDG against which to validate
ValidationException
- if validation failsprivate void copyDeclaredTypes(SSWAPObject srcObject, SSWAPObject dstObject)
srcObject
- source objectdstObject
- destination objectpublic RQG createRQG()
createRQG
in interface RRG
protected boolean validatesObjects()
validatesObjects
in class ProtocolImpl
protected ProtocolImpl.MappingValidator<SSWAPObject> getObjectMappingValidator()
getObjectMappingValidator
in class ProtocolImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |