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

Constructor Summary
AbstractLanguageResource()
           
 
Method Summary
 void cleanup()
          Clear the internal state of the resource
 DataStore getDataStore()
          Get the data store that this LR lives in.
 Object getLRPersistenceId()
          Returns the persistence id of this LR, if it has been stored in a datastore.
 void setDataStore(DataStore dataStore)
          Set the data store that this LR lives in.
 void setLRPersistenceId(Object lrID)
          Sets the persistence id of this LR.
 void sync()
          Save: synchonise the in-memory image of the LR with the persistent image.
 
Methods inherited from class gate.creole.AbstractResource
checkParameterValues, getName, getParameterValue, getParameterValue, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners
 
Methods inherited from class gate.util.AbstractFeatureBearer
getFeatures, setFeatures
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gate.Resource
getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Constructor Detail

AbstractLanguageResource

public AbstractLanguageResource()
Method Detail

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