|
||||||||||
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
Inner Class Summary | |
(package private) class |
DatabaseDocumentImpl.EventsHandler
All the events from the features are handled by this inner class. |
Inner classes inherited from class gate.corpora.DocumentImpl |
DocumentImpl.AnnotationComparator |
Field Summary | |
private Collection |
addedAnotationSets
|
private boolean |
contentChanged
|
private Object |
contentLock
|
protected int |
dbType
|
private static boolean |
DEBUG
|
private boolean |
documentChanged
|
protected DatabaseDocumentImpl.EventsHandler |
eventHandler
The listener for the events coming from the features. |
private boolean |
featuresChanged
|
private boolean |
isContentRead
|
private Connection |
jdbcConn
|
private String |
jdbcSchema
|
private int |
maxAnnotationId
|
private boolean |
nameChanged
|
private Document |
parentDocument
|
private Collection |
removedAnotationSets
|
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 |
Constructor Summary | |
DatabaseDocumentImpl()
|
|
DatabaseDocumentImpl(Connection conn)
|
Method Summary | |
private void |
_getAnnotations(String name)
|
private void |
_readContent()
|
private HashMap |
_readFeatures(Long asetID)
|
private void |
_setAnnotations(String setName,
Collection annotations)
|
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. |
private List |
getAnnotationsForOffset(AnnotationSet aDumpAnnotSet,
Long offset)
|
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 |
private void |
setDatabaseInfo(Connection conn)
|
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, getName, getParameterValue, getParameterValue, removeResourceListeners, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, 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.FeatureBearer |
getFeatures |
Methods inherited from interface gate.util.NameBearer |
getName |
Field Detail |
private static final boolean DEBUG
private boolean isContentRead
private Object contentLock
private Connection jdbcConn
private String jdbcSchema
protected int dbType
private boolean contentChanged
private boolean featuresChanged
private boolean nameChanged
private boolean documentChanged
private Collection removedAnotationSets
private Collection addedAnotationSets
private Document parentDocument
private int maxAnnotationId
protected DatabaseDocumentImpl.EventsHandler eventHandler
Constructor Detail |
public DatabaseDocumentImpl()
public DatabaseDocumentImpl(Connection conn) throws PersistenceException
Method Detail |
private void setDatabaseInfo(Connection conn) throws PersistenceException
public DocumentContent getContent()
getContent
in class DocumentImpl
private void _readContent()
public String getEncoding()
getEncoding
in class DocumentImpl
gate.TextualDocument
public Map getNamedAnnotationSets()
null
if no named annotaton set exists.getNamedAnnotationSets
in class DocumentImpl
public AnnotationSet getAnnotations()
getAnnotations
in class DocumentImpl
public AnnotationSet getAnnotations(String name)
getAnnotations
in class DocumentImpl
private void _getAnnotations(String name)
private HashMap _readFeatures(Long asetID)
public void setContent(DocumentContent content)
setContent
in class DocumentImpl
public void setFeatures(FeatureMap features)
setFeatures
in class AbstractFeatureBearer
public void setName(String name)
setName
in class AbstractResource
private List getAnnotationsForOffset(AnnotationSet aDumpAnnotSet, Long offset)
public void setNextNodeId(int nextID)
public boolean isResourceChanged(int changeType)
isResourceChanged
in interface EventAwareLanguageResource
private void _setAnnotations(String setName, Collection annotations) throws InvalidOffsetException
public void setSourceUrl(URL sourceUrl)
setSourceUrl
in class DocumentImpl
public void setSourceUrlEndOffset(Long sourceUrlEndOffset)
setSourceUrlEndOffset
in class DocumentImpl
public void setSourceUrlStartOffset(Long sourceUrlStartOffset)
setSourceUrlStartOffset
in class DocumentImpl
public void setMarkupAware(Boolean newMarkupAware)
setMarkupAware
in class DocumentImpl
b
- markup awareness status.public void cleanup()
cleanup
in class DocumentImpl
public void resourceAdopted(DatastoreEvent evt)
resourceAdopted
in class DocumentImpl
public void resourceDeleted(DatastoreEvent evt)
resourceDeleted
in class DocumentImpl
public void resourceWritten(DatastoreEvent evt)
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 class DocumentImpl
gate.corpora.DocumentImpl
name
- the name of the annotation set to be removedpublic boolean isModified()
isModified
in class AbstractLanguageResource
public LanguageResource getParent() throws PersistenceException, SecurityException
getParent
in class AbstractLanguageResource
public void setParent(LanguageResource parentLR) throws PersistenceException, SecurityException
setParent
in class AbstractLanguageResource
public void setInitData__$$__(Object data) throws PersistenceException, InvalidOffsetException
public Object getInitData__$$__(Object initData)
public Resource init() throws ResourceInstantiationException
init
in class DocumentImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |