@Entity @ClassBridge(impl=DefinedTermBaseClassBridge.class) public abstract class DefinedTermBase<T extends DefinedTermBase> extends TermBase implements ILoadableTerm<T>, IDefinedTerm<T>, java.lang.Comparable<T>
Modifier and Type | Field and Description |
---|---|
protected T |
partOf |
protected TermVocabulary<T> |
vocabulary |
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
Modifier | Constructor and Description |
---|---|
protected |
DefinedTermBase()
Deprecated.
|
protected |
DefinedTermBase(TermType type) |
|
DefinedTermBase(TermType type,
java.lang.String description,
java.lang.String label,
java.lang.String labelAbbrev) |
Modifier and Type | Method and Description |
---|---|
void |
addGeneralizationOf(T generalization) |
void |
addIncludes(T includes) |
void |
addMedia(Media media) |
java.lang.Object |
clone()
Clones this DefinedTermBase.
|
int |
compareTo(T other)
Deprecated.
|
T |
getByUuid(java.util.UUID uuid) |
static ICdmUuidCacher |
getCacher()
Gets the CDM cacher object
|
java.util.Set<T> |
getGeneralizationOf()
Returns all defined terms this term is a direct generalization for.
|
java.util.Set<T> |
getGeneralizationOf(boolean recursive)
Returns all defined terms this term is a generalization for.
|
java.lang.String |
getIdInVocabulary()
Returns the label of this term used (and unique) in the term's vocabulary.
|
java.util.Set<T> |
getIncludes()
Returns all defined terms this term includes.
|
T |
getKindOf()
Returns the defined term this term is a kind of.
|
java.util.Set<Media> |
getMedia()
Returns the media attached to this
term |
T |
getPartOf()
Returns the defined term this term is a part of.
|
java.lang.String |
getSymbol() |
java.lang.String |
getSymbol2() |
static <T extends DefinedTermBase> |
getTermByClassAndUUID(java.lang.Class<T> clazz,
java.util.UUID uuid) |
TermVocabulary<T> |
getVocabulary() |
boolean |
isKindOf(T ancestor)
Computes if
this term is kind of the ancestor term. |
protected int |
partOfCsvLineIndex()
Get the
|
T |
readCsvLine(java.lang.Class<T> termClass,
java.util.List<java.lang.String> csvLine,
java.util.Map<java.util.UUID,DefinedTermBase> terms,
boolean abbrevAsId)
Fills the
term with contents from a csvLine. |
protected static <TERM extends DefinedTermBase> |
readCsvLine(TERM newInstance,
java.util.List<java.lang.String> csvLine,
Language lang,
boolean abbrevAsId) |
protected void |
readIsPartOf(T newInstance,
java.util.List<java.lang.String> csvLine,
java.util.Map<java.util.UUID,DefinedTermBase> terms) |
void |
removeGeneralization(T generalization) |
void |
removeIncludes(T includes) |
void |
removeMedia(Media media) |
abstract void |
resetTerms() |
static void |
setCacher(ICdmUuidCacher cacher)
Sets the CDM cacher object
|
protected abstract void |
setDefaultTerms(TermVocabulary<T> termVocabulary) |
protected void |
setGeneralizationOf(java.util.Set<T> value) |
void |
setIdInVocabulary(java.lang.String idInVocabulary)
Sets the label of this term used (and unique) in the term's vocabulary.
|
protected void |
setIncludes(java.util.Set<T> includes) |
void |
setKindOf(T kindOf) |
void |
setPartOf(T partOf) |
void |
setSymbol(java.lang.String symbol) |
void |
setSymbol2(java.lang.String symbol2) |
protected void |
setVocabulary(TermVocabulary<T> newVocabulary) |
void |
writeCsvLine(au.com.bytecode.opencsv.CSVWriter writer,
T term) |
addRepresentation, getDescription, getDescription, getLabel, getLabel, getPreferredRepresentation, getPreferredRepresentation, getRepresentation, getRepresentations, getTermType, getUri, removeRepresentation, setLabel, setLabel, setTermType, setUri, toString
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addRights, addSource, addSource, addSources, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getExtensionsConcat, getIdentifiers, getIdentifiers, getIdentifiers, getLsid, getRights, getSources, getTitleCache, getTruncatedCache, hasEmptyTitleCache, hasExtension, hasExtension, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeIdentifier, removeIdentifier, removeRights, removeSource, removeSources, replaceCredit, replaceIdentifier, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, updateCaches, updateCaches
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker, setAnnotations
cloneLanguageString, equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
addPropertyChangeListener, addPropertyChangeListener, addToSetWithChangeEvent, deproxy, deproxy, fireOnCreateEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUserFriendlyDescription, getUserFriendlyFieldName, getUserFriendlyTypeName, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isBlank, isInstanceOf, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
protected T extends DefinedTermBase partOf
protected TermVocabulary<T extends DefinedTermBase> vocabulary
@Deprecated protected DefinedTermBase()
protected DefinedTermBase(TermType type)
public DefinedTermBase(TermType type, java.lang.String description, java.lang.String label, java.lang.String labelAbbrev)
public java.lang.String getIdInVocabulary()
IDefinedTerm
getIdInVocabulary
in interface IDefinedTerm<T extends DefinedTermBase>
IDefinedTerm.setIdInVocabulary(String)
public void setIdInVocabulary(java.lang.String idInVocabulary)
IDefinedTerm
setIdInVocabulary
in interface IDefinedTerm<T extends DefinedTermBase>
IDefinedTerm.getIdInVocabulary()
public T getKindOf()
ISimpleTerm
this
termgetKindOf
in interface ISimpleTerm<T extends DefinedTermBase>
public void setKindOf(T kindOf)
public java.util.Set<T> getGeneralizationOf()
ISimpleTerm
this
term.getGeneralizationOf
in interface ISimpleTerm<T extends DefinedTermBase>
protected void setGeneralizationOf(java.util.Set<T> value)
public void addGeneralizationOf(T generalization)
public void removeGeneralization(T generalization)
public T getPartOf()
IDefinedTerm
this
term
Discuss: move to ISimpleTerm
?getPartOf
in interface IDefinedTerm<T extends DefinedTermBase>
IDefinedTerm.getIncludes()
public void setPartOf(T partOf)
getPartOf()
@Deprecated public int compareTo(T other)
compareTo
in interface java.lang.Comparable<T extends DefinedTermBase>
public java.util.Set<T> getIncludes()
IDefinedTerm
this
term
Discuss: move to ISimpleTerm
?
FIXME getIncludes(): Hibernate returns this as a collection of CGLibProxy$$DefinedTermBase objects
which can't be cast to instances of T - can we explicitly initialize these terms using
Hibernate.initialize() or ( ( PersistentCollection ) proxy ).forceInitialization(),
does this imply a distinct load, and find methods in the dao?getIncludes
in interface IDefinedTerm<T extends DefinedTermBase>
IDefinedTerm.getPartOf()
protected void setIncludes(java.util.Set<T> includes)
getIncludes()
public void addIncludes(T includes)
getIncludes()
public void removeIncludes(T includes)
getIncludes()
public java.util.Set<Media> getMedia()
IDefinedTerm
term
getMedia
in interface IDefinedTerm<T extends DefinedTermBase>
public void addMedia(Media media)
public void removeMedia(Media media)
public TermVocabulary<T> getVocabulary()
protected void setVocabulary(TermVocabulary<T> newVocabulary)
newVocabulary
- public java.lang.String getSymbol()
public void setSymbol(java.lang.String symbol)
public java.lang.String getSymbol2()
public void setSymbol2(java.lang.String symbol2)
symbol2
- the symbol2 to setpublic boolean isKindOf(T ancestor)
ISimpleTerm
this
term is kind of the ancestor
term.
So the ancestor
term is direct or indirect (recursive) generalization
of this
term.isKindOf
in interface ISimpleTerm<T extends DefinedTermBase>
ancestor
- the potential ancestor termISimpleTerm.getKindOf()
,
ISimpleTerm.getGeneralizationOf()
public java.util.Set<T> getGeneralizationOf(boolean recursive)
ISimpleTerm
this
term.
If parameter recursive
is false
only the
direct descendants will be returned. If it is true
the direct descendants and there recursive descendants (all descendants)
will be returned.getGeneralizationOf
in interface ISimpleTerm<T extends DefinedTermBase>
public abstract void resetTerms()
protected abstract void setDefaultTerms(TermVocabulary<T> termVocabulary)
public T readCsvLine(java.lang.Class<T> termClass, java.util.List<java.lang.String> csvLine, java.util.Map<java.util.UUID,DefinedTermBase> terms, boolean abbrevAsId)
ILoadableTerm
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.readCsvLine
in interface ILoadableTerm<T extends DefinedTermBase>
protected static <TERM extends DefinedTermBase> TERM readCsvLine(TERM newInstance, java.util.List<java.lang.String> csvLine, Language lang, boolean abbrevAsId)
protected void readIsPartOf(T newInstance, java.util.List<java.lang.String> csvLine, java.util.Map<java.util.UUID,DefinedTermBase> terms)
protected int partOfCsvLineIndex()
public void writeCsvLine(au.com.bytecode.opencsv.CSVWriter writer, T term)
writeCsvLine
in interface ILoadableTerm<T extends DefinedTermBase>
public T getByUuid(java.util.UUID uuid)
public java.lang.Object clone()
clone
in class TermBase
TermBase.clone()
,
Object.clone()
public static ICdmUuidCacher getCacher()
public static void setCacher(ICdmUuidCacher cacher)
cacher
- the CDM cacher objectpublic static <T extends DefinedTermBase> T getTermByClassAndUUID(java.lang.Class<T> clazz, java.util.UUID uuid)
Copyright © 2007-2019 EDIT. All Rights Reserved.