Salt
3.4.2
A powerful, tagset-independent and theory-neutral meta model and API for storing, manipulating, and representing nearly all types of linguistic data .
|
A label is an attribute-value-pair and can belong to either a Node, an Relation, a Graph, a Layer or another Label as shown in . More...
Inherits org.corpus_tools.salt.graph.LabelableElement, and org.corpus_tools.salt.util.Copyable< T >.
Inherited by org.corpus_tools.salt.core.SAbstractAnnotation, org.corpus_tools.salt.extensions.notification.graph.impl.LabelNotifierImpl, org.corpus_tools.salt.graph.Identifier, and org.corpus_tools.salt.graph.impl.LabelImpl.
Public Member Functions | |
String | getNamespace () |
Returns the optional namespace of the label. More... | |
void | setNamespace (String namespace) |
Sets the optional namespace of the label. More... | |
String | getName () |
Returns the name of the label. More... | |
void | setName (String name) |
Sets the name of the label. More... | |
String | getQName () |
Returns the qName of this label, which is the combination of namespace and name must be unique in the containing object. More... | |
void | setQName (String qName) |
Sets the qName of this label, which is the combination of namespace and name must be unique in the containing object. More... | |
Object | getValue () |
Returns the value of this label. More... | |
void | setValue (Object value) |
Sets the value of this label. More... | |
public< C extends LabelableElement > C | getContainer () |
Returns the container element, which contains this label. More... | |
public< C extends LabelableElement > void | setContainer (C container) |
Sets the container element, which contains this label. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.LabelableElement | |
Collection< Label > | getLabels () |
Returns all labels being contained by this object. More... | |
void | addLabel (Label label) |
Adds the given Label object to the list of labels. More... | |
Label | getLabel (String namespace, String name) |
Returns a label having the passed namespace and name, if such a label is contained by this object. More... | |
Label | getLabel (String qName) |
Returns a label having the passed qualified name. More... | |
void | removeLabel (String qName) |
Removes the label having the passed qName. More... | |
void | removeLabel (String namespace, String name) |
Removes a Label object from the list of labels of this object. More... | |
void | removeAll () |
Removes all Label objects. | |
Set< Label > | getLabelsByNamespace (String namespace) |
Returns a set containing all Label objects having the given namespace. More... | |
boolean | containsLabel (String qName) |
Checks if this object has a Label object in its list having the given qualified name. More... | |
Integer | sizeLabels () |
returns the number of Label objects contained by this object. More... | |
Public Member Functions inherited from org.corpus_tools.salt.util.Copyable< T > | |
T | copy (T other) |
Takes a new 'empty' object and sets all its fields by copying by value. More... | |
Static Public Attributes | |
static final String | NS_SEPERATOR = "::" |
Separator between namespace and name: qname= NAMESPACE {@value NS_SEPERATOR} NAME. | |
A label is an attribute-value-pair and can belong to either a Node, an Relation, a Graph, a Layer or another Label as shown in .
An attribute-value-pair is a triple which consists of a namespace, a name and a value (namespace::name=value). The combination of name and namespace is used to identify a label and therefore must be unique. The namespace is an optional value, to distinguish in case of there are two labels having the same name.
When a label is added to another container, it is removed from it's former container.
<V> | this parameter determines the type of the value of this label. |
public<C extends LabelableElement> C org.corpus_tools.salt.graph.Label.getContainer | ( | ) |
Returns the container element, which contains this label.
The label and the container are double chained, which means when a label is added to the container, the labels container is automatically set to it or even removed.
Implemented in org.corpus_tools.salt.graph.impl.LabelImpl.
String org.corpus_tools.salt.graph.Label.getName | ( | ) |
Returns the name of the label.
The combination of namespace and name must be unique in the containing object.
Implemented in org.corpus_tools.salt.graph.impl.LabelImpl.
String org.corpus_tools.salt.graph.Label.getNamespace | ( | ) |
Returns the optional namespace of the label.
The combination of namespace and name must be unique in the containing object.
Implemented in org.corpus_tools.salt.graph.impl.LabelImpl.
String org.corpus_tools.salt.graph.Label.getQName | ( | ) |
Returns the qName of this label, which is the combination of namespace and name must be unique in the containing object.
Implemented in org.corpus_tools.salt.graph.impl.LabelImpl.
Object org.corpus_tools.salt.graph.Label.getValue | ( | ) |
Returns the value of this label.
Implemented in org.corpus_tools.salt.graph.impl.LabelImpl.
public<C extends LabelableElement> void org.corpus_tools.salt.graph.Label.setContainer | ( | C | container | ) |
Sets the container element, which contains this label.
The label and the container are double chained, which means when a label is added to the container, the labels container is automatically set to it or even removed. Passing a null value means removing the label from the container.
value | container of this label |
void org.corpus_tools.salt.graph.Label.setName | ( | String | name | ) |
Sets the name of the label.
The combination of namespace and name must be unique in the containing object. The passed name must not be empty.
name | name of the label |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.LabelNotifierImpl, org.corpus_tools.salt.graph.impl.LabelImpl, org.corpus_tools.salt.semantics.impl.SCatAnnotationImpl, org.corpus_tools.salt.semantics.impl.SSentenceAnnotationImpl, org.corpus_tools.salt.semantics.impl.SWordAnnotationImpl, org.corpus_tools.salt.semantics.impl.SLemmaAnnotationImpl, org.corpus_tools.salt.semantics.impl.SPOSAnnotationImpl, org.corpus_tools.salt.semantics.impl.STypeAnnotationImpl, org.corpus_tools.salt.graph.impl.IdentifierImpl, org.corpus_tools.salt.semantics.SCatAnnotation, org.corpus_tools.salt.semantics.SLemmaAnnotation, org.corpus_tools.salt.semantics.SPOSAnnotation, org.corpus_tools.salt.semantics.SSentenceAnnotation, org.corpus_tools.salt.semantics.STypeAnnotation, and org.corpus_tools.salt.semantics.SWordAnnotation.
void org.corpus_tools.salt.graph.Label.setNamespace | ( | String | namespace | ) |
Sets the optional namespace of the label.
The combination of namespace and name must be unique in the containing object.
namespace | namespace |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.LabelNotifierImpl, org.corpus_tools.salt.graph.impl.LabelImpl, org.corpus_tools.salt.semantics.impl.SCatAnnotationImpl, org.corpus_tools.salt.semantics.impl.SSentenceAnnotationImpl, org.corpus_tools.salt.semantics.impl.SWordAnnotationImpl, org.corpus_tools.salt.semantics.impl.SLemmaAnnotationImpl, org.corpus_tools.salt.semantics.impl.SPOSAnnotationImpl, org.corpus_tools.salt.semantics.impl.STypeAnnotationImpl, org.corpus_tools.salt.graph.impl.IdentifierImpl, org.corpus_tools.salt.semantics.SCatAnnotation, org.corpus_tools.salt.semantics.SLemmaAnnotation, org.corpus_tools.salt.semantics.SPOSAnnotation, org.corpus_tools.salt.semantics.SSentenceAnnotation, org.corpus_tools.salt.semantics.STypeAnnotation, and org.corpus_tools.salt.semantics.SWordAnnotation.
void org.corpus_tools.salt.graph.Label.setQName | ( | String | qName | ) |
Sets the qName of this label, which is the combination of namespace and name must be unique in the containing object.
qname | the qname is splitted into NAMESPACE {@value NS_SEPERATOR} NAME |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.LabelNotifierImpl, and org.corpus_tools.salt.graph.impl.LabelImpl.
void org.corpus_tools.salt.graph.Label.setValue | ( | Object | value | ) |
Sets the value of this label.
value | generic value of this label. |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.LabelNotifierImpl, org.corpus_tools.salt.graph.impl.LabelImpl, org.corpus_tools.salt.semantics.impl.SSentenceAnnotationImpl, org.corpus_tools.salt.semantics.impl.SWordAnnotationImpl, org.corpus_tools.salt.semantics.SSentenceAnnotation, and org.corpus_tools.salt.semantics.SWordAnnotation.