public class GateDocumentUpdater extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GateDocumentUpdater.HandleExistingAnns
What to do when adding an annotation that already exists in the document.
|
static class |
GateDocumentUpdater.HandleNewAnns
What to do when adding a new annotation.
|
Constructor and Description |
---|
GateDocumentUpdater(gate.Document doc)
Create a document updater with the default options.
|
GateDocumentUpdater(String text)
Create a document updater for updating a brand new document with this text.
|
Modifier and Type | Method and Description |
---|---|
gate.Document |
fromBdoc(BdocDocument bdoc)
Actually carry out the update of the GATE document from the BdocDocument.
|
gate.Document |
fromChangeLog(ChangeLog chlog)
Actually carry out the update of the GATE document from the Bdoc ChangeLog.
|
GateDocumentUpdater |
handleExistingAnnotation(GateDocumentUpdater.HandleExistingAnns option)
Specify how annotations with an id that already exists should be
handled.Default is ADD_WITH_NEW_ID
|
GateDocumentUpdater |
handleNewAnnotation(GateDocumentUpdater.HandleNewAnns option)
Specify how new annotations should be
handled.Default is ADD_WITH_NEW_ID.
|
GateDocumentUpdater |
noAnnotationSet()
Set the current list of known annotation set names to add to empty.
|
GateDocumentUpdater |
noFeature()
Clear the list of document feature names to use for updating.
|
GateDocumentUpdater |
updateName(boolean flag)
Set if the document name should get updated (default is yes).
|
GateDocumentUpdater |
useAnnotationSet(String name)
Include this annotation set in the updates.
|
GateDocumentUpdater |
useFeature(String name)
Add feature name to include for updating.
|
public GateDocumentUpdater(gate.Document doc)
doc
- the GATE document to updatepublic GateDocumentUpdater(String text)
text
- initial text to start building the document frompublic GateDocumentUpdater noAnnotationSet()
public GateDocumentUpdater updateName(boolean flag)
flag
- if false, prevents the updatepublic GateDocumentUpdater useAnnotationSet(String name)
name
- name of annotation set to includepublic GateDocumentUpdater noFeature()
public GateDocumentUpdater useFeature(String name)
name
- the name of the featurepublic GateDocumentUpdater handleExistingAnnotation(GateDocumentUpdater.HandleExistingAnns option)
option
- The annotation handling option to usepublic GateDocumentUpdater handleNewAnnotation(GateDocumentUpdater.HandleNewAnns option)
option
- The annotation handling option to usepublic gate.Document fromBdoc(BdocDocument bdoc)
bdoc
- the bdoc to use for the updatespublic gate.Document fromChangeLog(ChangeLog chlog)
chlog
- the changelog to use for the updatesCopyright © 2021 GATE. All rights reserved.