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 .
|
In Salt a document is represented by this class. More...
Inherits org.corpus_tools.salt.core.SNode.
Inherited by org.corpus_tools.salt.common.impl.SDocumentImpl.
Public Member Functions | |
SDocumentGraph | getDocumentGraph () |
Returns the document structure which belongs to this document. More... | |
SDocumentGraph | createDocumentGraph () |
Returns the document structure which belongs to this document. More... | |
void | setDocumentGraph (SDocumentGraph documentGraph) |
Sets the document structure which belongs to this document. More... | |
URI | getDocumentGraphLocation () |
Returns the location of the contained SDocumentGraph object, in case it is persisted. More... | |
void | setDocumentGraphLocation (URI location) |
Sets the location as URI, of where the contained SDocumentGraph object is persisted. More... | |
void | saveDocumentGraph (URI documentGraphLocation) |
Persists the SDocumentGraph object contained by this object as SaltXML file at the location given by the passed URI object. More... | |
void | loadDocumentGraph () |
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object. More... | |
void | loadDocumentGraph (URI documentGraphLocation) |
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object. More... | |
SCorpusGraph | getGraph () |
Returns the container graph of this node.
| |
Public Member Functions inherited from org.corpus_tools.salt.core.SNode | |
List< SRelation > | getOutRelations () |
When this node belongs to a SGraph, a list of outgoing relations of this node are returned. More... | |
List< SRelation > | getInRelations () |
When this node belongs to a SGraph, a list of incoming relations of this node are returned. More... | |
Set< SLayer > | getLayers () |
Returns all layers containing this node. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.Node | |
void | setGraph (Graph graph) |
Sets the container graph of this node. More... | |
void | addLayer (Layer layer) |
Adds this node to the passed layer. More... | |
void | removeLayer (Layer layer) |
Removes this node from the passed layer. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.IdentifiableElement | |
String | getId () |
Returns the id of this object, which is the value of the contained Identifier object. More... | |
void | setId (String id) |
Creates a new Identifier object and sets its value to the passed id. More... | |
Identifier | getIdentifier () |
Returns the Identifier label for this object. More... | |
void | setIdentifier (Identifier identifier) |
Sets the Identifier label for this object. 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.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< SAnnotation > | iterator_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< SMetaAnnotation > | iterator_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< SProcessingAnnotation > | iterator_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< SFeature > | iterator_SFeature () |
Returns an iterator to iterate over the SFeature objects contained by this container. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.SNamedElement | |
String | getName () |
Returns the name of this element. More... | |
void | setName (String name) |
Sets the name of the element. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.SPathElement | |
URI | getPath () |
Returns the id of this object as a URI path If no Id exists, null is returned. More... | |
In Salt a document is represented by this class.
An object of this class can contain an object of type SDocumentGraph which contains the 'real' linguistic data. An object of type SDocumentGraph can be set and get by calling SDocument#setDocumentGraph(SDocumentGraph) and SDocument#getDocumentGraph(). A closer documentation of a document graph, you can find in SDocumentGraph. A document must always be contained in a corpus (object of type SCorpus). Such a containment relation in Salt is represented by an object of type SCorpusRelation. How to add a SDocument object to a SCorpusGraph object please see the documentation of SCorpusGraph.
A document passes it's id to a document graph, when one is set.
SDocumentGraph org.corpus_tools.salt.common.SDocument.createDocumentGraph | ( | ) |
Returns the document structure which belongs to this document.
If no document structure was created so far, a new one is created and returned
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
SDocumentGraph org.corpus_tools.salt.common.SDocument.getDocumentGraph | ( | ) |
Returns the document structure which belongs to this document.
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
URI org.corpus_tools.salt.common.SDocument.getDocumentGraphLocation | ( | ) |
Returns the location of the contained SDocumentGraph object, in case it is persisted.
The location is stored via a SFeature object having the namespace {@value SaltFactory::NAMESPACE_SALT} and the name {@value SFEATURE_NAME::SDOCUMENT_GRAPH_LOCATION}.
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
void org.corpus_tools.salt.common.SDocument.loadDocumentGraph | ( | ) |
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object.
The location of where to find the SaltXML containing the SDocumentGraph object must be given as SFeature. It will be read via calling getSDocumentGraphLocation(). After loading, the feature accessible via getSDocumentGraphLocation() will be removed.
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
void org.corpus_tools.salt.common.SDocument.loadDocumentGraph | ( | URI | documentGraphLocation | ) |
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object.
The location of where to find the SaltXML containing the SDocumentGraph object is given by the passed URI object. After loading, the feature accessible via getSDocumentGraphLocation() if exist will be removed.
documentGraphLocation | location of SaltXML to load SDocumentGraph object. |
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
void org.corpus_tools.salt.common.SDocument.saveDocumentGraph | ( | URI | documentGraphLocation | ) |
Persists the SDocumentGraph object contained by this object as SaltXML file at the location given by the passed URI object.
The URI is stored as SFeature by calling setSDocumentGraphLocation(URI). The relation between SDocument and given SDocumentGraph will be removed.
documentGraphLocation | location of where to persist object as {@value SaltUtil::FILE_ENDING_SALT_XML} file (must have the ending {@value SaltUtil::FILE_ENDING_SALT}) in URI syntax @generated |
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
void org.corpus_tools.salt.common.SDocument.setDocumentGraph | ( | SDocumentGraph | documentGraph | ) |
Sets the document structure which belongs to this document.
documentGraph | document structure which belongs to this document |
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.
void org.corpus_tools.salt.common.SDocument.setDocumentGraphLocation | ( | URI | location | ) |
Sets the location as URI, of where the contained SDocumentGraph object is persisted.
The location is stored as SFeature having the namespace {@value SaltFactory::NAMESPACE_SALT} and the name {@value SFEATURE_NAME::SDOCUMENT_GRAPH_LOCATION}.
newSDocumentGraphLocation | location as URI |
Implemented in org.corpus_tools.salt.common.impl.SDocumentImpl.