|
static String | createQName (String namespace, String name) |
| Returns the concatenation of a labels namespace and a labels name as a qualified name: qname= NAMESPACE {@value NAMESPACE_SEPERATOR} NAME. More...
|
|
static Pair< String, String > | splitQName (String qName) |
| Splits the passed qName into a namespace and a name. More...
|
|
static URI | createSaltURI (URI path) |
| When specified corpus path already contains salt schema, then specified corpus path is returned. More...
|
|
static URI | createSaltURI (String path) |
| When specified corpus path already contains salt schema, then specified corpus path is returned. More...
|
|
static String | getGlobalId (Identifier id) |
| Returns a global ID for the passed object (either if Identifier belongs to SDocument or SCorpus object). More...
|
|
static Object | load (URI location) |
| Loads an object coming from a SaltXML (. More...
|
|
static List< Object > | loadObjects (URI location) |
| Loads a list of root objects coming from a SaltXML (. More...
|
|
static void | moveCorpusGraph (SCorpusGraph source, SCorpusGraph target) |
| Moves the content of source to target . More...
|
|
static void | saveDocumentGraph (SDocumentGraph documentGraph, URI location) |
| Persists the passed SDocumentGraph object in a SaltXML file at the passed location. More...
|
|
static SDocumentGraph | loadDocumentGraph (URI location) |
| Loads a SDocumentGraph object and returns it. More...
|
|
static void | saveCorpusGraph (SCorpusGraph corpusGraph, URI location) |
| Persists the passed SCorpusGraph object in a {@value SaltUtil::FILE_ENDING_SALT_XML} file at the passed location. More...
|
|
static SCorpusGraph | loadCorpusGraph (URI corpusPath) |
| Loads the given SaltXML file (. More...
|
|
static SCorpusGraph | loadCorpusGraph (URI corpusPath, Integer idxOfSCorpusGraph) |
| Loads the given SaltXML file (. More...
|
|
static void | saveSaltProject (SaltProject saltProject, URI location) |
| Persists the passed SaltProject object in a SaltXML file at the passed location. More...
|
|
static SaltProject | loadCompleteSaltProject (URI location) |
| Loads a SaltProject from given uri and returns it as object structure. More...
|
|
static SaltProject | loadSaltProject (URI location) |
| Loads a SaltProject from given uri and returns it as object structure. More...
|
|
static void | saveCorpusGraph_DOT (SCorpusGraph corpusGraph, URI location) |
| Stores a SCorpusGraph into DOT file. More...
|
|
static void | saveDocumentGraph_DOT (SDocumentGraph documentGraph, URI location) |
| Stores a SDocumentGraph into DOT file. More...
|
|
static void | save_DOT (Object saltObject, URI location) |
| This method stores a Salt model in the dot syntax (see: http://www.graphviz.org/) in a file. More...
|
|
static< P extends Label > P | getAnnotation (Integer idx, Set< P > annotations) |
| Returns the annotation at position idx in the passed set of annotations. More...
|
|
static void | moveAnnotations (SAnnotationContainer from, SAnnotationContainer to) |
| Moves all SAnnotation objects from from to to . More...
|
|
static void | moveMetaAnnotations (SAnnotationContainer from, SAnnotationContainer to) |
| Moves all SMetaAnnotation objects from from to to . More...
|
|
static Collection< String[]> | unmarshalAnnotation (String marshalledString) |
| Splits an annotation string of the form 'namespace::name=value (,namespace::name=value)* into a collection of (namespace, name, value). More...
|
|
static< S extends Object > Builder< S > | compare (S saltElement) |
| Creates a builder to have a fluent api for comparing two SDocumentGraphs or SCorpusGraphs. More...
|
|
static< T > boolean | isNullOrEmpty (final Collection< T > collection) |
| Checks whether a collection is null or empty. More...
|
|
static< T > boolean | isNotNullOrEmpty (final Collection< T > collection) |
| Checks whether a collection is not null nor empty. More...
|
|
static boolean | belongsToCorpusStructure (final Object element) |
| Returns whether specified Salt element is part of the corpus structure. More...
|
|
static< T extends Object > Validator.Builder< T > | validate (T saltObject) |
| Validates a salt project, a document structure or a corpus structure. More...
|
|
|
static final String | SALT_SCHEME = "salt" |
| The URI scheme for corpus pathes.
|
|
static final String | FILE_ENDING_SALT_XML = "salt" |
| The ending of a Salt XML file.
|
|
static final String | FILE_ENDING_DOT = "dot" |
| The ending of a dot file.
|
|
static final String | FILE_SALT_PROJECT = "saltProject" + "." + FILE_ENDING_SALT_XML |
| Default name of the saltProject file.
|
|
static final String | SALT_NAMESPACE = "salt" |
| default name for of derived namespace-attribute
|
|
static final String | NAMESPACE_SEPERATOR = "::" |
| Separator between namespace and name: qname= NAMESPACE {@value NAMESPACE_SEPERATOR} NAME.
|
|
static final String | SALT_NULL_VALUE = SaltUtil.SALT_NAMESPACE + SaltUtil.NAMESPACE_SEPERATOR + "NULL" |
| A NULL value as String.
|
|
static final String | IDX_NODETYPE = "idx_sNodeType" |
| name of index for node-types
|
|
static final String | IDX_RELATIONTYPE = "idx_sRelationType" |
| name of index for relation-types
|
|
static final String | IDX_ID_NODES = "idx_id_nodes" |
| name of index for relating ids and nodes
|
|
static final String | IDX_ID_NODES_INVERSE = "idx_id_nodes_inverse" |
| name of index for relating ids and nodes (inverse)
|
|
static final String | IDX_ID_RELATIONS = "idx_id_relation" |
| name of index for relating ids and relations
|
|
static final String | IDX_ID_RELATIONS_INVERSE = "idx_id_relation_inverse" |
| name of index for relating ids and relations (inverse)
|
|
static final String | IDX_ID_LAYER = "idx_id_layer" |
| name of index for relating ids and layers
|
|
static final String | IDX_OUT_RELATIONS = "idx_out_relations" |
| name of index for relating node ids and outgoing relations
|
|
static final String | IDX_IN_RELATIONS = "idx_in_relations" |
| name of index for relating node ids and incoming relations
|
|
static final String | LABEL_ID = "id" |
| Name of Label to store the identifier of a node, relation, graph or layer.
|
|
static final String | LABEL_ID_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + LABEL_ID |
| Qualified name of Label to store the identifier of a node, relation, graph or layer.
|
|
static final String | FEAT_VALUE_DATATYPE = "SVAL_TYPE" |
| Name for SFeature to store the type of a labels value.
|
|
static final String | FEAT_NAME = "SNAME" |
| Name for SFeature to store the name of a node, relation, graph or label.
|
|
static final String | FEAT_NAME_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_NAME |
| Qualified name for SFeature to store the name of a node, relation, graph or label.
|
|
static final String | FEAT_TYPE = "STYPE" |
| Name for SFeature to store the type of a relation.
|
|
static final String | FEAT_TYPE_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_TYPE |
| Qualified name for SFeature to store the type of a relation.
|
|
static final String | FEAT_SDOCUMENT_GRAPH = "SDOCUMENT_GRAPH" |
| Name for SFeature to store the SDocumentGraph in a SDocument object.
|
|
static final String | FEAT_SDOCUMENT_GRAPH_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + "SDOCUMENT_GRAPH" |
| Qualified name for SFeature to store the SDocumentGraph in a SDocument object.
|
|
static final String | FEAT_SDOCUMENT = "SDOCUMENT" |
| Name for SFeature to store the SDocument corresponding to a SDocumentGraph object.
|
|
static final String | FEAT_SDOCUMENT_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + "SDOCUMENT" |
| Qualified name for SFeature to store the SDocument corresponding to a SDocumentGraph object.
|
|
static final String | FEAT_SDOCUMENT_GRAPH_LOCATION = "SDOCUMENT_GRAPH_LOCATION" |
| Name for SFeature to store the uri reference of a SDocumentGraph in a SDocument.
|
|
static final String | FEAT_SDOCUMENT_GRAPH_LOCATION_QNAME |
| Qualified name name for SFeature to store the uri reference of a SDocumentGraph in a SDocument. More...
|
|
static final String | FEAT_SMEDIA_REFERNCE = "SAUDIO_REFERENCE" |
| The name of the SFeature for the reference to an audio file.
|
|
static final String | FEAT_SMEDIA_REFERNCE_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_SMEDIA_REFERNCE |
| The qualified name of the name of the SFeature for the reference to an audio file.
|
|
static final String | FEAT_SSTART = "SSTART" |
| The name of the SFeature for the start value.
|
|
static final String | FEAT_SSTART_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_SSTART |
| The qualified name of the name of the SFeature for the start value.
|
|
static final String | FEAT_SEND = "SEND" |
| The name of the SFeature for the end value.
|
|
static final String | FEAT_SEND_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_SEND |
| The qualified name of the name of the SFeature for the end value.
|
|
static final String | FEAT_SDATA = "SDATA" |
| The name of the SFeature for the data label for textual sources, etc. More...
|
|
static final String | FEAT_SDATA_QNAME = SALT_NAMESPACE + NAMESPACE_SEPERATOR + FEAT_SDATA |
| Qualified name name of the SFeature for the data label for textual sources, etc. More...
|
|
static final String | SEMANTICS_CAT = "cat" |
| name for SCatAnnotation
|
|
static final String | SEMANTICS_POS = "pos" |
| name for SPOSAnnotation
|
|
static final String | SEMANTICS_LEMMA = "lemma" |
| name for SLemmaAnnotation
|
|
static final String | SEMANTICS_SENTENCE = "sentence" |
| name for SSentenceAnnotation
|
|
static final String | SEMANTICS_TYPE = "type" |
| value for STypeAnnotation
|
|
static final String | SEMANTICS_WORD = "word" |
| value for SWordAnnotation
|
|
static final String | SEMANTICS_UNIT = "unit" |
| name for SWordAnnotation and SSentenceAnnotation
|
|
This class contains a set of helpful methods.
- Author
- florian
static void org.corpus_tools.salt.util.SaltUtil.save_DOT |
( |
Object |
saltObject, |
|
|
URI |
location |
|
) |
| |
|
static |
This method stores a Salt model in the dot syntax (see: http://www.graphviz.org/) in a file.
The stored dot graph can be visualized via the Graphviz toolbox (see: http://www.graphviz.org/) into a bunch of graphical formats like jpeg, png, svg etc..
In case of a SaltProject like the following is stored:
|-----------------------------------------------|
| SaltProject: |
|-----------------------------------------------|
| corpus-structure 0 | corpus-structure 1 |
| | |
| c1 | c1 |
| / \ | | |
| c2 c3 | d1 |
| / | \ | \ | |
| d1 d2 d3 d4 d5 | |
|-----------------------------------------------|
A structure like the following is created:
|-0
| |-c1
| | |-c2
| | |-d1.dot
| | |-d2.dot
| | |-d3.dot
| | |-c3
| | |-d4.dot
| | |-d5.dot
| |-0.dot
|-1
|-c1
| |-d1.dot
|-1.dot