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 .
org.corpus_tools.salt.core.SAbstractAnnotation Interface Reference

Inherits org.corpus_tools.salt.graph.Label, and org.corpus_tools.salt.core.SAnnotationContainer.

Inherited by org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.SAnnotation, org.corpus_tools.salt.core.SFeature, org.corpus_tools.salt.core.SMetaAnnotation, and org.corpus_tools.salt.core.SProcessingAnnotation.

Public Member Functions

SDATATYPE getValueType ()
 Returns the value of the 'SValue Type' attribute. More...
 
void setValueType (SDATATYPE value)
 
String getValue_STEXT ()
 Returns the sValue attribute of this object as String representation. More...
 
Boolean getValue_SBOOLEAN ()
 Returns the sValue attribute of this object as Boolean if possible. More...
 
Long getValue_SNUMERIC ()
 Returns the sValue attribute of this object as Long if possible. More...
 
Double getValue_SFLOAT ()
 Returns the sValue attribute of this object as Float if possible. More...
 
URI getValue_SURI ()
 Returns the sValue attribute of this object as URI if possible. More...
 
Object getValue_SOBJECT ()
 Returns the the sValue attribute of this object as the original object. More...
 
- Public Member Functions inherited from org.corpus_tools.salt.graph.Label
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< LabelgetLabels ()
 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< LabelgetLabelsByNamespace (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 >
copy (T other)
 Takes a new 'empty' object and sets all its fields by copying by value. More...
 
- Public Member Functions inherited from org.corpus_tools.salt.core.SAnnotationContainer
SAnnotation createAnnotation (String namespace, String name, Object value)
 Creates and returns an annotation having the passed namespace, name and value. More...
 
public< A extends SAnnotation > Set< A > createAnnotations (String annotationString)
 This method parses the given annotation String and adds an SAnnotation object for each annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SAnnotation > Set< A > getAnnotations ()
 Returns all annotations contained by this object. More...
 
void addAnnotation (SAnnotation annotation)
 Adds the passed annotation to this container. More...
 
SAnnotation getAnnotation (String qName)
 Returns an annotation having the passed qualified name, if this container contains such an annotation. More...
 
SAnnotation getAnnotation (String namespace, String name)
 Returns an annotation having the passed qualified name, if this container contains such an annotation. More...
 
Iterator< SAnnotationiterator_SAnnotation ()
 Returns an iterator to iterate over the SAnnotation objects contained by this container. More...
 
SMetaAnnotation createMetaAnnotation (String namespace, String name, Object value)
 Creates and returns a meta annotation having the passed namespace, name and value. More...
 
public< A extends SMetaAnnotation > Set< A > createMetaAnnotations (String metaAnnotationString)
 This method parses the given meta annotation String and adds an SMetaAnnotation object for each meta annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SMetaAnnotation > Set< A > getMetaAnnotations ()
 Returns all meta annotations contained by this object. More...
 
void addMetaAnnotation (SMetaAnnotation metaAnnotation)
 Adds the passed meta annotation to this container. More...
 
SMetaAnnotation getMetaAnnotation (String qName)
 Returns a meta annotation having the passed qualified name, if this container contains such a meta annotation. More...
 
Iterator< SMetaAnnotationiterator_SMetaAnnotation ()
 Returns an iterator to iterate over the SMetaAnnotation objects contained by this container. More...
 
SProcessingAnnotation createProcessingAnnotation (String namespace, String name, Object value)
 Creates and returns a processing-annotation having the passed namespace, name and value. More...
 
public< A extends SProcessingAnnotation > Set< A > createProcessingAnnotations (String annotationString)
 This method parses the given processing-annotation String and adds an SProcessingAnnotation object for each processing-annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SProcessingAnnotation > Set< A > getProcessingAnnotations ()
 Returns all processing-annotations contained by this object. More...
 
void addProcessingAnnotation (SProcessingAnnotation processingAnnotation)
 Adds the passed processing-annotation to this container. More...
 
SProcessingAnnotation getProcessingAnnotation (String qName)
 Returns a processing-annotation having the passed qualified name, if this container contains such a processing-annotation. More...
 
Iterator< SProcessingAnnotationiterator_SProcessingAnnotation ()
 Returns an iterator to iterate over the SProcessingAnnotation objects contained by this container. More...
 
SFeature createFeature (String namespace, String name, Object value)
 Creates and returns an feature having the passed namespace, name and value. More...
 
public< A extends SFeature > Set< A > createFeatures (String featureString)
 This method parses the given feature String and adds an SFeature object for each feature being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SFeature > Set< A > getFeatures ()
 Returns all features contained by this object. More...
 
void addFeature (SFeature feature)
 Adds the passed feature to this container. More...
 
SFeature getFeature (String qName)
 Returns an feature having the passed qualified name, if this container contains such an feature. More...
 
SFeature getFeature (String namespace, String name)
 Returns an feature having the passed qualified name, if this container contains such an feature. More...
 
Iterator< SFeatureiterator_SFeature ()
 Returns an iterator to iterate over the SFeature objects contained by this container. More...
 

Additional Inherited Members

- Static Public Attributes inherited from org.corpus_tools.salt.graph.Label
static final String NS_SEPERATOR = "::"
 Separator between namespace and name: qname= NAMESPACE {@value NS_SEPERATOR} NAME.
 

Detailed Description

An annotation in Salt is an attribute-value-pair and can belong to either a node, an edge, a graph, a layer or another label. 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 annotations having the same name. For instance a node etc. can have a label stts:pos=VVFIN as well as the label pos:VV to annotate it with two part-of-speech annotations from different tagsets.

SFeature objects are used to store structural information of Salt, which are necessary to map a linguistic model to a graph. For instance SFeature added to the relation between a token and a primary text contain the start and end position of the token in the primary text. In the very most cases a user of the Salt api will never need to use a SFeature object.

For further information on labels,

See also
Label
Author
florian

Member Function Documentation

◆ getValue_SBOOLEAN()

Boolean org.corpus_tools.salt.core.SAbstractAnnotation.getValue_SBOOLEAN ( )

Returns the sValue attribute of this object as Boolean if possible.

If the value is not of type Boolean or is empty, null will be returned.

Returns
Boolean representation of the sValue attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValue_SFLOAT()

Double org.corpus_tools.salt.core.SAbstractAnnotation.getValue_SFLOAT ( )

Returns the sValue attribute of this object as Float if possible.

If the value is not of type Float or is empty, null will be returned.

Returns
Float representation of the sValue attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValue_SNUMERIC()

Long org.corpus_tools.salt.core.SAbstractAnnotation.getValue_SNUMERIC ( )

Returns the sValue attribute of this object as Long if possible.

If the value is not of type Long or is empty, null will be returned.

Returns
Long representation of the sValue attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValue_SOBJECT()

Object org.corpus_tools.salt.core.SAbstractAnnotation.getValue_SOBJECT ( )

Returns the the sValue attribute of this object as the original object.

This will always work as long as sValue is not empty. If the sValue attribute is empty null will be returned.

Returns
Object representation of the sValue attribute

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValue_STEXT()

String org.corpus_tools.salt.core.SAbstractAnnotation.getValue_STEXT ( )

Returns the sValue attribute of this object as String representation.

If the sValue is of type String it will be returned, else the toString() method will be called. If no value is given, null will be returned.

Returns
String representation of the sValue attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValue_SURI()

URI org.corpus_tools.salt.core.SAbstractAnnotation.getValue_SURI ( )

Returns the sValue attribute of this object as URI if possible.

If the value is not of type URI or is empty, null will be returned.

Returns
URI representation of the sValue attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.

◆ getValueType()

SDATATYPE org.corpus_tools.salt.core.SAbstractAnnotation.getValueType ( )

Returns the value of the 'SValue Type' attribute.

The literals are from the enumeration de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SDATATYPE. If no SDATATYPE was set, a value will be computed. Here is the list of how java objects will be mapped to a SDATATYPE value.

Returns
the value of the 'SValue Type' attribute.

Implemented in org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl.