|
|||||||||||
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.CorpusImpl
gate.corpora.DatabaseCorpusImpl
Nested Class Summary | |
private class |
DatabaseCorpusImpl.DatabaseCorpusIterator
|
(package private) class |
DatabaseCorpusImpl.EventsHandler
All the events from the features are handled by this inner class. |
Nested classes inherited from class gate.corpora.CorpusImpl |
CorpusImpl.VerboseList |
Field Summary | |
protected List |
addedDocuments
|
private static boolean |
DEBUG
Debug flag |
protected List |
documentData
|
protected DatabaseCorpusImpl.EventsHandler |
eventHandler
The listener for the events coming from the features. |
private boolean |
featuresChanged
|
private boolean |
nameChanged
|
protected List |
removedDocuments
|
Fields inherited from class gate.corpora.CorpusImpl |
documentsList, serialVersionUID, supportList |
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.Corpus |
CORPUS_DOCLIST_PARAMETER_NAME, CORPUS_NAME_PARAMETER_NAME |
Constructor Summary | |
DatabaseCorpusImpl()
|
|
DatabaseCorpusImpl(String _name,
DatabaseDataStore _ds,
Long _persistenceID,
FeatureMap _features,
Vector _dbDocs)
|
Method Summary | |
void |
add(int index,
Object element)
|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
cleanup()
Overriden to remove the features listener, when the document is closed. |
boolean |
contains(Object o)
|
boolean |
equals(Object o)
|
int |
findDocument(Document doc)
|
Object |
get(int index)
returns a document in the coprus by index |
List |
getAddedDocuments()
|
String |
getDocumentName(int index)
Gets the name of a document in this corpus. |
List |
getDocumentNames()
Gets the names of the documents in this corpus. |
Object |
getInitData__$$__(Object initData)
|
List |
getLoadedDocuments()
|
List |
getRemovedDocuments()
|
boolean |
isDocumentLoaded(int index)
This method returns true when the document is already loaded in memory |
boolean |
isModified()
Returns true of an LR has been modified since the last sync. |
boolean |
isPersistentDocument(int index)
This method returns true when the document is already stored on disk i.e., is not transient |
boolean |
isResourceChanged(int changeType)
|
private boolean |
isValidForAdoption(LanguageResource lr)
|
Iterator |
iterator()
|
Object |
remove(int index)
|
boolean |
remove(Object obj)
|
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 |
resourceUnloaded(CreoleEvent e)
Called when a Resource has been removed from the system |
void |
resourceWritten(DatastoreEvent evt)
Called by a datastore when a resource has been wrote into the datastore |
void |
setFeatures(FeatureMap features)
Set the feature set |
void |
setInitData__$$__(Object data)
|
void |
setName(String name)
Sets the name of this resource |
void |
unloadDocument(Document doc)
Unloads a document from memory |
void |
unloadDocument(int index)
Unloads the document from memory, but calls sync() first, to store the changes |
Methods inherited from class gate.corpora.CorpusImpl |
addCorpusListener, clear, clearDocList, containsAll, datastoreClosed, datastoreCreated, datastoreOpened, fireDocumentAdded, fireDocumentRemoved, getDocumentsList, hashCode, indexOf, init, isEmpty, lastIndexOf, listIterator, listIterator, populate, populate, removeAll, removeCorpusListener, resourceLoaded, resourceRenamed, retainAll, set, setDocumentsList, size, subList, toArray, toArray |
Methods inherited from class gate.creole.AbstractLanguageResource |
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, 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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.LanguageResource |
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, 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 featuresChanged
private boolean nameChanged
protected DatabaseCorpusImpl.EventsHandler eventHandler
protected List documentData
protected List removedDocuments
protected List addedDocuments
Constructor Detail |
public DatabaseCorpusImpl()
public DatabaseCorpusImpl(String _name, DatabaseDataStore _ds, Long _persistenceID, FeatureMap _features, Vector _dbDocs)
Method Detail |
public boolean add(Object o)
add
in interface List
add
in class CorpusImpl
public void add(int index, Object element)
add
in interface List
add
in class CorpusImpl
public boolean addAll(Collection c)
addAll
in interface List
addAll
in class CorpusImpl
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class CorpusImpl
private boolean isValidForAdoption(LanguageResource lr)
public void resourceAdopted(DatastoreEvent evt)
DatastoreListener
resourceAdopted
in interface DatastoreListener
public void resourceDeleted(DatastoreEvent evt)
DatastoreListener
resourceDeleted
in interface DatastoreListener
public void resourceWritten(DatastoreEvent evt)
DatastoreListener
resourceWritten
in interface DatastoreListener
public void resourceUnloaded(CreoleEvent e)
CreoleListener
Resource
has been removed from the system
resourceUnloaded
in interface CreoleListener
resourceUnloaded
in class CorpusImpl
public boolean isResourceChanged(int changeType)
isResourceChanged
in interface EventAwareLanguageResource
public boolean isModified()
isModified
in interface LanguageResource
isModified
in class AbstractLanguageResource
public void setName(String name)
setName
in interface NameBearer
setName
in class AbstractResource
public void setFeatures(FeatureMap features)
setFeatures
in interface FeatureBearer
setFeatures
in class AbstractFeatureBearer
public void cleanup()
cleanup
in interface Resource
cleanup
in class CorpusImpl
public void setInitData__$$__(Object data)
public Object getInitData__$$__(Object initData)
public List getDocumentNames()
getDocumentNames
in interface Corpus
getDocumentNames
in class CorpusImpl
List
of Strings representing the names of the documents
in this corpus.public String getDocumentName(int index)
getDocumentName
in interface Corpus
getDocumentName
in class CorpusImpl
index
- the index of the document
public Object get(int index)
get
in interface List
get
in class CorpusImpl
index
- the index of the document
public Object remove(int index)
remove
in interface List
remove
in class CorpusImpl
public boolean remove(Object obj)
remove
in interface List
remove
in class CorpusImpl
public int findDocument(Document doc)
public boolean contains(Object o)
contains
in interface List
contains
in class CorpusImpl
public Iterator iterator()
iterator
in interface List
iterator
in class CorpusImpl
public List getLoadedDocuments()
getLoadedDocuments
in interface EventAwareCorpus
public List getRemovedDocuments()
getRemovedDocuments
in interface EventAwareCorpus
public List getAddedDocuments()
getAddedDocuments
in interface EventAwareCorpus
public void unloadDocument(int index)
public void unloadDocument(Document doc)
unloadDocument
in interface Corpus
unloadDocument
in class CorpusImpl
public boolean isDocumentLoaded(int index)
isDocumentLoaded
in interface Corpus
isDocumentLoaded
in class CorpusImpl
public boolean isPersistentDocument(int index)
public boolean equals(Object o)
equals
in interface List
equals
in class CorpusImpl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |