gate.creole
Class AbstractLanguageResource
java.lang.Object
|
+--gate.util.AbstractFeatureBearer
|
+--gate.creole.AbstractResource
|
+--gate.creole.AbstractLanguageResource
- All Implemented Interfaces:
- FeatureBearer, LanguageResource, NameBearer, Resource, Serializable
- Direct Known Subclasses:
- AnnotationSchema, CorpusImpl, DocumentFormat, DocumentImpl, SerialCorpusImpl
- public abstract class AbstractLanguageResource
- extends AbstractResource
- implements LanguageResource
A convenience implementation of LanguageResource with some default code.
- See Also:
- Serialized Form
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
AbstractLanguageResource
public AbstractLanguageResource()
getDataStore
public DataStore getDataStore()
- Get the data store that this LR lives in. Null for transient LRs.
- 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
getLRPersistenceId
public Object getLRPersistenceId()
- Returns the persistence id of this LR, if it has been stored in
a datastore. Null otherwise.
- Specified by:
getLRPersistenceId
in interface LanguageResource
setLRPersistenceId
public void setLRPersistenceId(Object lrID)
- Sets the persistence id of this LR. To be used only in the
Factory and DataStore code.
- Specified by:
setLRPersistenceId
in interface LanguageResource
sync
public void sync()
throws PersistenceException,
SecurityException
- Save: synchonise the in-memory image of the LR with the persistent
image.
- Specified by:
sync
in interface LanguageResource
cleanup
public void cleanup()
- Clear the internal state of the resource
- Specified by:
cleanup
in interface Resource
- Overrides:
cleanup
in class AbstractResource