|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.creole.AbstractResource | +--gate.creole.AbstractLanguageResource | +--gate.corpora.DocumentImpl | +--gate.db.DocumentWrapper
This class extends DocumentImpl adding database persistence via Jdbc.
Constructor Summary | |
DocumentWrapper(Connection con,
Database db,
DocumentImpl doc)
Construction from Document. |
|
DocumentWrapper(Connection con,
Database ds,
long id)
Construction from ID. |
|
DocumentWrapper(DataStore ds,
DocumentImpl doc)
Construction from Document. |
|
DocumentWrapper(DataStore ds,
long id)
Construction from ID. |
|
DocumentWrapper(DataStore ds,
String urlString)
Construction from String representing URL |
|
DocumentWrapper(DataStore ds,
URL u)
Construction from URL; content read over the net. |
|
DocumentWrapper(DataStore ds,
URL u,
Long start,
Long end)
Construction from URL and offsets. |
|
DocumentWrapper(URL u,
String encoding,
Long start,
Long end)
Construction from URL and offsets. |
Method Summary | |
void |
beginTransaction()
Starts a transaction |
void |
commit()
Commits the reads/writes |
void |
disconnect()
Disconnects from the Datastore object, i.e. |
DataStore |
getDataStore()
Returns the Datastore object associated to this persistent document. |
long |
getId()
Gets the database ID of this persistent object. |
boolean |
isNew()
Can be used to check if this document is an old one that has been retrieved from the databse or is a new one that has just been saved. |
void |
rollback()
Rolls back all the actions performed since the last beginTransaction call |
static boolean |
setupDatabase(DataStore ds)
Checks if the provided datastore id proper for storing persistent documents of this type. |
Methods inherited from class gate.creole.AbstractLanguageResource |
setDataStore, sync |
Methods inherited from class gate.creole.AbstractResource |
getName, setName |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.LanguageResource |
setDataStore, sync |
Methods inherited from interface gate.Resource |
init |
Methods inherited from interface gate.util.FeatureBearer |
getFeatures, getName, setFeatures, setName |
Constructor Detail |
public DocumentWrapper(URL u, String encoding, Long start, Long end) throws IOException
public DocumentWrapper(DataStore ds, URL u, Long start, Long end) throws IOException, SQLException
public DocumentWrapper(DataStore ds, URL u) throws IOException, SQLException
public DocumentWrapper(DataStore ds, String urlString) throws IOException, SQLException
public DocumentWrapper(DataStore ds, DocumentImpl doc) throws IOException, SQLException
public DocumentWrapper(Connection con, Database db, DocumentImpl doc) throws IOException
public DocumentWrapper(DataStore ds, long id) throws IOException, NoSuchObjectException, SQLException
public DocumentWrapper(Connection con, Database ds, long id) throws IOException, NoSuchObjectException, SQLException
Method Detail |
public void rollback() throws SQLException
rollback
in interface LRDBWrapper
public void beginTransaction() throws SQLException
beginTransaction
in interface LRDBWrapper
public void commit() throws SQLException
commit
in interface LRDBWrapper
public void disconnect() throws GateException
disconnect
in interface LRDBWrapper
public DataStore getDataStore()
getDataStore
in interface LanguageResource
getDataStore
in class AbstractLanguageResource
public boolean isNew()
public static boolean setupDatabase(DataStore ds)
ds
- a value of type 'DataStore'public long getId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |