info.sswap.impl.empire.model
Class TranslatedSubjectImpl

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.SubjectImpl
                          extended by info.sswap.impl.empire.model.TranslatedSubjectImpl
All Implemented Interfaces:
com.clarkparsia.empire.SupportsRdfId, SSWAPElement, SSWAPIndividual, SSWAPModel, SSWAPNode, SSWAPSubject

public abstract class TranslatedSubjectImpl
extends SubjectImpl

Represents a translated subject. This class overrides setObject() and setObjects() method so that they can be proxied to the original (non-translated) subject.

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  SSWAPSubject originalSubject
          The original (non-translated) subject
 
Constructor Summary
TranslatedSubjectImpl()
           
 
Method Summary
 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.
 SSWAPSubject getOriginalSubject()
           
 void setObject(SSWAPObject sswapObject)
          Sets a new SSWAPObject for this SSWAPSubject.
 void setObjects(java.util.Collection<SSWAPObject> objects)
          Maps this subject onto the provided collection
(package private)  void setOriginalSubject(SSWAPSubject originalSubject)
          Sets the original (non-translated) subject.
 
Methods inherited from class info.sswap.impl.empire.model.SubjectImpl
addGraph, addObject, getGraph, getGraphs, getMapsToEmpireList, getMapsToList, removeGraph, setMapsToEmpireList, validate
 
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

originalSubject

private SSWAPSubject originalSubject
The original (non-translated) subject

Constructor Detail

TranslatedSubjectImpl

public TranslatedSubjectImpl()
Method Detail

getOriginalSubject

public SSWAPSubject getOriginalSubject()

setOriginalSubject

void setOriginalSubject(SSWAPSubject originalSubject)
Sets the original (non-translated) subject.

Parameters:
originalSubject - the original (non-translated) subject

setObject

public void setObject(SSWAPObject sswapObject)
Description copied from interface: SSWAPSubject
Sets a new SSWAPObject for this SSWAPSubject. If the subject has currently any other mappings, they will be removed.

Specified by:
setObject in interface SSWAPSubject
Overrides:
setObject in class SubjectImpl
Parameters:
sswapObject - the new SSWAPObject

setObjects

public void setObjects(java.util.Collection<SSWAPObject> objects)
Description copied from interface: SSWAPSubject
Maps this subject onto the provided collection

Specified by:
setObjects in interface SSWAPSubject
Overrides:
setObjects in class SubjectImpl
Parameters:
objects - Collection of SSWAPObjects to be associated with (mapped from) this SSWAPSubject

getObject

public SSWAPObject getObject()
Description copied from interface: SSWAPSubject
Gets the object, onto which this subject is mapped. If the subject is mapped onto more than one object, the first object is returned.

Specified by:
getObject in interface SSWAPSubject
Overrides:
getObject in class SubjectImpl
Returns:
the SSWAPObject for this subject (a dereferenced object).

getObjects

public java.util.Collection<SSWAPObject> getObjects()
Description copied from interface: SSWAPSubject
Gets all the objects, onto which this subject is mapped.

Specified by:
getObjects in interface SSWAPSubject
Overrides:
getObjects in class SubjectImpl
Returns:
a collection of SSWAPObjects for this subject (all of them are dereferenced).


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