public class TermTag extends MTag
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_ITSTERMNO |
static String |
TYPE_TERM |
mc, TYPE_DEFAULT| Constructor and Description |
|---|
TermTag(MTag tag,
String type,
AnnotatorsRef ar)
Creates a new opening
TermTag object from an existing marker tag. |
TermTag(String id)
Creates a new
TermTag object. |
TermTag(TermTag original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Indicates if this tag is equal to another.
|
String |
getAnnotatorRef()
Gets the annotator reference currently set for this data category.
|
String |
getDataCategoryName()
Gets the the id/name of this data category.
|
ITSItems |
getITSItems()
This method always return null: Only the Terminology data category can be used on a term annotation.
|
Double |
getTermConfidence()
Gets the confidence on whether this is a term or not.
|
String |
getTermInfo()
Gets the term information for this marker.
|
String |
getTermInfoRef()
Gets the term information reference for this marker.
|
int |
hashCode() |
boolean |
hasITSItem()
Indicates if the object has at least one ITS item.
|
boolean |
isTerm()
Indicates if this is a term.
|
void |
setAnnotatorRef(AnnotatorsRef ar)
Sets the annotator reference information for this data category.
|
void |
setAnnotatorRef(String annotatorRef)
Sets the annotator reference information for this data category.
|
void |
setITSItems(ITSItems itsItems)
This method always throws an UnsupportedOperationException exception:
Only the Terminology data category can be used on a term annotation.
|
void |
setTerm(boolean term)
Sets the flag indicating if this is a term.
|
void |
setTermConfidence(Double termConfidence)
Sets the confidence on whether this is a term or not.
|
void |
setTermInfo(String termInfo)
Sets the term information for this marker.
|
void |
setTermInfoRef(String termInfoRef)
Sets the term information reference for this marker.
|
void |
setType(String type)
Sets the type of the code or marker (for both opening/closing tags).
|
void |
validate()
Validates this data category.
|
getId, getRef, getTranslate, getType, getValue, isCode, isMarker, setRef, setTranslate, setValuegetTagType, toStringgetExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributespublic static final String TYPE_TERM
public static final String TYPE_ITSTERMNO
public TermTag(TermTag original)
original - the original object to duplicate.public TermTag(String id)
TermTag object.id - the id of the new term tag (cannot be null).public TermTag(MTag tag, String type, AnnotatorsRef ar)
TermTag object from an existing marker tag.tag - the marker tag to use.type - the type of the annotation.ar - the annotator-references for this marker (can be null).public String getDataCategoryName()
public void validate()
public void setType(String type)
Tagpublic boolean isTerm()
public void setTerm(boolean term)
term - true if this is a term, false otherwise.public Double getTermConfidence()
public void setTermConfidence(Double termConfidence)
termConfidence - the confidence on whether this is a term or not (between 0.0 and 1.0).public boolean hasITSItem()
IWithITSAttributeshasITSItem in interface IWithITSAttributeshasITSItem in class MTagpublic ITSItems getITSItems()
getITSItems in interface IWithITSAttributesgetITSItems in class MTagpublic void setITSItems(ITSItems itsItems)
setITSItems in interface IWithITSAttributessetITSItems in class MTagitsItems - the new items to set.UnsupportedOperationException - in all cases.public void setAnnotatorRef(String annotatorRef)
annotatorRef - the reference string to set (can be null).public void setAnnotatorRef(AnnotatorsRef ar)
ar - the set of references read from its:annotatorsRef.
If it is null, or if there is no reference for the relevant data category: no change is made.public String getAnnotatorRef()
public String getTermInfo()
MTag.getValue().public void setTermInfo(String termInfo)
setRef(null);
because ITS terms can have only either a reference or a value but not both.termInfo - the new information to set (can be null).public String getTermInfoRef()
MTag.getRef().public void setTermInfoRef(String termInfoRef)
setValue(null);
because ITS terms can have only either a reference or a value but not both.termInfoRef - the new information reference to set.public boolean equals(Object other)
TagUse the == operator to test if two tags are the same.
Copyright © 2020. All rights reserved.