|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.persist.JDBCDataStore | +--gate.persist.PostgresDataStore
Field Summary | |
private static boolean |
DEBUG
Debug flag |
private static String |
DS_COMMENT
Name of this resource |
static String |
DS_ICON_NAME
the icon for this resource |
Fields inherited from class gate.persist.JDBCDataStore |
ac, datastoreComment, datastoreListeners, dbID, dbSchema, dbType, dbURL, dependentResources, iconName, jdbcConn, name, session |
Fields inherited from class gate.util.AbstractFeatureBearer |
features, serialVersionUID |
Fields inherited from interface gate.DataStore |
DATASTORE_FEATURE_NAME, LR_ID_FEATURE_NAME |
Constructor Summary | |
PostgresDataStore()
|
Method Summary | |
private Long |
_createFeature(Long entityID,
int entityType,
String key,
Object value,
int valueType,
PreparedStatement pstmt)
creates a feature of the specified type/value/valueType/key for the specified entity Entity is one of: LR, Annotation Value types are: boolean, int, long, string, float, Object |
private boolean |
_lockLr(Long lrID)
helper for lockLR() never call directly |
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 |
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 |
private void |
createFeature(Long entityID,
int entityType,
String key,
Object value,
PreparedStatement pstmt)
creates a feature with the specified type/key/value for the specified entity entitties are either LRs ot Annotations valid values are: boolean, int, long, string, float, Object, boolean List, int List, long List, string List, float List, Object List |
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)
|
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 |
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 that satisfy some set or restrictions and are of a particular type |
boolean |
lockLr(LanguageResource lr)
Try to acquire exlusive lock on a resource from the persistent store. |
protected FeatureMap |
readFeatures(Long entityID,
int entityType)
reads the features of an entity entities are of type LR or Annotation |
void |
setSecurityInfo(LanguageResource parm1,
SecurityInfo parm2)
set security information for LR . |
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) |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface gate.util.FeatureBearer |
getFeatures, setFeatures |
Field Detail |
private static final String DS_COMMENT
public static final String DS_ICON_NAME
private static final boolean DEBUG
Constructor Detail |
public PostgresDataStore()
Method Detail |
public void setSecurityInfo(LanguageResource parm1, SecurityInfo parm2) throws PersistenceException, SecurityException
DataStore
public List findLrIds(List constraints, String lrType) throws PersistenceException
JDBCDataStore
findLrIds
in class JDBCDataStore
public List findLrIds(List constraints) throws PersistenceException
JDBCDataStore
findLrIds
in class JDBCDataStore
public void unlockLr(LanguageResource lr) throws PersistenceException, SecurityException
protected boolean canAccessLR(Long lrID, int mode) throws PersistenceException, SecurityException
canAccessLR
in class JDBCDataStore
public boolean lockLr(LanguageResource lr) throws PersistenceException, SecurityException
private boolean _lockLr(Long lrID) throws PersistenceException, SecurityException
protected Long createLR(String lrType, String lrName, SecurityInfo si, Long lrParentID) throws PersistenceException, SecurityException
createLR
in class JDBCDataStore
protected Long createDoc(Long _lrID, URL _docURL, String _docEncoding, Long _docStartOffset, Long _docEndOffset, Boolean _docIsMarkupAware, Long _corpusID) throws PersistenceException
createDoc
in class JDBCDataStore
protected void createAnnotationSet(Long lrID, AnnotationSet aset) throws PersistenceException
createAnnotationSet
in class JDBCDataStore
protected void updateDocumentContent(Long docID, DocumentContent content) throws PersistenceException
updateDocumentContent
in class JDBCDataStore
private void createFeature(Long entityID, int entityType, String key, Object value, PreparedStatement pstmt) throws PersistenceException
protected void createFeatures(Long entityID, int entityType, FeatureMap features) throws PersistenceException
createFeatures
in class JDBCDataStore
protected void createFeaturesBulk(Long entityID, int entityType, FeatureMap features) throws PersistenceException
createFeaturesBulk
in class JDBCDataStore
private Long _createFeature(Long entityID, int entityType, String key, Object value, int valueType, PreparedStatement pstmt) throws PersistenceException
protected void _syncLR(LanguageResource lr) throws PersistenceException, SecurityException
_syncLR
in class JDBCDataStore
protected void _syncDocumentHeader(Document doc) throws PersistenceException
_syncDocumentHeader
in class JDBCDataStore
protected void _syncDocumentContent(Document doc) throws PersistenceException
_syncDocumentContent
in class JDBCDataStore
protected void _syncFeatures(LanguageResource lr) throws PersistenceException
_syncFeatures
in class JDBCDataStore
protected FeatureMap readFeatures(Long entityID, int entityType) throws PersistenceException
readFeatures
in class JDBCDataStore
protected void deleteDocument(Long lrId) throws PersistenceException
deleteDocument
in class JDBCDataStore
protected void deleteCorpus(Long lrId) throws PersistenceException
deleteCorpus
in class JDBCDataStore
protected void _syncRemovedDocumentsFromCorpus(List docLRIDs, Long corpLRID) throws PersistenceException
_syncRemovedDocumentsFromCorpus
in class JDBCDataStore
protected void addDocumentToCorpus(Long docID, Long corpID) throws PersistenceException, SecurityException
addDocumentToCorpus
in class JDBCDataStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |