public class AnnotatorsRef
extends java.lang.Object
| Constructor and Description |
|---|
AnnotatorsRef()
Creates an empty
AnnotatorsRef object. |
AnnotatorsRef(AnnotatorsRef original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildDCValue(java.lang.StringBuilder out,
java.lang.String dc,
java.lang.String value)
Adds if needed the annotator reference value for the given data category.
|
java.lang.String |
get(java.lang.String name)
Gets the annotator reference value for a given data category.
|
boolean |
isEmpty()
Indicates if this annotators set is empty or nor.
|
java.lang.String |
print()
Outputs the annotator-references in this set.
|
static java.lang.String |
printDCIfDifferent(java.lang.String dcIdentifier,
java.lang.String value,
AnnotatorsRef parentAR)
Compares a give annotator-reference value and parent's value for a given data category
and output the value if it is difference form the parent's value
or if the parent's value is null.
|
java.lang.String |
printDifferences(AnnotatorsRef parentAR)
Output the annotator-references of this set that are not in a given parent set.
|
void |
read(java.lang.String data)
Reads the annotatorsRef value into this object.
|
void |
set(IITSItem item)
Sets the annotator reference of a given ITS item (if available).
|
void |
set(java.lang.String dc,
java.lang.String value)
Sets the annotator reference for a given data category.
|
static void |
update(AnnotatorsRef ar,
IWithITSAttributes object)
Update an
AnnotatorsRef object with the values of the live object. |
public AnnotatorsRef()
AnnotatorsRef object.public AnnotatorsRef(AnnotatorsRef original)
original - the original object to copy.public void read(java.lang.String data)
data - the string value of the its:annotatorsRef attribute.public void set(IITSItem item)
item - the item where the new annotator reference may be (can be null).public void set(java.lang.String dc,
java.lang.String value)
dc - the data category.value - the value to set.public java.lang.String printDifferences(AnnotatorsRef parentAR)
parentAR - the previous AnnotatorsRef object in the context (can be null if there is none).print()public static java.lang.String printDCIfDifferent(java.lang.String dcIdentifier,
java.lang.String value,
AnnotatorsRef parentAR)
dcIdentifier - the data category identifiervalue - the annotator-reference value (can be null)parentAR - the annotator-reference parent (can be null)public static void update(AnnotatorsRef ar, IWithITSAttributes object)
AnnotatorsRef object with the values of the live object.
Values for data categories not in live object are left alone.ar - the object to update.object - the live object from where to get the new values.public java.lang.String print()
printDifferences(AnnotatorsRef)public java.lang.String get(java.lang.String name)
name - the name of the data category.protected void buildDCValue(java.lang.StringBuilder out,
java.lang.String dc,
java.lang.String value)
out - the buffer where to add the value.dc - the data category to lookup.value - the value to match with.public boolean isEmpty()