|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractLanguageResource
gate.corpora.DocumentImpl
gate.corpora.DatabaseDocumentImpl
public class DatabaseDocumentImpl
Field Summary | |
---|---|
protected int |
dbType
|
protected gate.corpora.DatabaseDocumentImpl.EventsHandler |
eventHandler
The listener for the events coming from the features. |
Fields inherited from class gate.corpora.DocumentImpl |
---|
content, defaultAnnots, encoding, markupAware, namedAnnotSets, nextAnnotationId, nextNodeId, sourceUrl, sourceUrlEndOffset, sourceUrlStartOffset |
Fields inherited from class gate.creole.AbstractLanguageResource |
---|
dataStore, lrPersistentId |
Fields inherited from class gate.creole.AbstractResource |
---|
name |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Fields inherited from interface gate.corpora.EventAwareLanguageResource |
---|
DOC_CONTENT, DOC_MAIN, RES_FEATURES, RES_NAME |
Fields inherited from interface gate.SimpleDocument |
---|
DOCUMENT_URL_PARAMETER_NAME |
Constructor Summary | |
---|---|
DatabaseDocumentImpl()
|
|
DatabaseDocumentImpl(Connection conn)
|
Method Summary | |
---|---|
void |
cleanup()
Overriden to remove the features listener, when the document is closed. |
Collection |
getAddedAnnotationSets()
|
AnnotationSet |
getAnnotations()
Get the default set of annotations. |
AnnotationSet |
getAnnotations(String name)
Get a named set of annotations. |
DocumentContent |
getContent()
The content of the document: a String for text; MPEG for video; etc. |
String |
getEncoding()
Get the encoding of the document content source |
Object |
getInitData__$$__(Object initData)
|
Collection |
getLoadedAnnotationSets()
|
Map |
getNamedAnnotationSets()
Returns a map with the named annotation sets. |
LanguageResource |
getParent()
Returns the parent LR of this LR. |
Collection |
getRemovedAnnotationSets()
|
Resource |
init()
Initialise this resource, and return it. |
boolean |
isModified()
Returns true of an LR has been modified since the last sync. |
boolean |
isResourceChanged(int changeType)
|
void |
removeAnnotationSet(String name)
Removes one of the named annotation sets. |
void |
resourceAdopted(DatastoreEvent evt)
Called by a datastore when a new resource has been adopted |
void |
resourceDeleted(DatastoreEvent evt)
Called by a datastore when a resource has been deleted |
void |
resourceWritten(DatastoreEvent evt)
Called by a datastore when a resource has been wrote into the datastore |
void |
setContent(DocumentContent content)
Set method for the document content |
void |
setFeatures(FeatureMap features)
Set the feature set |
void |
setInitData__$$__(Object data)
|
void |
setMarkupAware(Boolean newMarkupAware)
Make the document markup-aware. |
void |
setName(String name)
Sets the name of this resource |
void |
setNextNodeId(int nextID)
|
void |
setParent(LanguageResource parentLR)
Sets the parent LR of this LR. |
void |
setSourceUrl(URL sourceUrl)
Set method for the document's URL |
void |
setSourceUrlEndOffset(Long sourceUrlEndOffset)
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
void |
setSourceUrlStartOffset(Long sourceUrlStartOffset)
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
Methods inherited from class gate.creole.AbstractLanguageResource |
---|
getDataStore, getLRPersistenceId, sync |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.LanguageResource |
---|
getDataStore, getLRPersistenceId, sync |
Methods inherited from interface gate.Resource |
---|
getParameterValue, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.NameBearer |
---|
getName |
Field Detail |
---|
protected int dbType
protected gate.corpora.DatabaseDocumentImpl.EventsHandler eventHandler
Constructor Detail |
---|
public DatabaseDocumentImpl()
public DatabaseDocumentImpl(Connection conn) throws PersistenceException
PersistenceException
Method Detail |
---|
public DocumentContent getContent()
getContent
in interface SimpleDocument
getContent
in class DocumentImpl
public String getEncoding()
getEncoding
in interface TextualDocument
getEncoding
in class DocumentImpl
public Map getNamedAnnotationSets()
null
if no named annotaton set exists.
getNamedAnnotationSets
in interface Document
getNamedAnnotationSets
in class DocumentImpl
public AnnotationSet getAnnotations()
getAnnotations
in interface SimpleDocument
getAnnotations
in class DocumentImpl
public AnnotationSet getAnnotations(String name)
getAnnotations
in interface SimpleDocument
getAnnotations
in class DocumentImpl
public void setContent(DocumentContent content)
setContent
in interface SimpleDocument
setContent
in class DocumentImpl
public void setFeatures(FeatureMap features)
setFeatures
in interface FeatureBearer
setFeatures
in class AbstractFeatureBearer
public void setName(String name)
setName
in interface NameBearer
setName
in class AbstractResource
public void setNextNodeId(int nextID)
public boolean isResourceChanged(int changeType)
isResourceChanged
in interface EventAwareLanguageResource
public void setSourceUrl(URL sourceUrl)
setSourceUrl
in interface SimpleDocument
setSourceUrl
in class DocumentImpl
public void setSourceUrlEndOffset(Long sourceUrlEndOffset)
setSourceUrlEndOffset
in interface Document
setSourceUrlEndOffset
in class DocumentImpl
public void setSourceUrlStartOffset(Long sourceUrlStartOffset)
setSourceUrlStartOffset
in interface Document
setSourceUrlStartOffset
in class DocumentImpl
public void setMarkupAware(Boolean newMarkupAware)
setMarkupAware
in interface Document
setMarkupAware
in class DocumentImpl
newMarkupAware
- markup awareness status.public void cleanup()
cleanup
in interface Resource
cleanup
in class DocumentImpl
public void resourceAdopted(DatastoreEvent evt)
resourceAdopted
in interface DatastoreListener
resourceAdopted
in class DocumentImpl
public void resourceDeleted(DatastoreEvent evt)
resourceDeleted
in interface DatastoreListener
resourceDeleted
in class DocumentImpl
public void resourceWritten(DatastoreEvent evt)
resourceWritten
in interface DatastoreListener
resourceWritten
in class DocumentImpl
public Collection getLoadedAnnotationSets()
getLoadedAnnotationSets
in interface EventAwareDocument
public Collection getRemovedAnnotationSets()
getRemovedAnnotationSets
in interface EventAwareDocument
public Collection getAddedAnnotationSets()
getAddedAnnotationSets
in interface EventAwareDocument
public void removeAnnotationSet(String name)
DocumentImpl
removeAnnotationSet
in interface SimpleDocument
removeAnnotationSet
in class DocumentImpl
name
- the name of the annotation set to be removedpublic boolean isModified()
isModified
in interface LanguageResource
isModified
in class AbstractLanguageResource
public LanguageResource getParent() throws PersistenceException, SecurityException
getParent
in interface LanguageResource
getParent
in class AbstractLanguageResource
PersistenceException
SecurityException
public void setParent(LanguageResource parentLR) throws PersistenceException, SecurityException
setParent
in interface LanguageResource
setParent
in class AbstractLanguageResource
PersistenceException
SecurityException
public void setInitData__$$__(Object data) throws PersistenceException, InvalidOffsetException
PersistenceException
InvalidOffsetException
public Object getInitData__$$__(Object initData)
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class DocumentImpl
ResourceInstantiationException
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |