public class CorpusEvent extends GateEvent
| Modifier and Type | Field and Description |
|---|---|
static int |
DOCUMENT_ADDED
Event type that is fired when a new document is added to a corpus
|
static int |
DOCUMENT_REMOVED
Event type that is fired when a document is removed from a corpus
|
FEATURES_UPDATED, typesource| Constructor and Description |
|---|
CorpusEvent(Corpus source,
Document doc,
int index,
int type)
Creates a new CorpusEvent.
|
CorpusEvent(Corpus source,
Document doc,
int index,
Object documentLRID,
int type)
Creates a new CorpusEvent.
|
| Modifier and Type | Method and Description |
|---|---|
Document |
getDocument()
Gets the dcument this event refers to
|
int |
getDocumentIndex()
Gets the index of the document this event refers to
|
Object |
getDocumentLRID()
Gets the persistence ID of the document to which this event refers.
|
getSource, toStringpublic static final int DOCUMENT_ADDED
public static final int DOCUMENT_REMOVED
public CorpusEvent(Corpus source, Document doc, int index, int type)
source - the corpus that fires the eventdoc - the document this event refers totype - the type of event (DOCUMENT_ADDED or
DOCUMENT_REMOVED).public CorpusEvent(Corpus source, Document doc, int index, Object documentLRID, int type)
source - the corpus that fires the eventdoc - the document this event refers todocumentLRID - the persistence ID of the document that has been added
or removed.type - the type of event (DOCUMENT_ADDED or
DOCUMENT_REMOVED).public Document getDocument()
public int getDocumentIndex()
public Object getDocumentLRID()
null, if the document does not have a
persistence ID.Copyright © 2024 GATE. All rights reserved.