| java.lang.Object com.hp.hpl.jena.db.impl.DriverRDB
All known Subclasses: com.hp.hpl.jena.db.impl.Driver_Oracle_LOB, com.hp.hpl.jena.db.impl.Driver_Derby, com.hp.hpl.jena.db.impl.Driver_Oracle, com.hp.hpl.jena.db.impl.Driver_PostgreSQL, com.hp.hpl.jena.db.impl.Driver_HSQL, com.hp.hpl.jena.db.impl.Driver_MySQL,
DriverRDB | abstract public class DriverRDB implements IRDBDriver(Code) | | Base database driver for implementing SpecializedGraphs.
Different drivers are needed for different databases and different
layout schemes.
This driver is a base implemention from which database-specific
drivers can inherit. It is not generic in the sense that it will work
on any minimal SQL store and so should be treated as if it were
an abstract class.
The SQL statements which implement each of the functions are
loaded in a separate file etc/[layout]_[database].sql from the classpath.
author: hkuno modification of Jena1 code by Dave Reynolds (der) version: $Revision: 1.69 $ on $Date: 2008/01/02 12:08:22 $ |
Inner Class :class ParseInt | |
Inner Class :class RDBLongObject | |
Constructor Summary | |
public | DriverRDB() Create a bare instance of the driver. |
Method Summary | |
public boolean | DBisLocked() | protected String | IDtoBlank(String bnID) Return the Blank node string that has the given database id.
Parameters: bnID - - the dbid of the blank node, as a string. | protected String | IDtoLiteral(int litID) Return the long literal string that has the given database id.
Parameters: litID - - the dbid of the literal.. | protected RDBLongObject | IDtoLongObject(int dbid, String table) | protected RDBLongObject | IDtoLongObject(String idAsString, String table) | protected String | IDtoPrefix(int prefixID) Return the prefix string that has the given prefix id.
Parameters: prefixID - - the dbid of the prefix. | protected String | IDtoString(String dbidAsString, String table, String RDBcode) | protected String | IDtoString(int dbID, String table, String RDBcode) | protected String | IDtoURI(String uriID) Return the URI string that has the given database id.
Parameters: uriID - - the dbid of the uri, as a string. | protected RDBLongObject | PrefixToLongObject(String prefix, int split) | protected Node | RDBLiteralStringToLiteralNode(String RDBString, int len, String valType, int pos) Answer a literal Node constructed according to the RDB String. | protected void | RDBStringParseInt(String RDBString, ParseInt pi, boolean toEnd) | public Node | RDBStringToNode(String RDBString) Convert an RDB string to the node that it encodes. | protected RDBLongObject | URIToLongObject(String qname, String code) | DBIDInt | URItoPrefix(String uri, int pos, boolean add) | public synchronized void | abort() If underlying database connection supports transactions, call abort() on
the connection, then turn autocommit on. | public String | addEscape(String strToMatch) | public DBIDInt | addRDBLongObject(RDBLongObject lobj, String table) Insert a long object into the database. | protected String | aliasToString(int alias) | public synchronized void | begin() If the underlying database connection supports transactions, turn
autocommit off, then begin a new transaction. | protected void | checkDbIsOpen() | protected void | checkDbUninitialized() | public void | cleanDB() | public void | clearSequences() Drop all Jena-related sequences from database, if necessary. | public void | close() Close the driver
Nothing to do for now. | protected String | colAliasToString(int alias, char colid) | protected String | colidToColname(char colid) | public void | commit() If the underlying database connection supports transactions, call
commit(), then turn autocommit on. | protected Node | createLiteral(String val, String lang, String dtype) Answer a Node literal with the indicated lexical form, language,
and datatype. | public List | createSpecializedGraphs(String graphName, Graph requestedProperties) Construct and return a new specialized graph. | public String | createTable(int graphId, boolean isReif) Create a table for storing asserted or reified statements.
Parameters: graphId - the graph which the table is created. Parameters: isReif - true if table stores reified statements. | protected boolean | dbIsOpen() | public static int | dbSplitNamespace(String uri) This is cuurently a copy of Util.splitNamespace. | public void | deleteTable(String tableName) Delete a table. | protected void | doCleanDB(boolean dropMutex) | protected SpecializedGraph | formatAndConstructSystemSpecializedGraph() Format the database and construct a brand new system specialized graph. | public void | formatDB() Initialise a database ready to store RDF tables. | public String | genSQLEscapeKW() | public String | genSQLFromKW() | public String | genSQLFromList(int aliasCnt, String table) | public String | genSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol) | public String | genSQLLikeKW() | public String | genSQLOrKW() | public String | genSQLQualConst(int alias, char pred, Node lit) | public String | genSQLQualGraphId(int alias, int graphId) | public String | genSQLQualParam(int alias, char pred) | public String | genSQLReifQualAnyObj(boolean objIsStmt) | public String | genSQLReifQualConst(int alias, char pred, Node lit) | public String | genSQLReifQualObj(char reifProp, boolean hasObj) | public String | genSQLReifQualStmt() | public String | genSQLResList(int resIndex, VarDesc[] binding) | public String | genSQLSelectKW() | public String | genSQLSelectStmt(String res, String from, String qual) | public String | genSQLStringMatch(int alias, char col, String fun, String stringToMatch) | public String | genSQLStringMatchEscape() | public String | genSQLStringMatchLHS(boolean ignCase, String var) | public String | genSQLStringMatchLHS_IC(String var) | public String | genSQLStringMatchLong() | public String | genSQLStringMatchOp(boolean ignCase, String fun) | public String | genSQLStringMatchOp(String fun) | public String | genSQLStringMatchOp_IC(String fun) | public String | genSQLStringMatchRHS(boolean ignCase, boolean pfxMatch, String strToMatch) | public String | genSQLStringMatchRHS_IC(String strToMatch) | public String | genSQLWhereKW() | protected String | genTableName(int graphId, int tblId, boolean isReif) generate a table name and verify that it does not
exceed the maximum length. | protected List | getAllTables() | public DBIDInt | getBlankID(String bstr, boolean add) | public int | getCompressCacheSize() | public int | getCompressURILength() | public IDBConnection | getConnection() | abstract String[] | getCreateTableParams(int graphId, boolean isReif) | public String | getDatabaseType() Return a string identifying underlying database type. | abstract String[] | getDbInitTablesParams() | public DBPropGraph | getDefaultModelProperties() Method getDefaultModelProperties
Return the default properties for a new model stored in this database. | public boolean | getDoCompressURI() | public boolean | getDoDuplicateCheck() | public int | getIndexKeyLength() | public int | getIndexKeyLengthMax() | public int | getInsertID(String tableName) | public boolean | getIsTransactionDb() | public DBIDInt | getLiteralID(Node_Literal lnode, boolean add) | public DBIDInt | getLongObjectID(RDBLongObject lobj, String table, boolean add) | public int | getLongObjectLength() | public int | getLongObjectLengthMax() | public List | getSequences() Check database and see if named sequence exists. | public String | getStoreWithModel() | public SpecializedGraph | getSystemSpecializedGraph(boolean doInit) Return the specialized graph used to store system properties.
(Constuct a new one if necessary). | public int | getSystemTableCount() Return the number of system tables. | public String | getSystemTableName(int i) | protected int | getTableCount(int graphId) | public String | getTableNamePrefix() | public DBIDInt | getURIID(String qname, boolean add) | abstract public int | graphIdAlloc(String graphName) | public boolean | isDBFormatOK() Test if the database has previously been formatted. | public String | litLangTypeToRDBString(String lang, String dtype) | protected RDBLongObject | literalToLongObject(Node_Literal node) | public void | lockDB() | public String | nodeToRDBString(Node node, boolean addIfLong) Convert a node to a string to be stored in a statement table.
Parameters: Node - The node to convert to a string. | protected boolean | objectIsLong(int encodingLen, String objAsString) Check if an object is long, i.e., it exceeds the length
limit for storing in a statement table. | public List | recreateSpecializedGraphs(DBPropGraph graphProperties) Construct and return a list of specialized graphs to match those in the
store. | public void | removeSequence(String seqName) Removes named sequence from the database, if it exists. | public void | removeSpecializedGraphs(DBPropGraph graphProperties, List specializedGraphs) Remove the specialized graph, erasing all trace of a Graph. | public boolean | sequenceExists(String seqName) Check database and see if named sequence exists. | public void | setCompressCacheSize(int count) | public void | setCompressURILength(int len) | public void | setDatabaseProperties(Graph databaseProperties) Method setDatabaseProperties. | public void | setDoCompressURI(boolean bool) | public void | setDoDuplicateCheck(boolean bool) | public void | setIndexKeyLength(int len) | public void | setIsTransactionDb(boolean bool) | protected void | setLongObjectHashAndTail(PreparedStatement ps, int argi, RDBLongObject lobj) | protected void | setLongObjectHashAndTail_Binary(PreparedStatement ps, int argi, RDBLongObject lobj) | protected void | setLongObjectHashAndTail_Text(PreparedStatement ps, int argi, RDBLongObject lobj) | public void | setLongObjectLength(int len) | public void | setStoreWithModel(String modelName) | public void | setTableNamePrefix(String prefix) | protected void | setTableNames(String prefix) Names of jena system tables. | public String | stringMatchAllChar() | public String | stringMatchAnyChar() | public String | stringMatchEscapeChar() | public String | stringMatchLongObj() | public boolean | stringMatchNeedsEscape(String strToMatch) | public String | stringMatchShortObj() | public String | stringToDBname(String aName) Converts string to form accepted by database. | protected long | stringToHash(String str) | public boolean | supportsJenaReification() Returns true if the database layout supports implicit reification
of statements (i.e. | public boolean | supportsMultipleModels() Returns true if the database layout supports multiple RDF models
in the same database. | public boolean | transactionsSupported() Returns true if the underlying database supports transactions. | public boolean | tryLockDB() | public void | unlockDB() Release the mutex lock in the database. | public DBIDInt | wrapDBID(Object id) Convert the raw SQL object used to store a database identifier into a java object
which meets the DBIDInt interface. | protected synchronized boolean | xactOp(int op) Perform a transaction operation. |
CACHE_PREPARED_STATEMENTS | protected boolean CACHE_PREPARED_STATEMENTS(Code) | | Set to true to enable cache of pre-prepared statements
|
DATABASE_TYPE | protected String DATABASE_TYPE(Code) | | The name of the database type this driver supports
|
DB_NAMES_TO_UPPER | protected boolean DB_NAMES_TO_UPPER(Code) | | Indicates whether search pattern used to select system objects by name should be upper-case.
|
DEFAULT_ID | final protected int DEFAULT_ID(Code) | | Unique numeric identifier of the graph holding default properties *
|
DEFAULT_PROPS | final protected String DEFAULT_PROPS(Code) | | Name of the graph holding default properties (the one's that a newly-created
graph will have by default *
|
DEFAULT_SQL_FILE | protected String DEFAULT_SQL_FILE(Code) | | The name of the sql definition file for this database/layout combo
|
DRIVER_NAME | protected String DRIVER_NAME(Code) | | The class name of the database driver (e.g. jdbc.sql.class)
|
EOS | protected String EOS(Code) | | true if the database engine will trim trailing spaces in strings. to
prevent this, append EOS to strings that should not be trimmed.
|
EOS_CHAR | protected char EOS_CHAR(Code) | | |
EOS_LEN | protected int EOS_LEN(Code) | | |
GRAPH_TABLE | protected String GRAPH_TABLE(Code) | | Name of the graph table *
|
ID_SQL_TYPE | protected String ID_SQL_TYPE(Code) | | The SQL type to use for storing ids (compatible with wrapDBID)
|
INDEX_KEY_LENGTH | protected int INDEX_KEY_LENGTH(Code) | | The maximum size of index key (or a component of a key)
|
INDEX_KEY_LENGTH_MAX | protected int INDEX_KEY_LENGTH_MAX(Code) | | The maximum possible value for INDEX_KEY_LENGTH (db-dependent)
|
IS_XACT_DB | protected boolean IS_XACT_DB(Code) | | true if graphs using this database instance supports transactions.
this is a user settable parameter. the underlying db engine may support
transactions but an application may prefer to run without transactions
for better performance. this can only be set before the db is formatted.
|
LAYOUT_TYPE | protected String LAYOUT_TYPE(Code) | | The name of the layout type this driver supports
|
LAYOUT_VERSION | protected String LAYOUT_VERSION(Code) | | Database layout version
|
LONG_LIT_TABLE | protected String LONG_LIT_TABLE(Code) | | Name of the long literal table *
|
LONG_OBJECT_LENGTH | protected int LONG_OBJECT_LENGTH(Code) | | if URI_COMPRESS is true, compress prefixes that are longer than this.
/** The maximum size of an object that can be stored in a Statement table
|
LONG_OBJECT_LENGTH_MAX | protected int LONG_OBJECT_LENGTH_MAX(Code) | | The maximum possible value for LONG_OBJECT_LENGTH (db-dependent)
|
LONG_URI_TABLE | protected String LONG_URI_TABLE(Code) | | Name of the long URI table *
|
MAXIMUM_INDEX_COLUMNS | protected int MAXIMUM_INDEX_COLUMNS(Code) | | Maximum number of index columns. can be changed.
|
MUTEX_TABLE | protected String MUTEX_TABLE(Code) | | Name of the mutex table *
|
PREFIX_CACHE_SIZE | final public static int PREFIX_CACHE_SIZE(Code) | | |
PREFIX_TABLE | protected String PREFIX_TABLE(Code) | | Name of the prefix table *
|
PRE_ALLOCATE_ID | protected boolean PRE_ALLOCATE_ID(Code) | | Set to true if IDs are allocated prior to insert
|
QUOTE_CHAR | protected char QUOTE_CHAR(Code) | | EOS is appended to most RDB strings to deal with string trimming. if
STRINGS_TRIMMED is false, EOS is null. otherwise, EOS is EOS_CHAR.
EOS_LEN is the length of EOS (0 or 1).
|
RDBCodeDelimChar | protected static char RDBCodeDelimChar(Code) | | |
RDBCodeVariable | protected static String RDBCodeVariable(Code) | | |
REIF_TABLE_NAME_SUFFIX | protected String REIF_TABLE_NAME_SUFFIX(Code) | | |
SKIP_DUPLICATE_CHECK | protected boolean SKIP_DUPLICATE_CHECK(Code) | | Set to true if the insert operations already check for duplications
|
SQL_FILE | protected String SQL_FILE(Code) | | The name of the sql definition file for this database/layout combo
|
STMT_TABLE_NAME_SUFFIX | protected String STMT_TABLE_NAME_SUFFIX(Code) | | Suffixes for asserted and reified table names.
|
STORE_WITH_MODEL | protected String STORE_WITH_MODEL(Code) | | If not null, newly-created graphs share tables with the identified graph *
|
STRINGS_TRIMMED | protected boolean STRINGS_TRIMMED(Code) | | |
SYSTEM_STMT_TABLE | protected String SYSTEM_STMT_TABLE(Code) | | Default name of the table that holds system property graph asserted statements *
|
SYSTEM_TABLE_CNT | protected int SYSTEM_TABLE_CNT(Code) | | Number of required system tables.
|
SYSTEM_TABLE_NAME | public String[] SYSTEM_TABLE_NAME(Code) | | Names of jena system tables.
|
TABLE_NAME_LENGTH_MAX | protected int TABLE_NAME_LENGTH_MAX(Code) | | Holds maximum length of table and index names in database.
|
TABLE_NAME_PREFIX | protected String TABLE_NAME_PREFIX(Code) | | Holds prefix for names of Jena database tables.
|
URI_COMPRESS | protected boolean URI_COMPRESS(Code) | | true if URI's are to be compressed by storing prefixes (an approximation
of a namespace) in the JENA_PREFIX table. note that "short" prefixes are
not stored, i.e., the prefix length not more than URI_COMPRESS_LENGTH.
|
URI_COMPRESS_LENGTH | protected int URI_COMPRESS_LENGTH(Code) | | |
VERSION | final protected String VERSION(Code) | | Driver version number
|
logger | protected static Log logger(Code) | | |
m_lsetClassName | protected String m_lsetClassName(Code) | | Cached name of this class's SpecializedGraph_XXX class
|
m_lsetReifierClassName | protected String m_lsetReifierClassName(Code) | | Cached name of this class's SpecializedGraphReifer_XXX class
|
m_psetClassName | protected String m_psetClassName(Code) | | Name of this class's PSet_TripleStore_XXX class
|
m_psetReifierClassName | protected String m_psetReifierClassName(Code) | | Name of this class's PSet_TripleStore_XXX class
|
m_sql | protected SQLCache m_sql(Code) | | Instance of SQLCache used by Driver for hard-coded db commands
|
m_sysProperties | protected SpecializedGraph m_sysProperties(Code) | | Cache a reference to the system property graph (java) *
|
xactAbort | final protected static int xactAbort(Code) | | |
xactAutoOff | final protected static int xactAutoOff(Code) | | |
xactAutoOn | final protected static int xactAutoOn(Code) | | |
xactBegin | final protected static int xactBegin(Code) | | |
xactBeginIfNone | final protected static int xactBeginIfNone(Code) | | |
xactCommit | final protected static int xactCommit(Code) | | |
xactIsActive | final protected static int xactIsActive(Code) | | |
DriverRDB | public DriverRDB()(Code) | | Create a bare instance of the driver. It is not functional until a
database connection has been supplied via setConnection.
|
IDtoBlank | protected String IDtoBlank(String bnID)(Code) | | Return the Blank node string that has the given database id.
Parameters: bnID - - the dbid of the blank node, as a string. the Blank node string or null if it does not exist. |
IDtoLiteral | protected String IDtoLiteral(int litID)(Code) | | Return the long literal string that has the given database id.
Parameters: litID - - the dbid of the literal.. the long literal string or null if it does not exist. |
IDtoLongObject | protected RDBLongObject IDtoLongObject(int dbid, String table)(Code) | | |
IDtoLongObject | protected RDBLongObject IDtoLongObject(String idAsString, String table)(Code) | | |
IDtoPrefix | protected String IDtoPrefix(int prefixID)(Code) | | Return the prefix string that has the given prefix id.
Parameters: prefixID - - the dbid of the prefix. the prefix string or null if it does not exist. |
IDtoURI | protected String IDtoURI(String uriID)(Code) | | Return the URI string that has the given database id.
Parameters: uriID - - the dbid of the uri, as a string. the uri string or null if it does not exist. |
PrefixToLongObject | protected RDBLongObject PrefixToLongObject(String prefix, int split)(Code) | | |
RDBLiteralStringToLiteralNode | protected Node RDBLiteralStringToLiteralNode(String RDBString, int len, String valType, int pos)(Code) | | Answer a literal Node constructed according to the RDB String.
Parameters: RDBString - Parameters: len - Parameters: valType - Parameters: pos - |
RDBStringParseInt | protected void RDBStringParseInt(String RDBString, ParseInt pi, boolean toEnd)(Code) | | |
RDBStringToNode | public Node RDBStringToNode(String RDBString) throws RDFRDBException(Code) | | Convert an RDB string to the node that it encodes. Return null if failure.
Parameters: RDBstring - The string to convert to a node. The node or null if failure. |
abort | public synchronized void abort() throws RDFRDBException(Code) | | If underlying database connection supports transactions, call abort() on
the connection, then turn autocommit on.
|
addRDBLongObject | public DBIDInt addRDBLongObject(RDBLongObject lobj, String table) throws RDFRDBException(Code) | | Insert a long object into the database.
This assumes the object is not already in the database.
the db index of the added literal |
aliasToString | protected String aliasToString(int alias)(Code) | | |
begin | public synchronized void begin() throws RDFRDBException(Code) | | If the underlying database connection supports transactions, turn
autocommit off, then begin a new transaction. Note that transactions are
associated with connections, not with Models. This
|
checkDbIsOpen | protected void checkDbIsOpen()(Code) | | |
checkDbUninitialized | protected void checkDbUninitialized()(Code) | | |
cleanDB | public void cleanDB()(Code) | | |
clearSequences | public void clearSequences()(Code) | | Drop all Jena-related sequences from database, if necessary.
Override in subclass if sequences must be explicitly deleted.
|
close | public void close() throws RDFRDBException(Code) | | Close the driver
Nothing to do for now.
throws: RDFDBException - if there is an access problem |
colAliasToString | protected String colAliasToString(int alias, char colid)(Code) | | |
colidToColname | protected String colidToColname(char colid)(Code) | | |
commit | public void commit() throws RDFRDBException(Code) | | If the underlying database connection supports transactions, call
commit(), then turn autocommit on.
|
createLiteral | protected Node createLiteral(String val, String lang, String dtype)(Code) | | Answer a Node literal with the indicated lexical form, language,
and datatype. If the datatype is the empty string, there is no
datatype. If the language is the empty string, there is no language.
Parameters: val - Parameters: lang - Parameters: dtype - |
createSpecializedGraphs | public List createSpecializedGraphs(String graphName, Graph requestedProperties)(Code) | | Construct and return a new specialized graph.
|
createTable | public String createTable(int graphId, boolean isReif)(Code) | | Create a table for storing asserted or reified statements.
Parameters: graphId - the graph which the table is created. Parameters: isReif - true if table stores reified statements. the name of the new table |
dbIsOpen | protected boolean dbIsOpen()(Code) | | |
dbSplitNamespace | public static int dbSplitNamespace(String uri)(Code) | | This is cuurently a copy of Util.splitNamespace. It was
copied rather than used directly for two reasons. 1) in the
future it may be desirable to use a different split algorithm
for persistence. 2) the util version could change at any time,
which would render existing databases inaccessible. having a
copy allows the db version to evolve in a controlled way.
Given an absolute URI, determine the split point between the namespace part
and the localname part.
If there is no valid localname part then the length of the
string is returned.
The algorithm tries to find the longest NCName at the end
of the uri, not immediately preceeded by the first colon
in the string.
Parameters: uri - the index of the first character of the localname |
deleteTable | public void deleteTable(String tableName)(Code) | | Delete a table.
Parameters: tableName - the name of the table to delete. * |
formatAndConstructSystemSpecializedGraph | protected SpecializedGraph formatAndConstructSystemSpecializedGraph()(Code) | | Format the database and construct a brand new system specialized graph.
|
formatDB | public void formatDB() throws RDFRDBException(Code) | | Initialise a database ready to store RDF tables.
throws: RDFDBException - if the is a problem opening the connection or an internal SQL error. |
genSQLJoin | public String genSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol)(Code) | | |
genSQLQualConst | public String genSQLQualConst(int alias, char pred, Node lit)(Code) | | |
genSQLQualGraphId | public String genSQLQualGraphId(int alias, int graphId)(Code) | | |
genSQLQualParam | public String genSQLQualParam(int alias, char pred)(Code) | | |
genSQLReifQualAnyObj | public String genSQLReifQualAnyObj(boolean objIsStmt)(Code) | | |
genSQLReifQualConst | public String genSQLReifQualConst(int alias, char pred, Node lit)(Code) | | |
genSQLReifQualObj | public String genSQLReifQualObj(char reifProp, boolean hasObj)(Code) | | |
genSQLStringMatchEscape | public String genSQLStringMatchEscape()(Code) | | |
genSQLStringMatchLong | public String genSQLStringMatchLong()(Code) | | |
genSQLStringMatchRHS | public String genSQLStringMatchRHS(boolean ignCase, boolean pfxMatch, String strToMatch)(Code) | | |
genTableName | protected String genTableName(int graphId, int tblId, boolean isReif)(Code) | | generate a table name and verify that it does not
exceed the maximum length.
|
getCompressCacheSize | public int getCompressCacheSize()(Code) | | |
getCompressURILength | public int getCompressURILength()(Code) | | |
getCreateTableParams | abstract String[] getCreateTableParams(int graphId, boolean isReif)(Code) | | |
getDatabaseType | public String getDatabaseType()(Code) | | Return a string identifying underlying database type.
|
getDbInitTablesParams | abstract String[] getDbInitTablesParams()(Code) | | |
getDefaultModelProperties | public DBPropGraph getDefaultModelProperties()(Code) | | Method getDefaultModelProperties
Return the default properties for a new model stored in this database.
If none are stored, then load default properties into the database.
Graph containg the default properties for a new model |
getDoCompressURI | public boolean getDoCompressURI()(Code) | | |
getDoDuplicateCheck | public boolean getDoDuplicateCheck()(Code) | | |
getIndexKeyLength | public int getIndexKeyLength()(Code) | | |
getIndexKeyLengthMax | public int getIndexKeyLengthMax()(Code) | | |
getIsTransactionDb | public boolean getIsTransactionDb()(Code) | | |
getLongObjectLength | public int getLongObjectLength()(Code) | | |
getLongObjectLengthMax | public int getLongObjectLengthMax()(Code) | | |
getSequences | public List getSequences()(Code) | | Check database and see if named sequence exists.
Parameters: seqName - |
getSystemSpecializedGraph | public SpecializedGraph getSystemSpecializedGraph(boolean doInit)(Code) | | Return the specialized graph used to store system properties.
(Constuct a new one if necessary). if the database is not
properly formatted, then if doInit is true, the database will
be formatted, else null is returned and the (unformatted
database is unchanged).
|
getSystemTableCount | public int getSystemTableCount()(Code) | | Return the number of system tables.
|
getSystemTableName | public String getSystemTableName(int i)(Code) | | Return the name of a system table
|
getTableCount | protected int getTableCount(int graphId)(Code) | | |
graphIdAlloc | abstract public int graphIdAlloc(String graphName)(Code) | | |
isDBFormatOK | public boolean isDBFormatOK() throws RDFRDBException(Code) | | Test if the database has previously been formatted.
boolean true if database is correctly formatted, false on any error. |
litLangTypeToRDBString | public String litLangTypeToRDBString(String lang, String dtype) throws RDFRDBException(Code) | | Encode a literal node's lang and datatype as a string of the
form ":[langLen]:[datatypeLen]:[langString][dataTypeString]"
the string. |
nodeToRDBString | public String nodeToRDBString(Node node, boolean addIfLong) throws RDFRDBException(Code) | | Convert a node to a string to be stored in a statement table.
Parameters: Node - The node to convert to a string. Must be a concrete node. Parameters: addIfLong - If the node is a long object and is not in the database, add it. the string or null if failure. |
objectIsLong | protected boolean objectIsLong(int encodingLen, String objAsString)(Code) | | Check if an object is long, i.e., it exceeds the length
limit for storing in a statement table.
true if literal is long, else false. |
recreateSpecializedGraphs | public List recreateSpecializedGraphs(DBPropGraph graphProperties)(Code) | | Construct and return a list of specialized graphs to match those in the
store.
Parameters: graphProperties - A set of customization properties for the graph. |
removeSequence | public void removeSequence(String seqName)(Code) | | Removes named sequence from the database, if it exists.
Parameters: seqName - |
removeSpecializedGraphs | public void removeSpecializedGraphs(DBPropGraph graphProperties, List specializedGraphs)(Code) | | Remove the specialized graph, erasing all trace of a Graph.
Parameters: graphId - The identity of the Graph which these specialized graphs should hold Parameters: graphProperties - The properties for the graph to be removed. |
sequenceExists | public boolean sequenceExists(String seqName)(Code) | | Check database and see if named sequence exists.
Parameters: seqName - |
setCompressCacheSize | public void setCompressCacheSize(int count)(Code) | | |
setCompressURILength | public void setCompressURILength(int len)(Code) | | |
setDatabaseProperties | public void setDatabaseProperties(Graph databaseProperties)(Code) | | Method setDatabaseProperties.
Sets the current properties for the database.
Parameters: databaseProperties - is a Graph containing a full set of database properties |
setDoCompressURI | public void setDoCompressURI(boolean bool)(Code) | | |
setDoDuplicateCheck | public void setDoDuplicateCheck(boolean bool)(Code) | | |
setIndexKeyLength | public void setIndexKeyLength(int len)(Code) | | |
setIsTransactionDb | public void setIsTransactionDb(boolean bool)(Code) | | |
setLongObjectLength | public void setLongObjectLength(int len)(Code) | | |
setStoreWithModel | public void setStoreWithModel(String modelName)(Code) | | |
setTableNamePrefix | public void setTableNamePrefix(String prefix)(Code) | | |
setTableNames | protected void setTableNames(String prefix)(Code) | | Names of jena system tables.
protected String [] SYSTEM_TABLE_NAME;
|
stringMatchEscapeChar | public String stringMatchEscapeChar()(Code) | | |
stringMatchNeedsEscape | public boolean stringMatchNeedsEscape(String strToMatch)(Code) | | |
stringMatchShortObj | public String stringMatchShortObj()(Code) | | |
stringToDBname | public String stringToDBname(String aName)(Code) | | Converts string to form accepted by database.
|
supportsJenaReification | public boolean supportsJenaReification()(Code) | | Returns true if the database layout supports implicit reification
of statements (i.e. statements can be treated as resources).
|
supportsMultipleModels | public boolean supportsMultipleModels()(Code) | | Returns true if the database layout supports multiple RDF models
in the same database.
|
transactionsSupported | public boolean transactionsSupported()(Code) | | Returns true if the underlying database supports transactions.
|
tryLockDB | public boolean tryLockDB()(Code) | | return true if the mutex is acquired, else false
|
wrapDBID | public DBIDInt wrapDBID(Object id) throws RDFRDBException(Code) | | Convert the raw SQL object used to store a database identifier into a java object
which meets the DBIDInt interface.
|
xactOp | protected synchronized boolean xactOp(int op) throws RDFRDBException(Code) | | Perform a transaction operation. For begin/commit/abort,
return true if success, false if fail. for xactIsActive,
return true if this driver has an active transaction,
else return false.
for beginIfNone, if there is a transaction running, return false, otherwise
|
|
|