Java Doc for DriverRDB.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » db » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.db.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
protected  booleanCACHE_PREPARED_STATEMENTS
    
protected  StringDATABASE_TYPE
    
protected  booleanDB_NAMES_TO_UPPER
     Indicates whether search pattern used to select system objects by name should be upper-case.
final protected  intDEFAULT_ID
    
final protected  StringDEFAULT_PROPS
    
protected  StringDEFAULT_SQL_FILE
    
protected  StringDRIVER_NAME
     The class name of the database driver (e.g.
protected  StringEOS
     true if the database engine will trim trailing spaces in strings.
protected  charEOS_CHAR
    
protected  intEOS_LEN
    
protected  StringGRAPH_TABLE
    
protected  StringID_SQL_TYPE
    
protected  intINDEX_KEY_LENGTH
    
protected  intINDEX_KEY_LENGTH_MAX
    
protected  booleanIS_XACT_DB
     true if graphs using this database instance supports transactions. this is a user settable parameter.
protected  StringLAYOUT_TYPE
    
protected  StringLAYOUT_VERSION
    
protected  StringLONG_LIT_TABLE
    
protected  intLONG_OBJECT_LENGTH
     if URI_COMPRESS is true, compress prefixes that are longer than this.
protected  intLONG_OBJECT_LENGTH_MAX
    
protected  StringLONG_URI_TABLE
    
protected  intMAXIMUM_INDEX_COLUMNS
     Maximum number of index columns.
protected  StringMUTEX_TABLE
    
final public static  intPREFIX_CACHE_SIZE
    
protected  StringPREFIX_TABLE
    
protected  booleanPRE_ALLOCATE_ID
    
protected  charQUOTE_CHAR
     EOS is appended to most RDB strings to deal with string trimming.
protected static  StringRDBCodeANY
    
protected static  StringRDBCodeBlank
    
protected static  StringRDBCodeDelim
    
protected static  charRDBCodeDelimChar
    
protected static  StringRDBCodeInvalid
    
protected static  StringRDBCodeLiteral
    
protected static  StringRDBCodePrefix
    
protected static  StringRDBCodeRef
    
protected static  StringRDBCodeURI
    
protected static  StringRDBCodeValue
    
protected static  StringRDBCodeVariable
    
protected  StringREIF_TABLE_NAME_SUFFIX
    
protected  booleanSKIP_DUPLICATE_CHECK
    
protected  StringSQL_FILE
    
protected  StringSTMT_TABLE_NAME_SUFFIX
     Suffixes for asserted and reified table names.
protected  StringSTORE_WITH_MODEL
    
protected  booleanSTRINGS_TRIMMED
    
protected  StringSYSTEM_STMT_TABLE
    
protected  intSYSTEM_TABLE_CNT
     Number of required system tables.
public  String[]SYSTEM_TABLE_NAME
     Names of jena system tables.
protected  intTABLE_NAME_LENGTH_MAX
     Holds maximum length of table and index names in database.
protected  StringTABLE_NAME_PREFIX
     Holds prefix for names of Jena database tables.
protected  booleanURI_COMPRESS
     true if URI's are to be compressed by storing prefixes (an approximation of a namespace) in the JENA_PREFIX table.
protected  intURI_COMPRESS_LENGTH
    
final protected  StringVERSION
    
protected static  Loglogger
    
protected  DBPropDatabasem_dbProps
    
protected  IDBConnectionm_dbcon
    
protected  Stringm_lsetClassName
    
protected  Stringm_lsetReifierClassName
    
protected  Stringm_psetClassName
    
protected  Stringm_psetReifierClassName
    
protected  SQLCachem_sql
    
protected  SpecializedGraphm_sysProperties
    
protected  LRUCacheprefixCache
    
final protected static  intxactAbort
    
final protected static  intxactAutoOff
    
final protected static  intxactAutoOn
    
final protected static  intxactBegin
    
final protected static  intxactBeginIfNone
    
final protected static  intxactCommit
    
final protected static  intxactIsActive
    

Constructor Summary
public  DriverRDB()
     Create a bare instance of the driver.

Method Summary
public  booleanDBisLocked()
    
protected  StringIDtoBlank(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  StringIDtoLiteral(int litID)
     Return the long literal string that has the given database id.
Parameters:
  litID - - the dbid of the literal..
protected  RDBLongObjectIDtoLongObject(int dbid, String table)
    
protected  RDBLongObjectIDtoLongObject(String idAsString, String table)
    
protected  StringIDtoPrefix(int prefixID)
     Return the prefix string that has the given prefix id.
Parameters:
  prefixID - - the dbid of the prefix.
protected  StringIDtoString(String dbidAsString, String table, String RDBcode)
    
protected  StringIDtoString(int dbID, String table, String RDBcode)
    
protected  StringIDtoURI(String uriID)
     Return the URI string that has the given database id.
Parameters:
  uriID - - the dbid of the uri, as a string.
protected  RDBLongObjectPrefixToLongObject(String prefix, int split)
    
protected  NodeRDBLiteralStringToLiteralNode(String RDBString, int len, String valType, int pos)
     Answer a literal Node constructed according to the RDB String.
protected  voidRDBStringParseInt(String RDBString, ParseInt pi, boolean toEnd)
    
public  NodeRDBStringToNode(String RDBString)
     Convert an RDB string to the node that it encodes.
protected  RDBLongObjectURIToLongObject(String qname, String code)
    
 DBIDIntURItoPrefix(String uri, int pos, boolean add)
    
public synchronized  voidabort()
     If underlying database connection supports transactions, call abort() on the connection, then turn autocommit on.
public  StringaddEscape(String strToMatch)
    
public  DBIDIntaddRDBLongObject(RDBLongObject lobj, String table)
     Insert a long object into the database.
protected  StringaliasToString(int alias)
    
public synchronized  voidbegin()
     If the underlying database connection supports transactions, turn autocommit off, then begin a new transaction.
protected  voidcheckDbIsOpen()
    
protected  voidcheckDbUninitialized()
    
public  voidcleanDB()
    
public  voidclearSequences()
     Drop all Jena-related sequences from database, if necessary.
public  voidclose()
     Close the driver Nothing to do for now.
protected  StringcolAliasToString(int alias, char colid)
    
protected  StringcolidToColname(char colid)
    
public  voidcommit()
     If the underlying database connection supports transactions, call commit(), then turn autocommit on.
protected  NodecreateLiteral(String val, String lang, String dtype)
     Answer a Node literal with the indicated lexical form, language, and datatype.
public  ListcreateSpecializedGraphs(String graphName, Graph requestedProperties)
     Construct and return a new specialized graph.
public  StringcreateTable(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  booleandbIsOpen()
    
public static  intdbSplitNamespace(String uri)
     This is cuurently a copy of Util.splitNamespace.
public  voiddeleteTable(String tableName)
     Delete a table.
protected  voiddoCleanDB(boolean dropMutex)
    
protected  SpecializedGraphformatAndConstructSystemSpecializedGraph()
     Format the database and construct a brand new system specialized graph.
public  voidformatDB()
     Initialise a database ready to store RDF tables.
public  StringgenSQLEscapeKW()
    
public  StringgenSQLFromKW()
    
public  StringgenSQLFromList(int aliasCnt, String table)
    
public  StringgenSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol)
    
public  StringgenSQLLikeKW()
    
public  StringgenSQLOrKW()
    
public  StringgenSQLQualConst(int alias, char pred, Node lit)
    
public  StringgenSQLQualGraphId(int alias, int graphId)
    
public  StringgenSQLQualParam(int alias, char pred)
    
public  StringgenSQLReifQualAnyObj(boolean objIsStmt)
    
public  StringgenSQLReifQualConst(int alias, char pred, Node lit)
    
public  StringgenSQLReifQualObj(char reifProp, boolean hasObj)
    
public  StringgenSQLReifQualStmt()
    
public  StringgenSQLResList(int resIndex, VarDesc[] binding)
    
public  StringgenSQLSelectKW()
    
public  StringgenSQLSelectStmt(String res, String from, String qual)
    
public  StringgenSQLStringMatch(int alias, char col, String fun, String stringToMatch)
    
public  StringgenSQLStringMatchEscape()
    
public  StringgenSQLStringMatchLHS(boolean ignCase, String var)
    
public  StringgenSQLStringMatchLHS_IC(String var)
    
public  StringgenSQLStringMatchLong()
    
public  StringgenSQLStringMatchOp(boolean ignCase, String fun)
    
public  StringgenSQLStringMatchOp(String fun)
    
public  StringgenSQLStringMatchOp_IC(String fun)
    
public  StringgenSQLStringMatchRHS(boolean ignCase, boolean pfxMatch, String strToMatch)
    
public  StringgenSQLStringMatchRHS_IC(String strToMatch)
    
public  StringgenSQLWhereKW()
    
protected  StringgenTableName(int graphId, int tblId, boolean isReif)
     generate a table name and verify that it does not exceed the maximum length.
protected  ListgetAllTables()
    
public  DBIDIntgetBlankID(String bstr, boolean add)
    
public  intgetCompressCacheSize()
    
public  intgetCompressURILength()
    
public  IDBConnectiongetConnection()
    
abstract  String[]getCreateTableParams(int graphId, boolean isReif)
    
public  StringgetDatabaseType()
     Return a string identifying underlying database type.
abstract  String[]getDbInitTablesParams()
    
public  DBPropGraphgetDefaultModelProperties()
     Method getDefaultModelProperties Return the default properties for a new model stored in this database.
public  booleangetDoCompressURI()
    
public  booleangetDoDuplicateCheck()
    
public  intgetIndexKeyLength()
    
public  intgetIndexKeyLengthMax()
    
public  intgetInsertID(String tableName)
    
public  booleangetIsTransactionDb()
    
public  DBIDIntgetLiteralID(Node_Literal lnode, boolean add)
    
public  DBIDIntgetLongObjectID(RDBLongObject lobj, String table, boolean add)
    
public  intgetLongObjectLength()
    
public  intgetLongObjectLengthMax()
    
public  ListgetSequences()
     Check database and see if named sequence exists.
public  StringgetStoreWithModel()
    
public  SpecializedGraphgetSystemSpecializedGraph(boolean doInit)
     Return the specialized graph used to store system properties. (Constuct a new one if necessary).
public  intgetSystemTableCount()
     Return the number of system tables.
public  StringgetSystemTableName(int i)
    
protected  intgetTableCount(int graphId)
    
public  StringgetTableNamePrefix()
    
public  DBIDIntgetURIID(String qname, boolean add)
    
abstract public  intgraphIdAlloc(String graphName)
    
public  booleanisDBFormatOK()
     Test if the database has previously been formatted.
public  StringlitLangTypeToRDBString(String lang, String dtype)
    
protected  RDBLongObjectliteralToLongObject(Node_Literal node)
    
public  voidlockDB()
    
public  StringnodeToRDBString(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  booleanobjectIsLong(int encodingLen, String objAsString)
     Check if an object is long, i.e., it exceeds the length limit for storing in a statement table.
public  ListrecreateSpecializedGraphs(DBPropGraph graphProperties)
     Construct and return a list of specialized graphs to match those in the store.
public  voidremoveSequence(String seqName)
     Removes named sequence from the database, if it exists.
public  voidremoveSpecializedGraphs(DBPropGraph graphProperties, List specializedGraphs)
     Remove the specialized graph, erasing all trace of a Graph.
public  booleansequenceExists(String seqName)
     Check database and see if named sequence exists.
public  voidsetCompressCacheSize(int count)
    
public  voidsetCompressURILength(int len)
    
public  voidsetDatabaseProperties(Graph databaseProperties)
     Method setDatabaseProperties.
public  voidsetDoCompressURI(boolean bool)
    
public  voidsetDoDuplicateCheck(boolean bool)
    
public  voidsetIndexKeyLength(int len)
    
public  voidsetIsTransactionDb(boolean bool)
    
protected  voidsetLongObjectHashAndTail(PreparedStatement ps, int argi, RDBLongObject lobj)
    
protected  voidsetLongObjectHashAndTail_Binary(PreparedStatement ps, int argi, RDBLongObject lobj)
    
protected  voidsetLongObjectHashAndTail_Text(PreparedStatement ps, int argi, RDBLongObject lobj)
    
public  voidsetLongObjectLength(int len)
    
public  voidsetStoreWithModel(String modelName)
    
public  voidsetTableNamePrefix(String prefix)
    
protected  voidsetTableNames(String prefix)
     Names of jena system tables.
public  StringstringMatchAllChar()
    
public  StringstringMatchAnyChar()
    
public  StringstringMatchEscapeChar()
    
public  StringstringMatchLongObj()
    
public  booleanstringMatchNeedsEscape(String strToMatch)
    
public  StringstringMatchShortObj()
    
public  StringstringToDBname(String aName)
     Converts string to form accepted by database.
protected  longstringToHash(String str)
    
public  booleansupportsJenaReification()
     Returns true if the database layout supports implicit reification of statements (i.e.
public  booleansupportsMultipleModels()
     Returns true if the database layout supports multiple RDF models in the same database.
public  booleantransactionsSupported()
     Returns true if the underlying database supports transactions.
public  booleantryLockDB()
    
public  voidunlockDB()
     Release the mutex lock in the database.
public  DBIDIntwrapDBID(Object id)
     Convert the raw SQL object used to store a database identifier into a java object which meets the DBIDInt interface.
protected synchronized  booleanxactOp(int op)
     Perform a transaction operation.

Field Detail
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).



RDBCodeANY
protected static String RDBCodeANY(Code)



RDBCodeBlank
protected static String RDBCodeBlank(Code)



RDBCodeDelim
protected static String RDBCodeDelim(Code)



RDBCodeDelimChar
protected static char RDBCodeDelimChar(Code)



RDBCodeInvalid
protected static String RDBCodeInvalid(Code)



RDBCodeLiteral
protected static String RDBCodeLiteral(Code)



RDBCodePrefix
protected static String RDBCodePrefix(Code)



RDBCodeRef
protected static String RDBCodeRef(Code)



RDBCodeURI
protected static String RDBCodeURI(Code)



RDBCodeValue
protected static String RDBCodeValue(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_dbProps
protected DBPropDatabase m_dbProps(Code)
This Graph's db properties



m_dbcon
protected IDBConnection m_dbcon(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) *



prefixCache
protected LRUCache prefixCache(Code)



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)




Constructor Detail
DriverRDB
public DriverRDB()(Code)
Create a bare instance of the driver. It is not functional until a database connection has been supplied via setConnection.




Method Detail
DBisLocked
public boolean DBisLocked() throws RDFRDBException(Code)



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.



IDtoString
protected String IDtoString(String dbidAsString, String table, String RDBcode)(Code)



IDtoString
protected String IDtoString(int dbID, String table, String RDBcode)(Code)



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.



URIToLongObject
protected RDBLongObject URIToLongObject(String qname, String code)(Code)



URItoPrefix
DBIDInt URItoPrefix(String uri, int pos, boolean add)(Code)



abort
public synchronized void abort() throws RDFRDBException(Code)
If underlying database connection supports transactions, call abort() on the connection, then turn autocommit on.



addEscape
public String addEscape(String strToMatch)(Code)



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. *



doCleanDB
protected void doCleanDB(boolean dropMutex) throws RDFRDBException(Code)



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.



genSQLEscapeKW
public String genSQLEscapeKW()(Code)



genSQLFromKW
public String genSQLFromKW()(Code)



genSQLFromList
public String genSQLFromList(int aliasCnt, String table)(Code)



genSQLJoin
public String genSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol)(Code)



genSQLLikeKW
public String genSQLLikeKW()(Code)



genSQLOrKW
public String genSQLOrKW()(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)



genSQLReifQualStmt
public String genSQLReifQualStmt()(Code)



genSQLResList
public String genSQLResList(int resIndex, VarDesc[] binding)(Code)



genSQLSelectKW
public String genSQLSelectKW()(Code)



genSQLSelectStmt
public String genSQLSelectStmt(String res, String from, String qual)(Code)



genSQLStringMatch
public String genSQLStringMatch(int alias, char col, String fun, String stringToMatch)(Code)



genSQLStringMatchEscape
public String genSQLStringMatchEscape()(Code)



genSQLStringMatchLHS
public String genSQLStringMatchLHS(boolean ignCase, String var)(Code)



genSQLStringMatchLHS_IC
public String genSQLStringMatchLHS_IC(String var)(Code)



genSQLStringMatchLong
public String genSQLStringMatchLong()(Code)



genSQLStringMatchOp
public String genSQLStringMatchOp(boolean ignCase, String fun)(Code)



genSQLStringMatchOp
public String genSQLStringMatchOp(String fun)(Code)



genSQLStringMatchOp_IC
public String genSQLStringMatchOp_IC(String fun)(Code)



genSQLStringMatchRHS
public String genSQLStringMatchRHS(boolean ignCase, boolean pfxMatch, String strToMatch)(Code)



genSQLStringMatchRHS_IC
public String genSQLStringMatchRHS_IC(String strToMatch)(Code)



genSQLWhereKW
public String genSQLWhereKW()(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.



getAllTables
protected List getAllTables()(Code)



getBlankID
public DBIDInt getBlankID(String bstr, boolean add) throws RDFRDBException(Code)
Return the database ID for the URI, if it exists



getCompressCacheSize
public int getCompressCacheSize()(Code)



getCompressURILength
public int getCompressURILength()(Code)



getConnection
public IDBConnection getConnection()(Code)
Return the connection



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)



getInsertID
public int getInsertID(String tableName)(Code)



getIsTransactionDb
public boolean getIsTransactionDb()(Code)



getLiteralID
public DBIDInt getLiteralID(Node_Literal lnode, boolean add) throws RDFRDBException(Code)
Return the database ID for the literal, if it exists



getLongObjectID
public DBIDInt getLongObjectID(RDBLongObject lobj, String table, boolean add) throws RDFRDBException(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 -



getStoreWithModel
public String getStoreWithModel()(Code)



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)



getTableNamePrefix
public String getTableNamePrefix()(Code)



getURIID
public DBIDInt getURIID(String qname, boolean add) throws RDFRDBException(Code)
Return the database ID for the URI, if it exists



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.



literalToLongObject
protected RDBLongObject literalToLongObject(Node_Literal node)(Code)



lockDB
public void lockDB() throws RDFRDBException(Code)



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)



setLongObjectHashAndTail
protected void setLongObjectHashAndTail(PreparedStatement ps, int argi, RDBLongObject lobj) throws SQLException(Code)



setLongObjectHashAndTail_Binary
protected void setLongObjectHashAndTail_Binary(PreparedStatement ps, int argi, RDBLongObject lobj) throws SQLException(Code)



setLongObjectHashAndTail_Text
protected void setLongObjectHashAndTail_Text(PreparedStatement ps, int argi, RDBLongObject lobj) throws SQLException(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;



stringMatchAllChar
public String stringMatchAllChar()(Code)



stringMatchAnyChar
public String stringMatchAnyChar()(Code)



stringMatchEscapeChar
public String stringMatchEscapeChar()(Code)



stringMatchLongObj
public String stringMatchLongObj()(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.



stringToHash
protected long stringToHash(String str)(Code)



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



unlockDB
public void unlockDB() throws RDFRDBException(Code)
Release the mutex lock in the database.



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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.