|
GATE Version 3.1-2270 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AbstractFeatureBearer
gate.persist.JDBCDataStore
gate.persist.OracleDataStore
public class OracleDataStore
| Field Summary |
|---|
| Fields inherited from class gate.persist.JDBCDataStore |
|---|
ac, datastoreComment, dbSchema, dbType, dependentResources, iconName, jdbcConn, name, session |
| Fields inherited from class gate.util.AbstractFeatureBearer |
|---|
features |
| Fields inherited from interface gate.DataStore |
|---|
DATASTORE_FEATURE_NAME, LR_ID_FEATURE_NAME |
| Constructor Summary | |
|---|---|
OracleDataStore()
default constructor - just call the super constructor (may change in the future) |
|
| Method Summary | |
|---|---|
protected void |
_syncDocumentContent(Document doc)
helper for sync() - never call directly |
protected void |
_syncDocumentHeader(Document doc)
helper for sync() - never call directly |
protected void |
_syncFeatures(LanguageResource lr)
helper for sync() - never call directly |
protected void |
_syncLR(LanguageResource lr)
helper for sync() NEVER call directly |
protected void |
_syncRemovedDocumentsFromCorpus(List docLRIDs,
Long corpLRID)
helper for sync() - never call directly |
protected void |
addDocumentToCorpus(Long docID,
Long corpID)
adds document to corpus in the database if the document is already part of the corpus nothing changes |
protected boolean |
canAccessLR(Long lrID,
int mode)
Checks if the user (identified by the sessionID) has some access (read/write) to the LR |
void |
close()
Close the data store. |
void |
create()
Create a new data store. |
protected void |
createAnnotationSet(Long lrID,
AnnotationSet aset)
creates an entry for annotation set in the database |
protected Long |
createDoc(Long _lrID,
URL _docURL,
String _docEncoding,
Long _docStartOffset,
Long _docEndOffset,
Boolean _docIsMarkupAware,
Long _corpusID)
helper for adopt never call directly |
protected void |
createFeatures(Long entityID,
int entityType,
FeatureMap features)
helper metod iterates a FeatureMap and creates all its features in the database |
protected void |
createFeaturesBulk(Long entityID,
int entityType,
FeatureMap features)
helper metod iterates a FeatureMap and creates all its features in the database since it uses Oracle VARRAYs the roundtrips between the client and the server are minimized make sure the two types STRING_ARRAY and INT_ARRAY have the same name in the PL/SQL files also when referencing the types always use the schema owner in upper case because the jdbc driver is buggy (see MetaLink note if u care) |
protected Long |
createLR(String lrType,
String lrName,
SecurityInfo si,
Long lrParentID)
helper for adopt() never call directly |
protected void |
deleteCorpus(Long lrId)
helper method for delete() never call it directly beause proper events will not be fired |
protected void |
deleteDocument(Long lrId)
helper method for delete() never call it directly beause proper events will not be fired |
boolean |
equals(Object obj)
checks if two databases are identical |
List |
findDocIdsByAnn(List constraints,
int limitcount)
|
List |
findLrIds(List constraints)
Get a list of LRs that satisfy some set or restrictions |
List |
findLrIds(List constraints,
String lrType)
Get a list of LRs IDs that satisfy some set or restrictions and are of a particular type |
List |
findLrIds(List constraints,
String lrType,
List orderByConstraints,
int limitcount)
Get a list of LRs IDs that satisfy some set or restrictions and are of a particular type |
long |
getLrsCount(List constraints,
String lrType)
Return count of LRs which matches the constraints. |
String |
getStorageUrl()
Get the URL for the underlying storage mechanism. |
boolean |
isAutoSaving()
Get the autosaving behaviour of the LR. |
boolean |
lockLr(LanguageResource lr)
Try to acquire exlusive lock on a resource from the persistent store. |
void |
open()
Open a connection to the data store. |
static Object |
readBLOB(Blob src)
reads the content of the specified BLOB object and returns the object contained. |
static void |
readCLOB(Clob src,
StringBuffer dest)
reads the content of a CLOB into the specified StringBuffer |
protected FeatureMap |
readFeatures(Long entityID,
int entityType)
reads the features of an entity entities are of type LR or Annotation |
void |
setAutoSaving(boolean autoSaving)
Set method for the autosaving behaviour of the data store. |
void |
setSecurityInfo(LanguageResource lr,
SecurityInfo si)
set security information for LR . |
void |
setStorageUrl(String storageUrl)
Set the URL for the underlying storage mechanism. |
Long |
timestamp()
Gets a timestamp marker that will be used for all changes made in the database so that subsequent calls to deleteSince() could restore (partly) the database state as it was before the update. |
void |
unlockLr(LanguageResource lr)
Releases the exlusive lock on a resource from the persistent store. |
protected void |
updateDocumentContent(Long docID,
DocumentContent content)
updates the content of the document if it is binary or a long string (that does not fit into VARCHAR2) |
static void |
writeBLOB(Object src,
Blob dest)
writes the specified object into the BLOB NOTE: the object should be serializable |
static void |
writeCLOB(StringBuffer src,
Clob dest)
writes the content of a StringBuffer into the specified CLOB object |
static void |
writeCLOB(String src,
Clob dest)
writes the content of a String into the specified CLOB object |
| Methods inherited from class gate.util.AbstractFeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gate.util.FeatureBearer |
|---|
getFeatures, setFeatures |
| Constructor Detail |
|---|
public OracleDataStore()
| Method Detail |
|---|
public void setStorageUrl(String storageUrl)
throws PersistenceException
setStorageUrl in interface DataStoresetStorageUrl in class JDBCDataStorePersistenceExceptionpublic String getStorageUrl()
getStorageUrl in interface DataStoregetStorageUrl in class JDBCDataStore
public void create()
throws PersistenceException,
UnsupportedOperationException
create in interface DataStorecreate in class JDBCDataStorePersistenceException
UnsupportedOperationException
public void open()
throws PersistenceException
open in interface DataStoreopen in class JDBCDataStorePersistenceException
public void close()
throws PersistenceException
close in interface DataStoreclose in class JDBCDataStorePersistenceException
protected void deleteDocument(Long lrId)
throws PersistenceException
deleteDocument in class JDBCDataStorePersistenceException
protected void deleteCorpus(Long lrId)
throws PersistenceException
deleteCorpus in class JDBCDataStorePersistenceException
public void setAutoSaving(boolean autoSaving)
throws UnsupportedOperationException,
PersistenceException
setAutoSaving in interface DataStoresetAutoSaving in class JDBCDataStoreUnsupportedOperationException
PersistenceExceptionpublic boolean isAutoSaving()
isAutoSaving in interface DataStoreisAutoSaving in class JDBCDataStore
protected Long createLR(String lrType,
String lrName,
SecurityInfo si,
Long lrParentID)
throws PersistenceException,
SecurityException
createLR in class JDBCDataStorePersistenceException
SecurityException
protected void updateDocumentContent(Long docID,
DocumentContent content)
throws PersistenceException
updateDocumentContent in class JDBCDataStorePersistenceException
protected Long createDoc(Long _lrID,
URL _docURL,
String _docEncoding,
Long _docStartOffset,
Long _docEndOffset,
Boolean _docIsMarkupAware,
Long _corpusID)
throws PersistenceException
createDoc in class JDBCDataStorePersistenceException
protected void createAnnotationSet(Long lrID,
AnnotationSet aset)
throws PersistenceException
createAnnotationSet in class JDBCDataStorePersistenceException
public Long timestamp()
throws PersistenceException
timestamp in interface DatabaseDataStoretimestamp in class JDBCDataStorePersistenceException
protected boolean canAccessLR(Long lrID,
int mode)
throws PersistenceException,
SecurityException
canAccessLR in class JDBCDataStorePersistenceException
SecurityException
public static void readCLOB(Clob src,
StringBuffer dest)
throws SQLException,
IOException
SQLException
IOException
public static void writeCLOB(String src,
Clob dest)
throws SQLException,
IOException
SQLException
IOException
public static void writeCLOB(StringBuffer src,
Clob dest)
throws SQLException,
IOException
SQLException
IOException
public static Object readBLOB(Blob src)
throws SQLException,
IOException,
ClassNotFoundException
SQLException
IOException
ClassNotFoundException
public static void writeBLOB(Object src,
Blob dest)
throws SQLException,
IOException
SQLException
IOException
protected void createFeatures(Long entityID,
int entityType,
FeatureMap features)
throws PersistenceException
createFeatures in class JDBCDataStorePersistenceException
protected void createFeaturesBulk(Long entityID,
int entityType,
FeatureMap features)
throws PersistenceException
createFeaturesBulk in class JDBCDataStorePersistenceException
public void setSecurityInfo(LanguageResource lr,
SecurityInfo si)
throws PersistenceException,
SecurityException
PersistenceException
SecurityException
protected FeatureMap readFeatures(Long entityID,
int entityType)
throws PersistenceException
readFeatures in class JDBCDataStorePersistenceExceptionpublic boolean equals(Object obj)
equals in class ObjectNOTE: the same database may be represented by different OracleDataStore instances
but the IDs will be the same
protected void _syncLR(LanguageResource lr)
throws PersistenceException,
SecurityException
_syncLR in class JDBCDataStorePersistenceException
SecurityException
protected void _syncDocumentHeader(Document doc)
throws PersistenceException
_syncDocumentHeader in class JDBCDataStorePersistenceException
protected void _syncDocumentContent(Document doc)
throws PersistenceException
_syncDocumentContent in class JDBCDataStorePersistenceException
protected void _syncRemovedDocumentsFromCorpus(List docLRIDs,
Long corpLRID)
throws PersistenceException
_syncRemovedDocumentsFromCorpus in class JDBCDataStorePersistenceException
protected void _syncFeatures(LanguageResource lr)
throws PersistenceException
_syncFeatures in class JDBCDataStorePersistenceException
public boolean lockLr(LanguageResource lr)
throws PersistenceException,
SecurityException
PersistenceException
SecurityException
public void unlockLr(LanguageResource lr)
throws PersistenceException,
SecurityException
PersistenceException
SecurityException
protected void addDocumentToCorpus(Long docID,
Long corpID)
throws PersistenceException,
SecurityException
addDocumentToCorpus in class JDBCDataStorePersistenceException
SecurityException
public List findLrIds(List constraints)
throws PersistenceException
findLrIds in interface DataStorefindLrIds in class JDBCDataStoreconstraints - list of Restriction objects
PersistenceException
public List findLrIds(List constraints,
String lrType)
throws PersistenceException
findLrIds in interface DataStorefindLrIds in class JDBCDataStoreconstraints - list of Restriction objectslrType - type of Lrs. DBHelper.DOCUMENT_CLASS or DBHelper.CORPUS_CLASS
PersistenceException
public List findLrIds(List constraints,
String lrType,
List orderByConstraints,
int limitcount)
throws PersistenceException
constraints - list of Restriction objectslrType - type of Lrs. DBHelper.DOCUMENT_CLASS or DBHelper.CORPUS_CLASSorderByConstraints - liat of OrderByRestriction objectslimitcount - limit returning objects -1 for unlimited
PersistenceException
public long getLrsCount(List constraints,
String lrType)
throws PersistenceException
constraints - list of Restriction objectslrType - type of Lrs. DBHelper.DOCUMENT_CLASS or DBHelper.CORPUS_CLASS
PersistenceException
public List findDocIdsByAnn(List constraints,
int limitcount)
throws PersistenceException
PersistenceException
|
GATE Version 3.1-2270 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||