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 |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
dataStore
protected transient DataStore dataStore
- The data store this LR lives in.
lrPersistentId
protected transient Object lrPersistentId
- The persistence ID of this LR. Only set, when dataStore is.
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
isModified
public boolean isModified()
- Returns true of an LR has been modified since the last sync.
Always returns false for transient LRs.
- Specified by:
isModified
in interface LanguageResource
getParent
public LanguageResource getParent()
throws PersistenceException,
SecurityException
- Returns the parent LR of this LR.
Only relevant for LRs that support shadowing. Most do not by default.
- Specified by:
getParent
in interface LanguageResource
setParent
public void setParent(LanguageResource parentLR)
throws PersistenceException,
SecurityException
- Sets the parent LR of this LR.
Only relevant for LRs that support shadowing. Most do not by default.
- Specified by:
setParent
in interface LanguageResource