info.sswap.api.model
Interface SSWAPProtocol

All Superinterfaces:
SSWAPDocument, SSWAPModel
All Known Subinterfaces:
RDG, RIG, RQG, RRG
All Known Implementing Classes:
ProtocolImpl, RDGImpl, RIGImpl, RQGImpl, RRGImpl

public interface SSWAPProtocol
extends SSWAPDocument

Common interface for all protocol graphs (RDG, RIG, RRG, etc.).

For more on the protocol, see SSWAP Protocol.

Author:
Blazej Bulka
See Also:
PDG, RDG, RIG, RRG, RQG

Method Summary
 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.
 SSWAPSubject createSubject()
          Creates an anonymous object (blank node) subject that will be associated with this SSWAPModel.
 SSWAPSubject createSubject(java.net.URI uri)
          Creates a subject of the resource URI that will be associated with this SSWAPModel.
 java.util.Map<SSWAPGraph,java.util.Collection<SSWAPSubject>> getMappings()
          Gets a map from SSWAPGraphs to SSWAPSubjects
 SSWAPProvider getProvider()
          Gets the SSWAP provider for this canonical graph (or more exactly the SSWAPProvider of the SSWAPResource in the file).
 SSWAPResource getResource()
          Gets the SSWAPResource in the file
 boolean isMultiGraphs()
          Checks whether this graph contains multiple SSWAPGraphs
 boolean isPattern(MappingPattern pattern)
          Checks whether this graph contains the specific mapping of subjects to objects.
 
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
 

Method Detail

getProvider

SSWAPProvider getProvider()
Gets the SSWAP provider for this canonical graph (or more exactly the SSWAPProvider of the SSWAPResource in the file).

Returns:
the SSWAPProvider object (may not be dereferenced)

getResource

SSWAPResource getResource()
Gets the SSWAPResource in the file

Returns:
gets the SSWAPResource defined in this file

getMappings

java.util.Map<SSWAPGraph,java.util.Collection<SSWAPSubject>> getMappings()
Gets a map from SSWAPGraphs to SSWAPSubjects

Returns:
the map of SSWAPGraphs to a collection of SSWAPSubjects

isPattern

boolean isPattern(MappingPattern pattern)
Checks whether this graph contains the specific mapping of subjects to objects.

Parameters:
pattern - the pattern to be checked
Returns:
true, if the graph contains that pattern

isMultiGraphs

boolean isMultiGraphs()
Checks whether this graph contains multiple SSWAPGraphs

Returns:
true if it contains more than one SSWAPGraph

createGraph

SSWAPGraph createGraph()
Creates a graph that will be associated with this SSWAPModel.

Note: creating a graph does not assign it to the SSWAPResource; see SSWAPResource.setGraph(SSWAPGraph) variant methods to assign a graph to the resource.

Returns:
the new SSWAPGraph

createSubject

SSWAPSubject createSubject()
Creates an anonymous object (blank node) subject that will be associated with this SSWAPModel.

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.

Returns:
the new SSWAPSubject

createSubject

SSWAPSubject createSubject(java.net.URI uri)
Creates a subject of the resource URI that will be associated with this SSWAPModel. If 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.

Parameters:
uri - URI of the resource
Returns:
the new SSWAPSubject

createObject

SSWAPObject createObject()
Creates an anonymous object (blank node) that will be associated with this SSWAPModel.

Note: creating an object does not assign it to a SSWAPSubject; see SSWAPSubject.addObject(SSWAPObject) variant methods to assign an object to a subject.

Returns:
the new SSWAPObject

createObject

SSWAPObject createObject(java.net.URI uri)
Creates an object of the resource URI that will be associated with this SSWAPModel. If 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.

Parameters:
uri - the URI of the object
Returns:
the new SSWAPObject


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.