gate.corpora
Class CorpusImpl
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--java.util.TreeSet
|
+--gate.corpora.CorpusImpl
- All Implemented Interfaces:
- Cloneable, Collection, Corpus, FeatureBearer, LanguageResource, Resource, Serializable, Set, SortedSet
- Direct Known Subclasses:
- CorpusWrapper
- public class CorpusImpl
- extends TreeSet
- implements Corpus
Corpora are sets of Document. They are ordered by lexicographic collation
on Url.
- See Also:
- Serialized Form
Methods inherited from class java.util.TreeSet |
add, addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
CorpusImpl
public CorpusImpl()
- Construction
init
public Resource init()
- Initialise this resource, and return it.
- Specified by:
init
in interface Resource
getName
public String getName()
- Get the name of the corpus.
- Specified by:
getName
in interface Corpus
setName
public void setName(String name)
- Set the name of the corpus.
- Specified by:
setName
in interface Corpus
getDataStore
public DataStore getDataStore()
- Get the data store the document lives in.
- Specified by:
getDataStore
in interface LanguageResource
setDataStore
public void setDataStore(DataStore dataStore)
throws PersistenceException
- Set the data store that this LR lives in.
- Specified by:
setDataStore
in interface LanguageResource
sync
public void sync()
throws PersistenceException
- Save: synchonise the in-memory image of the corpus with the persistent
image.
- Specified by:
sync
in interface LanguageResource
getFeatures
public FeatureMap getFeatures()
- Get the features associated with this corpus.
- Specified by:
getFeatures
in interface FeatureBearer
setFeatures
public void setFeatures(FeatureMap features)
- Set the feature set
- Specified by:
setFeatures
in interface FeatureBearer
equals
public boolean equals(Object other)
- Specified by:
equals
in interface Set
- Overrides:
equals
in class AbstractSet
hashCode
public int hashCode()
- A Hash value for this corpus
- Specified by:
hashCode
in interface Set
- Overrides:
hashCode
in class AbstractSet