info.sswap.api.model
Interface SSWAPSubject

All Superinterfaces:
SSWAPElement, SSWAPIndividual, SSWAPModel, SSWAPNode
All Known Implementing Classes:
SubjectImpl, TranslatedSubjectImpl

public interface SSWAPSubject
extends SSWAPNode

Subject of a SSWAP Graph. Subjects in SSWAP represent the input data of the service, which are mapped to Objects (results) during the execution of the service.

To create a new SSWAP Subject use SSWAPProtocol.createSubject().

Author:
Blazej Bulka
See Also:
SSWAPProtocol, SSWAPObject

Method Summary
 void addObject(SSWAPObject object)
          Adds a new object for this SSWAPSubject (i.e., existing objects are preserved, and the added object is appended).
 SSWAPGraph getGraph()
          Gets the graph to which this subject belongs.
 java.util.Collection<SSWAPGraph> getGraphs()
          Gets the graphs to which this subject belongs.
 SSWAPObject getObject()
          Gets the object, onto which this subject is mapped.
 java.util.Collection<SSWAPObject> getObjects()
          Gets all the objects, onto which this subject is mapped.
 void setObject(SSWAPObject object)
          Sets a new SSWAPObject for this SSWAPSubject.
 void setObjects(java.util.Collection<SSWAPObject> objects)
          Maps this subject onto the provided collection
 
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

getObject

SSWAPObject getObject()
Gets the object, onto which this subject is mapped. If the subject is mapped onto more than one object, the first object is returned.

Returns:
the SSWAPObject for this subject (a dereferenced object).

getObjects

java.util.Collection<SSWAPObject> getObjects()
Gets all the objects, onto which this subject is mapped.

Returns:
a collection of SSWAPObjects for this subject (all of them are dereferenced).

setObject

void setObject(SSWAPObject object)
Sets a new SSWAPObject for this SSWAPSubject. If the subject has currently any other mappings, they will be removed.

Parameters:
object - the new SSWAPObject

addObject

void addObject(SSWAPObject object)
Adds a new object for this SSWAPSubject (i.e., existing objects are preserved, and the added object is appended).

Parameters:
object - the object to be added

setObjects

void setObjects(java.util.Collection<SSWAPObject> objects)
Maps this subject onto the provided collection

Parameters:
objects - Collection of SSWAPObjects to be associated with (mapped from) this SSWAPSubject

getGraph

SSWAPGraph getGraph()
Gets the graph to which this subject belongs. (In case it belongs to more than one graph, it returns the first one.)

Returns:
the graph to which this subject belongs or null, if it does not belong to any graph

getGraphs

java.util.Collection<SSWAPGraph> getGraphs()
Gets the graphs to which this subject belongs.

Returns:
a collection of graphs.


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