info.sswap.api.model
Interface SSWAPGraph

All Superinterfaces:
SSWAPElement, SSWAPIndividual, SSWAPModel, SSWAPNode

public interface SSWAPGraph
extends SSWAPNode

A SSWAP Graph of a SSWAP Resource. A Graph is a data structure that allows multiple alternative mappings to be associated with a single SSWAPResource. Because each SSWAP Graph can itself anchor one:one, one:many, many:one, or many:many subject->object mappings, most cases use only a single SSWAP Graph.

To create a new SSWAPGraph use SSWAPProtocol.createGraph().

Author:
Blazej Bulka
See Also:
SSWAPProtocol, SSWAPResource

Method Summary
 SSWAPResource getResource()
          Gets the resource to which this graph belongs
 SSWAPSubject getSubject()
          Gets the subject of the graph.
 java.util.Collection<SSWAPSubject> getSubjects()
          Gets all the subjects of the graph.
 void setSubject(SSWAPSubject subject)
          Sets the subject of the graph.
 void setSubjects(java.util.Collection<SSWAPSubject> subjects)
          Sets the subjects of the graph.
 
Methods inherited from interface info.sswap.api.model.SSWAPNode
asSSWAPGraph, asSSWAPObject, asSSWAPProvider, asSSWAPResource, asSSWAPSubject, getID, isSSWAPGraph, isSSWAPObject, isSSWAPProvider, isSSWAPResource, isSSWAPSubject
 
Methods inherited from interface info.sswap.api.model.SSWAPIndividual
addProperty, addProperty, addProperty, addProperty, addType, clearProperty, getDeclaredType, getDeclaredTypes, getInferredIndividual, getProperties, getProperties, getProperty, getType, getTypes, hasValue, hasValue, isAnonymous, isCompatibleWith, isOfType, removeProperty, removeProperty, removeType, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from interface info.sswap.api.model.SSWAPElement
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getLabel, isIndividual, isList, isLiteral
 
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

getSubject

SSWAPSubject getSubject()
Gets the subject of the graph. (If there are more than one subject, the first one is returned).

Returns:
a SSWAPSubject for the graph (a dereferenced object, since the information about subjects is always within the same document as the graph).

getSubjects

java.util.Collection<SSWAPSubject> getSubjects()
Gets all the subjects of the graph.

Returns:
a set of SSWAPSubjects (all of them are dereferenced).

setSubject

void setSubject(SSWAPSubject subject)
Sets the subject of the graph. If there are any subjects in the graph, they will be overwritten (i.e., the graph will only have a one subject -- the one passed to this method).

Parameters:
subject - the subject

setSubjects

void setSubjects(java.util.Collection<SSWAPSubject> subjects)
Sets the subjects of the graph. If there are any subjects in the graph, they will be overwritten.

Parameters:
subjects - a collection of subjects for this graph

getResource

SSWAPResource getResource()
Gets the resource to which this graph belongs

Returns:
the SSWAP Resource


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