|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.creole.AbstractResource | +--gate.creole.AbstractLanguageResource | +--gate.corpora.DocumentImpl | +--gate.corpora.DatabaseDocumentImpl
Fields inherited from interface gate.corpora.EventAwareLanguageResource |
DOC_CONTENT, DOC_MAIN, RES_FEATURES, RES_NAME |
Constructor Summary | |
DatabaseDocumentImpl(Connection conn)
|
|
DatabaseDocumentImpl(Connection _conn,
String _name,
DatabaseDataStore _ds,
Long _persistenceID,
DocumentContent _content,
FeatureMap _features,
Boolean _isMarkupAware,
URL _sourceURL,
Long _urlStartOffset,
Long _urlEndOffset,
AnnotationSet _default,
Map _named)
|
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 |
Collection |
getLoadedAnnotationSets()
|
Map |
getNamedAnnotationSets()
Returns a map with the named annotation sets. |
Collection |
getRemovedAnnotationSets()
|
boolean |
isResourceChanged(int changeType)
Generate and return the next annotation ID |
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 |
setMarkupAware(Boolean newMarkupAware)
Make the document markup-aware. |
void |
setName(String name)
Sets the name of this resource |
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, setDataStore, sync |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.Document |
addDocumentListener, edit, getMarkupAware, getSourceUrl, getSourceUrlEndOffset, getSourceUrlOffsets, getSourceUrlStartOffset, removeDocumentListener, toXml, toXml |
Methods inherited from interface gate.LanguageResource |
getDataStore, getLRPersistenceId, setDataStore, setLRPersistenceId, sync |
Methods inherited from interface gate.Resource |
getParameterValue, init, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
getFeatures |
Methods inherited from interface gate.util.NameBearer |
getName |
Methods inherited from interface java.lang.Comparable |
compareTo |
Constructor Detail |
public DatabaseDocumentImpl(Connection conn)
public DatabaseDocumentImpl(Connection _conn, String _name, DatabaseDataStore _ds, Long _persistenceID, DocumentContent _content, FeatureMap _features, Boolean _isMarkupAware, URL _sourceURL, Long _urlStartOffset, Long _urlEndOffset, AnnotationSet _default, Map _named)
Method Detail |
public DocumentContent getContent()
getContent
in interface Document
getContent
in class DocumentImpl
public String getEncoding()
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 Document
getAnnotations
in class DocumentImpl
public AnnotationSet getAnnotations(String name)
getAnnotations
in interface Document
getAnnotations
in class DocumentImpl
public void setContent(DocumentContent content)
setContent
in interface Document
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 boolean isResourceChanged(int changeType)
isResourceChanged
in interface EventAwareLanguageResource
public void setSourceUrl(URL sourceUrl)
setSourceUrl
in interface Document
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
b
- markup awareness status.public void cleanup()
cleanup
in interface Resource
cleanup
in class DocumentImpl
public void resourceAdopted(DatastoreEvent evt)
resourceAdopted
in interface DatastoreListener
public void resourceDeleted(DatastoreEvent evt)
resourceDeleted
in interface DatastoreListener
public void resourceWritten(DatastoreEvent evt)
resourceWritten
in interface DatastoreListener
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)
Document
removeAnnotationSet
in interface Document
removeAnnotationSet
in class DocumentImpl
gate.Document
name
- the name of the annotation set to be removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |