info.sswap.impl.empire.model
Class GraphImpl

java.lang.Object
  extended by info.sswap.impl.empire.model.ModelImpl
      extended by info.sswap.impl.empire.model.ElementImpl
          extended by info.sswap.impl.empire.model.IndividualImpl
              extended by info.sswap.impl.empire.model.NodeImpl
                  extended by info.sswap.impl.empire.model.EmpireGeneratedNodeImpl
                      extended by info.sswap.impl.empire.model.GraphImpl
All Implemented Interfaces:
com.clarkparsia.empire.SupportsRdfId, SSWAPElement, SSWAPGraph, SSWAPIndividual, SSWAPModel, SSWAPNode

public abstract class GraphImpl
extends EmpireGeneratedNodeImpl
implements SSWAPGraph

Partial implementation of SSWAP Graph (the remaining abstract methods are automatically generated by Empire in the run-time).

Author:
Blazej Bulka

Nested Class Summary
 
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  ResourceImpl resource
           
 
Constructor Summary
GraphImpl()
           
 
Method Summary
private  void detachExistingSubjects()
           
abstract  java.util.List<SubjectImpl> getHasMappingEmpireList()
          Gets the list of subjects to which this graph is connected by sswap:hasMapping property.
 java.util.List<SubjectImpl> getHasMappingList()
           
 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.
abstract  void setHasMappingEmpireList(java.util.List<SubjectImpl> hasMappingList)
          Sets the list of subjects to which this graph is connected by sswap:hasMapping property.
(package private)  void setResource(SSWAPResource resource)
           
 void setSubject(SSWAPSubject subject)
          Sets the subject of the graph.
 void setSubjects(java.util.Collection<SSWAPSubject> subjects)
          Sets the subjects of the graph.
 void validate()
          Verifies whether the underlying RDF data conforms to SSWAP syntax and requirements.
 
Methods inherited from class info.sswap.impl.empire.model.EmpireGeneratedNodeImpl
ensureProperView, ensureProperView, isEmpireGenerated, listFromImpl, listToImpl, persist, refresh, setSourceModel, toListImpl
 
Methods inherited from class info.sswap.impl.empire.model.NodeImpl
asSSWAPGraph, asSSWAPObject, asSSWAPProvider, asSSWAPResource, asSSWAPSubject, dereference, getID, isDereferenced, isSSWAPGraph, isSSWAPObject, isSSWAPProvider, isSSWAPResource, isSSWAPSubject
 
Methods inherited from class info.sswap.impl.empire.model.IndividualImpl
addComment, addIgnoredProperty, addIgnoredType, addLabel, addProperty, addProperty, addProperty, addProperty, addProperty, addType, asIndividual, assertType, clearProperty, clearProperty, closeWorld, equals, getDeclaredType, getDeclaredTypes, getIgnoredProperties, getIgnoredTypes, getInferredIndividual, getProperties, getProperties, getProperty, getType, getTypes, hashCode, hasValue, hasValue, isCompatibleWith, isIndividual, isOfType, removeProperty, removeProperty, removeType, setDefaultParameterValues, setProperty, setProperty, setProperty, setProperty, setProperty, setSourceModel
 
Methods inherited from class info.sswap.impl.empire.model.ElementImpl
asBoolean, asDouble, asInteger, asList, asLiteral, asString, getComment, getJenaResource, getLabel, isAnonymous, isList, isLiteral
 
Methods inherited from class info.sswap.impl.empire.model.ModelImpl
addImport, assertModel, assertSourceModel, checkProfile, dereference, doClosure, getAllDependentObjects, getDependentObject, getDocument, getExpressivity, getImports, getInputStream, getNsPrefixMap, getReasoningService, getSourceModel, getTypeSignature, getURI, hasSourceModel, hasSourceModelWithEntityManager, rdfIdEquals, rdfIdHashCode, refreshSiblings, removeImport, removeNsPrefix, serialize, serialize, setDereferenced, setNsPrefix, 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.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
 
Methods inherited from interface com.clarkparsia.empire.SupportsRdfId
getRdfId, setRdfId
 

Field Detail

resource

private ResourceImpl resource
Constructor Detail

GraphImpl

public GraphImpl()
Method Detail

setResource

void setResource(SSWAPResource resource)

getResource

public SSWAPResource getResource()
Description copied from interface: SSWAPGraph
Gets the resource to which this graph belongs

Specified by:
getResource in interface SSWAPGraph
Returns:
the SSWAP Resource

getSubject

public SSWAPSubject getSubject()
Description copied from interface: SSWAPGraph
Gets the subject of the graph. (If there are more than one subject, the first one is returned).

Specified by:
getSubject in interface SSWAPGraph
Returns:
a SSWAPSubject for the graph (a dereferenced object, since the information about subjects is always within the same document as the graph).

getSubjects

public java.util.Collection<SSWAPSubject> getSubjects()
Description copied from interface: SSWAPGraph
Gets all the subjects of the graph.

Specified by:
getSubjects in interface SSWAPGraph
Returns:
a set of SSWAPSubjects (all of them are dereferenced).

setSubject

public void setSubject(SSWAPSubject subject)
Description copied from interface: SSWAPGraph
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).

Specified by:
setSubject in interface SSWAPGraph
Parameters:
subject - the subject

setSubjects

public void setSubjects(java.util.Collection<SSWAPSubject> subjects)
Description copied from interface: SSWAPGraph
Sets the subjects of the graph. If there are any subjects in the graph, they will be overwritten.

Specified by:
setSubjects in interface SSWAPGraph
Parameters:
subjects - a collection of subjects for this graph

getHasMappingEmpireList

public abstract java.util.List<SubjectImpl> getHasMappingEmpireList()
Gets the list of subjects to which this graph is connected by sswap:hasMapping property.

Returns:
the list of subjects or null (if there are no subjects).

getHasMappingList

public java.util.List<SubjectImpl> getHasMappingList()

setHasMappingEmpireList

public abstract void setHasMappingEmpireList(java.util.List<SubjectImpl> hasMappingList)
Sets the list of subjects to which this graph is connected by sswap:hasMapping property.

Parameters:
hasMappingList - the list of subjects or null.

validate

public void validate()
              throws ValidationException
Description copied from interface: SSWAPModel
Verifies whether the underlying RDF data conforms to SSWAP syntax and requirements.

Specified by:
validate in interface SSWAPModel
Overrides:
validate in class ModelImpl
Throws:
ValidationException - if the data violates SSWAP syntax or requirements

detachExistingSubjects

private void detachExistingSubjects()


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