eu.etaxonomy.cdm.model.common
Class RelationshipTermBase<T extends RelationshipTermBase>

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.VersionableEntity
          extended by eu.etaxonomy.cdm.model.common.AnnotatableEntity
              extended by eu.etaxonomy.cdm.model.common.IdentifiableEntity<IIdentifiableEntityCacheStrategy>
                  extended by eu.etaxonomy.cdm.model.common.TermBase
                      extended by eu.etaxonomy.cdm.model.common.DefinedTermBase<T>
                          extended by eu.etaxonomy.cdm.model.common.OrderedTermBase<T>
                              extended by eu.etaxonomy.cdm.model.common.RelationshipTermBase<T>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IDefinedTerm<T>, IIdentifiableEntity, ILoadableTerm<T>, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable, Comparable<T>
Direct Known Subclasses:
HybridRelationshipType, NameRelationshipType, SynonymRelationshipType, TaxonRelationshipType

@Entity
@Indexed(index="eu.etaxonomy.cdm.model.common.DefinedTermBase")
public abstract class RelationshipTermBase<T extends RelationshipTermBase>
extends OrderedTermBase<T>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.model.common.OrderedTermBase
orderIndex
 
Fields inherited from class eu.etaxonomy.cdm.model.common.DefinedTermBase
partOf, vocabulary
 
Fields inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
 
Fields inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
annotations, markers
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
RelationshipTermBase()
           
RelationshipTermBase(String term, String label, String labelAbbrev, boolean symmetric, boolean transitive)
           
 
Method Summary
 void addInverseRepresentation(Representation inverseRepresentation)
           
 void addRepresentation(Representation representation, Representation inverseRepresentation)
           
 Object clone()
          Clones this OrderedTermBase.
 String getInverseDescription()
           
 String getInverseDescription(Language lang)
           
 String getInverseLabel()
           
 String getInverseLabel(Language lang)
           
 Representation getInverseRepresentation(Language lang)
           
 Set<Representation> getInverseRepresentations()
           
 Representation getPreferredInverseRepresentation(List<Language> languages)
          Returns the InverseRepresentation in the preferred language.
 boolean isSymmetric()
           
 boolean isTransitive()
           
 T readCsvLine(Class<T> termClass, List<String> csvLine, Map<UUID,DefinedTermBase> terms)
          Fills the term with contents from a csvLine.
 void removeInverseRepresentation(Representation inverseRepresentation)
           
 void setSymmetric(boolean symmetric)
           
 void setTransitive(boolean transitive)
           
 void writeCsvLine(au.com.bytecode.opencsv.CSVWriter writer, T term)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.common.OrderedTermBase
compareTo, decreaseIndex, equals, getOrderIndex, incrementIndex, isHigher, isLower, performCompareTo
 
Methods inherited from class eu.etaxonomy.cdm.model.common.DefinedTermBase
addGeneralizationOf, addIncludes, addMedia, getByUuid, getGeneralizationOf, getIncludes, getKindOf, getMedia, getPartOf, getVocabulary, readCsvLine, removeGeneralization, removeIncludes, removeMedia, resetTerms, setDefaultTerms, setGeneralizationOf, setIncludes, setKindOf, setPartOf, setVocabulary
 
Methods inherited from class eu.etaxonomy.cdm.model.common.TermBase
addRepresentation, getDescription, getDescription, getLabel, getLabel, getPreferredRepresentation, getPreferredRepresentation, getRepresentation, getRepresentations, getUri, removeRepresentation, setLabel, setLabel, setUri, toString
 
Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTitleCache, getTruncatedCache, initListener, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache
 
Methods inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IDefinedTerm
getUuid
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IAnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 

Constructor Detail

RelationshipTermBase

public RelationshipTermBase()

RelationshipTermBase

public RelationshipTermBase(String term,
                            String label,
                            String labelAbbrev,
                            boolean symmetric,
                            boolean transitive)
Method Detail

isSymmetric

public boolean isSymmetric()

setSymmetric

public void setSymmetric(boolean symmetric)

isTransitive

public boolean isTransitive()

setTransitive

public void setTransitive(boolean transitive)

getInverseRepresentations

public Set<Representation> getInverseRepresentations()

addInverseRepresentation

public void addInverseRepresentation(Representation inverseRepresentation)

removeInverseRepresentation

public void removeInverseRepresentation(Representation inverseRepresentation)

addRepresentation

public void addRepresentation(Representation representation,
                              Representation inverseRepresentation)

getInverseRepresentation

public Representation getInverseRepresentation(Language lang)

getPreferredInverseRepresentation

public Representation getPreferredInverseRepresentation(List<Language> languages)
Returns the InverseRepresentation in the preferred language. Preferred languages are specified by the parameter languages, which receives a list of Language instances in the order of preference. If no representation in any preferred languages is found the method falls back to return the Representation in Language.DEFAULT() and if necessary further falls back to return the first element found if any. TODO think about this fall-back strategy & see also TextData.getPreferredLanguageString(List) see also TermBase.getPreferredRepresentation(List)

Parameters:
languages -
Returns:

getInverseLabel

public String getInverseLabel()

getInverseLabel

public String getInverseLabel(Language lang)

getInverseDescription

public String getInverseDescription()

getInverseDescription

public String getInverseDescription(Language lang)

readCsvLine

public T readCsvLine(Class<T> termClass,
                     List<String> csvLine,
                     Map<UUID,DefinedTermBase> terms)
Description copied from interface: ILoadableTerm
Fills the term with contents from a csvLine. If the csvLine represents the default language the csvLine attributes are merged into the existing default language and the default Language is returned.

Specified by:
readCsvLine in interface ILoadableTerm<T extends RelationshipTermBase>
Overrides:
readCsvLine in class DefinedTermBase<T extends RelationshipTermBase>
Returns:

writeCsvLine

public void writeCsvLine(au.com.bytecode.opencsv.CSVWriter writer,
                         T term)
Specified by:
writeCsvLine in interface ILoadableTerm<T extends RelationshipTermBase>
Overrides:
writeCsvLine in class DefinedTermBase<T extends RelationshipTermBase>

clone

public Object clone()
Description copied from class: OrderedTermBase
Clones this OrderedTermBase. This is a shortcut that enables to create a new instance that differs only slightly from this OrderedTermBase.

Overrides:
clone in class OrderedTermBase<T extends RelationshipTermBase>
See Also:
DefinedTermBase.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.