|
|||||||||||
| 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
| Nested Class Summary | |
(package private) class |
DatabaseDocumentImpl.EventsHandler
All the events from the features are handled by this inner class. |
| Nested 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.corpora.DocumentImpl |
content, defaultAnnots, encoding, markupAware, namedAnnotSets, nextAnnotationId, nextNodeId, serialVersionUID, 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 | |
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, 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 |
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
PersistenceExceptionpublic DocumentContent getContent()
getContent in interface SimpleDocumentgetContent in class DocumentImplprivate void _readContent()
public String getEncoding()
getEncoding in interface TextualDocumentgetEncoding in class DocumentImplpublic Map getNamedAnnotationSets()
null
if no named annotaton set exists.
getNamedAnnotationSets in interface DocumentgetNamedAnnotationSets in class DocumentImplpublic AnnotationSet getAnnotations()
getAnnotations in interface SimpleDocumentgetAnnotations in class DocumentImplpublic AnnotationSet getAnnotations(String name)
getAnnotations in interface SimpleDocumentgetAnnotations in class DocumentImplprivate void _getAnnotations(String name)
private HashMap _readFeatures(Long asetID)
public void setContent(DocumentContent content)
setContent in interface SimpleDocumentsetContent in class DocumentImplpublic void setFeatures(FeatureMap features)
setFeatures in interface FeatureBearersetFeatures in class AbstractFeatureBearerpublic void setName(String name)
setName in interface NameBearersetName 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
InvalidOffsetExceptionpublic void setSourceUrl(URL sourceUrl)
setSourceUrl in interface SimpleDocumentsetSourceUrl in class DocumentImplpublic void setSourceUrlEndOffset(Long sourceUrlEndOffset)
setSourceUrlEndOffset in interface DocumentsetSourceUrlEndOffset in class DocumentImplpublic void setSourceUrlStartOffset(Long sourceUrlStartOffset)
setSourceUrlStartOffset in interface DocumentsetSourceUrlStartOffset in class DocumentImplpublic void setMarkupAware(Boolean newMarkupAware)
setMarkupAware in interface DocumentsetMarkupAware in class DocumentImplnewMarkupAware - markup awareness status.public void cleanup()
cleanup in interface Resourcecleanup in class DocumentImplpublic void resourceAdopted(DatastoreEvent evt)
resourceAdopted in interface DatastoreListenerresourceAdopted in class DocumentImplpublic void resourceDeleted(DatastoreEvent evt)
resourceDeleted in interface DatastoreListenerresourceDeleted in class DocumentImplpublic void resourceWritten(DatastoreEvent evt)
resourceWritten in interface DatastoreListenerresourceWritten in class DocumentImplpublic Collection getLoadedAnnotationSets()
getLoadedAnnotationSets in interface EventAwareDocumentpublic Collection getRemovedAnnotationSets()
getRemovedAnnotationSets in interface EventAwareDocumentpublic Collection getAddedAnnotationSets()
getAddedAnnotationSets in interface EventAwareDocumentpublic void removeAnnotationSet(String name)
DocumentImpl
removeAnnotationSet in interface SimpleDocumentremoveAnnotationSet in class DocumentImplname - the name of the annotation set to be removedpublic boolean isModified()
isModified in interface LanguageResourceisModified in class AbstractLanguageResource
public LanguageResource getParent()
throws PersistenceException,
SecurityException
getParent in interface LanguageResourcegetParent in class AbstractLanguageResourcePersistenceException
SecurityException
public void setParent(LanguageResource parentLR)
throws PersistenceException,
SecurityException
setParent in interface LanguageResourcesetParent in class AbstractLanguageResourcePersistenceException
SecurityException
public void setInitData__$$__(Object data)
throws PersistenceException,
InvalidOffsetException
PersistenceException
InvalidOffsetExceptionpublic Object getInitData__$$__(Object initData)
public Resource init()
throws ResourceInstantiationException
init in interface Resourceinit in class DocumentImplResourceInstantiationException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||