public class SCorpusGraphImpl extends SGraphImpl implements SCorpusGraph
SGraph.GRAPH_TRAVERSE_TYPE| Modifier and Type | Field and Description |
|---|---|
protected SaltProject |
saltProject
Salt-project containing this corpus structure
|
nameapproximatedNodeDegree, expectedNodes, expectedRelations, indexMgrEXPECTED_NUMBER_OF_LABELS| Constructor and Description |
|---|
SCorpusGraphImpl() |
| Modifier and Type | Method and Description |
|---|---|
Identifier |
addDocument(SCorpus corpus,
SDocument document)
Adds the given document to the
SCorpusGraph object and creates an
SCorpusDocumentRelation between the given corpus and the
document, if and only if the corpus is already added to this object. |
Identifier |
addSubCorpus(SCorpus superCorpus,
SCorpus subCorpus)
Adds the given sSubCorpus to the SCorpusGraph object and creates an
SCorpusRelation between the given super corpus and the sub
corpus, if and only if the super corpus is already added to this object. |
void |
basic_setSaltProject(SaltProject saltProject)
This is an internally used method.
|
protected void |
basicAddNode(SNode node)
Calls the super method an puts the given node into a node type index. an
exception will be thrown.
|
protected void |
basicAddRelation(Relation<? extends Node,? extends Node> relation)
Calls the super method an puts the given relation into a relation type
index. an exception will be thrown.
|
SCorpus |
createCorpus(SCorpus superCorpus,
String corpusName)
Creates a new
SCorpus object having the name
corpusName. |
List<SCorpus> |
createCorpus(org.eclipse.emf.common.util.URI corpusPath)
|
SDocument |
createDocument(SCorpus parentCorpus,
String documentName)
Creates a
SDocument object having the name
documentName and is added to the given
parentCorpus via a SCorpusDocumentRelation. |
SDocument |
createDocument(org.eclipse.emf.common.util.URI documentPath)
|
List<SCorpus> |
getCorpora()
Returns all corpora contained in this corpus structure.
|
SCorpus |
getCorpus(Identifier corpusId)
Returns a corpus matching the passed identifier if such a corpus is
contained in this corpus structure.
|
SCorpus |
getCorpus(SDocument document)
Returns the
SCorpus object, which contains the given
SDocument object (means the SCorpus object and the given
SDocument object must be connected via a
SCorpusDocumentRelation object). |
List<SCorpusDocumentRelation> |
getCorpusDocumentRelations()
Returns all corpus-document relations contained in this corpus structure.
|
List<SCorpusRelation> |
getCorpusRelations()
Returns all corpus-corpus relations contained in this corpus structure.
|
SDocument |
getDocument(Identifier documentId)
Returns a document matching the passed identifier if such a document is
contained in this document structure.
|
List<SDocument> |
getDocuments()
Returns all documents objects contained in this corpus structure.
|
SaltProject |
getSaltProject()
Returns the salt project, to which this corpus structure belongs to.
|
protected void |
init()
Calls the init of super class and expands its initialization for adding
SaltUtil.IDX_NODETYPE of indexes:
Initializes index SaltUtil.IDX_NODETYPE
Initializes index SaltUtil.IDX_RELATIONTYPE
|
void |
load(org.eclipse.emf.common.util.URI corpusGraphUri)
Loads the content of this object by reading the SaltXML file located by
the given
URI. |
void |
setSaltProject(SaltProject saltProject)
Sets the salt project, to which this corpus structure belongs to.
|
addAnnotation, addFeature, addLayer, addMetaAnnotation, addProcessingAnnotation, createAnnotation, createAnnotations, createFeature, createFeatures, createMetaAnnotation, createMetaAnnotations, createProcessingAnnotation, createProcessingAnnotations, getAnnotation, getAnnotation, getAnnotations, getFeature, getFeature, getFeatures, getLayerByName, getLeafs, getMetaAnnotation, getMetaAnnotations, getName, getNodesByName, getPath, getProcessingAnnotation, getProcessingAnnotations, getRelationsByName, getRoots, iterator_SAnnotation, iterator_SFeature, iterator_SMetaAnnotation, iterator_SProcessingAnnotation, removeLabel, setName, traverse, traverseaddNode, addRelation, basicAddLayer, basicRemoveLayer, basicRemoveNode, basicRemoveRelation, containsLayer, containsNode, containsRelation, getIndexMgr, getInRelations, getLayer, getLayers, getNode, getNodes, getOutRelations, getRelation, getRelations, getRelations, removeLayer, removeNode, removeRelation, removeRelations, updategetId, getIdentifier, setId, setIdentifier, toStringaddLabel, basicAddLabel, basicRemoveLabel, containsLabel, getLabel, getLabel, getLabels, getLabelsByNamespace, removeAll, removeLabel, sizeLabelsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLayerByName, getLeafs, getNodesByName, getRelationsByName, getRoots, traverse, traverseaddLayer, addNode, addRelation, containsLayer, containsNode, containsRelation, getIndexMgr, getInRelations, getLayer, getLayers, getNode, getNodes, getOutRelations, getRelation, getRelations, getRelations, removeLayer, removeNode, removeRelation, removeRelationsgetId, getIdentifier, setId, setIdentifieraddLabel, containsLabel, getLabel, getLabel, getLabels, getLabelsByNamespace, removeAll, removeLabel, removeLabel, sizeLabelsaddAnnotation, addFeature, addMetaAnnotation, addProcessingAnnotation, createAnnotation, createAnnotations, createFeature, createFeatures, createMetaAnnotation, createMetaAnnotations, createProcessingAnnotation, createProcessingAnnotations, getAnnotation, getAnnotation, getAnnotations, getFeature, getFeature, getFeatures, getMetaAnnotation, getMetaAnnotations, getProcessingAnnotation, getProcessingAnnotations, iterator_SAnnotation, iterator_SFeature, iterator_SMetaAnnotation, iterator_SProcessingAnnotationgetName, setNamegetPathprotected transient SaltProject saltProject
protected void init()
SaltUtil.IDX_NODETYPE of indexes:
SaltUtil.IDX_NODETYPESaltUtil.IDX_RELATIONTYPEpublic SaltProject getSaltProject()
getSaltProject in interface SCorpusGraphpublic void setSaltProject(SaltProject saltProject)
setSaltProject in interface SCorpusGraphsaltProject - salt project containing this corpus structurepublic void basic_setSaltProject(SaltProject saltProject)
SCorpusGraph and SaltProject object when an node is
inserted into this graph and to avoid an endless invocation the insertion
of an node is splited into the two methods
setSaltProject(SaltProject) and
basic_setSaltProject(SaltProject).saltProject - the Salt project containing the corpus structureprotected void basicAddRelation(Relation<? extends Node,? extends Node> relation)
protected void basicAddNode(SNode node)
public List<SCorpus> getCorpora()
getCorpora in interface SCorpusGraphpublic List<SDocument> getDocuments()
getDocuments in interface SCorpusGraphpublic List<SCorpusRelation> getCorpusRelations()
getCorpusRelations in interface SCorpusGraphpublic List<SCorpusDocumentRelation> getCorpusDocumentRelations()
getCorpusDocumentRelations in interface SCorpusGraphpublic SCorpus getCorpus(Identifier corpusId)
getCorpus in interface SCorpusGraphcorpusId - identifier corresponding to the corpus to be searchedpublic SDocument getDocument(Identifier documentId)
getDocument in interface SCorpusGraphdocumentId - identifier corresponding to the document to be searchedpublic Identifier addSubCorpus(SCorpus superCorpus, SCorpus subCorpus)
SCorpusRelation between the given super corpus and the sub
corpus, if and only if the super corpus is already added to this object.
Otherwise an exception will be thrown. The method returns the identifier
for the generated SCorpusRelation object.addSubCorpus in interface SCorpusGraphsuperCorpus - corpus which already has to be addedsubCorpus - corpus to addSCorpusRelation object.public Identifier addDocument(SCorpus corpus, SDocument document)
SCorpusGraph object and creates an
SCorpusDocumentRelation between the given corpus and the
document, if and only if the corpus is already added to this object.
Otherwise an exception will be thrown. The method returns the
Identifier for the generated SCorpusDocumentRelation
object.addDocument in interface SCorpusGraphcorpus - corpus to which the document has to be addeddocument - document to addSCorpusDocumentRelation
objectpublic SCorpus getCorpus(SDocument document)
SCorpus object, which contains the given
SDocument object (means the SCorpus object and the given
SDocument object must be connected via a
SCorpusDocumentRelation object).getCorpus in interface SCorpusGraphdocument - the SDocument object beyond the SCorpus object
to be returnedSCorpus object containing documentpublic void load(org.eclipse.emf.common.util.URI corpusGraphUri)
URI. The SaltXML file can either contain a
SaltProject, than the first SCorpusGraph object is loaded
or just a SCorpusGraph object.load in interface SCorpusGraphcorpusGraphUri - loaction of the SaltXML filepublic SCorpus createCorpus(SCorpus superCorpus, String corpusName)
SCorpus object having the name
corpusName. The new created SCorpus object is added
as a sub corpus to the passed superCorpus. An
SCorpusRelation is created to connect them. The new created
SCorpus is returned. If superSCorpus does not exist,
a root corpus is created.createCorpus in interface SCorpusGraphsuperCorpus - the parent SCorpus objectcorpusName - the name of the SCorpus object to be new createdSCorpus objectpublic SDocument createDocument(SCorpus parentCorpus, String documentName)
SDocument object having the name
documentName and is added to the given
parentCorpus via a SCorpusDocumentRelation.createDocument in interface SCorpusGraphparentCorpus - the parent SCorpus objectdocumentName - the name of the SDocument object to be new createdSDocument object public List<SCorpus> createCorpus(org.eclipse.emf.common.util.URI corpusPath)
SCorpus objects contained in the passed
corpusPath and returns a list of all SCorpus
objects.createCorpus in interface SCorpusGraphcorpusPath - the URI path of corporaSCorpus objects public SDocument createDocument(org.eclipse.emf.common.util.URI documentPath)
SCorpus objects contained in the passed corpusPath
and assumes, that the last segment is a SDocument object. The
created SDocument than is returned.createDocument in interface SCorpusGraphdocumentPath - the URI path of the documentCopyright © 2009–2015 Humboldt-Universität zu Berlin, INRIA. All rights reserved.