Java Doc for IRDBDriver.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) 


com.hp.hpl.jena.db.impl.IRDBDriver

All known Subclasses:   com.hp.hpl.jena.db.impl.DriverRDB,
IRDBDriver
public interface IRDBDriver (Code)
Generic database interface used for implementing RDF Stores. Different database table layouts and different SQL dialects should all be supportable via this generic interface. In earlier versions of Jena the Driver was exposed to some applications - that is no longer the case, and no application should need to use these functions directly. Based in part on the Jena 1.0 implementation by der.
author:
   csayers
version:
   $Revision: 1.25 $

Inner Class :public class GenSQLAnd



Method Summary
public  booleanDBisLocked()
     Return true if the mutex is held.
public  NodeRDBStringToNode(String RDBString)
     Convert an RDB string to the node that it encodes.
public  voidabort()
     Aborts the open transaction, then turns autocommit on.
public  StringaddEscape(String strToMatch)
    
public  voidbegin()
    
public  voidcleanDB()
     Remove all RDF information from a database.
public  voidclose()
     Close the databse connection.
public  voidcommit()
     Commits the open transaction, then turns autocommit on.
public  ListcreateSpecializedGraphs(String graphName, Graph requestedProperties)
     Construct and return a list of specialized graphs.
abstract  StringcreateTable(int graphId, boolean isReif)
    
abstract  voiddeleteTable(String tableName)
     Delete a table.
public  voidformatDB()
     Initialise a database ready to store RDF tables. Currently the table format depends on the RDBSpec type.
public  StringgenSQLEscapeKW()
    
public  StringgenSQLFromList(int aliasCnt, String table)
     Generate an SQL string for a from list of a select stmt.
Parameters:
  aliasCnt - The number of table aliases in the from list.
Parameters:
  table - The name of the table to be queried.
public  StringgenSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol)
     Generate an SQL string to joing two table columns.
Parameters:
  lhsAlias - The left side table alias for the join.
Parameters:
  lhsCol - The left side column to join, one ofS,P,O,N,T.
Parameters:
  rhsAlias - The right side table alias to join.
Parameters:
  rhsCol - The right side column to join.
public  StringgenSQLLikeKW()
    
public  StringgenSQLQualConst(int alias, char col, Node lit)
     Generate an SQL string to match a table column value to a constant. If the literal does not occur in the database, a match condition is generated that will always return false. There's a known bug in this method.
public  StringgenSQLQualGraphId(int alias, int graphId)
     Generate an SQL string to match a graph id.
public  StringgenSQLQualParam(int alias, char col)
     Generate an SQL string to match a table column value to a parameter.
Parameters:
  alias - The table alias for this match.
Parameters:
  col - The column to match, one of S,P,O,N,T for subject,predicate, object, statement or type, respectively.
public  StringgenSQLReifQualAnyObj(boolean objIsStmt)
     Generate an SQL string for a reified statement to match on any subject, predicate or object column.
Parameters:
  objIsStmt - If true, the object value is rdf:Statement so also matchon the hasType column.
public  StringgenSQLReifQualConst(int alias, char pred, Node lit)
     Similar to genSQLQualConst except that it generates SQL strings for the reification statement table.
public  StringgenSQLReifQualObj(char reifProp, boolean hasObj)
     Generate an SQL string for a reified statement to match on a property column.
Parameters:
  reifProp - The property column to match, one of S,P,O,T for subject,predicate, object or type, respectively.
Parameters:
  hasObj - If true, the object value is known so do equality match.
public  StringgenSQLReifQualStmt()
     Generate an SQL string for a reified statement to match on the stmt URI.
public  StringgenSQLResList(int resIndex, VarDesc[] binding)
     Generate an SQL string for a result list of a select stmt.
Parameters:
  binding - Array of Var containing the result list bindings.
public  StringgenSQLSelectStmt(String res, String from, String where)
     Generate an SQL Select statement given the result list, the from list and the where clause;
Parameters:
  res - The result list as a string.
Parameters:
  from - The from list as a string.
Parameters:
  where - The where qualifier as a string.
public  StringgenSQLStringMatch(int alias, char col, String fun, String stringToMatch)
    
public  StringgenSQLStringMatchEscape()
    
public  StringgenSQLStringMatchLHS(boolean ignCase, String var)
    
public  StringgenSQLStringMatchLHS_IC(String var)
    
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  intgetCompressCacheSize()
    
public  intgetCompressURILength()
    
public  IDBConnectiongetConnection()
    
 StringgetDatabaseType()
     Return a string identifying underlying database type.
 DBPropGraphgetDefaultModelProperties()
     Obtain a default set of model properties.
public  booleangetDoCompressURI()
    
public  booleangetDoDuplicateCheck()
    
public  intgetIndexKeyLength()
    
public  intgetIndexKeyLengthMax()
    
public  intgetInsertID(String tableName)
     Return an auto-generated identifier for a table row.
Parameters:
  tableName - The name of the table for the insert.
public  booleangetIsTransactionDb()
    
public  intgetLongObjectLength()
    
public  intgetLongObjectLengthMax()
    
public  StringgetStoreWithModel()
    
public  SpecializedGraphgetSystemSpecializedGraph(boolean doInit)
     Return the specialized graph containing system properties. Formats the database and constucts a new one if doInit is true.
Parameters:
  doInit - if true, format the database if needed.
public  intgetSystemTableCount()
     Return the number of system tables.
public  StringgetSystemTableName(int i)
    
public  StringgetTableNamePrefix()
    
public  intgraphIdAlloc(String graphName)
     Allocate an identifier for a new graph.
Parameters:
  graphName - The name of a new graph.
public  voidgraphIdDealloc(int graphId)
     Deallocate an identifier for a new graph.
public  booleanisDBFormatOK()
     Test if the database has previously been formatted (there's no other way to easily tell, since getSpecializedGraph will always return something).
public  voidlockDB()
     Acquire the mutex lock in the database.
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.
public  ListrecreateSpecializedGraphs(DBPropGraph graphProperties)
     Reconstruct and return a list of specialized graphs.
Parameters:
  graphProperties - A set of customization properties for the graph.
public  voidremoveSpecializedGraphs(DBPropGraph graphProperties, List specializedGraphs)
     Remove the specialized graph, erasing all trace of a Graph.
public  voidsetCompressCacheSize(int count)
     Set the value of CompressCacheSize.
public  voidsetCompressURILength(int len)
     Set the value of CompressURILength.
public  voidsetConnection(IDBConnection dbcon)
    
 voidsetDatabaseProperties(Graph databaseProperties)
     Method setDatabaseProperties.
public  voidsetDoCompressURI(boolean bool)
     Set the value of DoCompressURI.
public  voidsetDoDuplicateCheck(boolean bool)
     Set the value of DoDuplicateCheck.
public  voidsetIndexKeyLength(int len)
     Set the value of IndexKeyLength.
public  voidsetIsTransactionDb(boolean bool)
     Set the value of IsTransactionDb.
public  voidsetLongObjectLength(int len)
     Set the value of LongObjectLength.
public  voidsetStoreWithModel(String modelName)
     Set the value of StoreWithModel.
public  voidsetTableNamePrefix(String prefix)
     Set the value of TableNamePrefix.
public  StringstringMatchAllChar()
    
public  StringstringMatchEscapeChar()
    
public  booleanstringMatchNeedsEscape(String strToMatch)
    
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()
     Return true if the database is locked, else false.
public  voidunlockDB()
     Release the mutex lock in the database.



Method Detail
DBisLocked
public boolean DBisLocked() throws RDFRDBException(Code)
Return true if the mutex is held.



RDBStringToNode
public Node RDBStringToNode(String RDBString)(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.



abort
public void abort() throws RDFRDBException(Code)
Aborts the open transaction, then turns autocommit on.



addEscape
public String addEscape(String strToMatch)(Code)



begin
public void begin() throws RDFRDBException(Code)
Turns autocommit off, then opens a new transaction. *



cleanDB
public void cleanDB()(Code)
Remove all RDF information from a database. There should be no need for an application to call this function directly - instead use DBConnection.cleanDB().



close
public void close() throws RDFRDBException(Code)
Close the databse connection.
throws:
  RDFDBException - if there is an access problem



commit
public void commit() throws RDFRDBException(Code)
Commits the open transaction, then turns autocommit on.



createSpecializedGraphs
public List createSpecializedGraphs(String graphName, Graph requestedProperties)(Code)
Construct and return a list of specialized graphs.
Parameters:
  graphName - TODO
Parameters:
  requestedProperties - TODO List of SpecializedGraphs to store a Graph
since:
   Jena 2.0



createTable
abstract String createTable(int graphId, boolean isReif)(Code)



deleteTable
abstract void deleteTable(String tableName)(Code)
Delete a table. For internal use only.



formatDB
public void formatDB() throws RDFRDBException(Code)
Initialise a database ready to store RDF tables. Currently the table format depends on the RDBSpec type. In future it may become an explicit part of operations like this.
throws:
  RDFDBException - if the is a problem opening the connection or an internal SQL error.



genSQLEscapeKW
public String genSQLEscapeKW()(Code)



genSQLFromList
public String genSQLFromList(int aliasCnt, String table)(Code)
Generate an SQL string for a from list of a select stmt.
Parameters:
  aliasCnt - The number of table aliases in the from list.
Parameters:
  table - The name of the table to be queried. SQL string (not prefixed by "From").



genSQLJoin
public String genSQLJoin(int lhsAlias, char lhsCol, int rhsAlias, char rhsCol)(Code)
Generate an SQL string to joing two table columns.
Parameters:
  lhsAlias - The left side table alias for the join.
Parameters:
  lhsCol - The left side column to join, one ofS,P,O,N,T.
Parameters:
  rhsAlias - The right side table alias to join.
Parameters:
  rhsCol - The right side column to join. SQL string.



genSQLLikeKW
public String genSQLLikeKW()(Code)



genSQLQualConst
public String genSQLQualConst(int alias, char col, Node lit)(Code)
Generate an SQL string to match a table column value to a constant. If the literal does not occur in the database, a match condition is generated that will always return false. There's a known bug in this method. the literal is converted to a string BEFORE the query is run. consequently, there's a race condition. if the (long) literal is not in the database when the query is compiled but is added prior to running the query, then the query will (incorrectly) return no results. for now, we'll ignore this case and document it as a bug.
Parameters:
  alias - The table alias for this match.
Parameters:
  col - The column to match, one of S,P,O,N,T for subject,predicate, object, statement or type, respectively.
Parameters:
  lit - The literal value to match. SQL string.



genSQLQualGraphId
public String genSQLQualGraphId(int alias, int graphId)(Code)
Generate an SQL string to match a graph id.
Parameters:
  alias - The table alias for this match.
Parameters:
  graphId - The identifer of the graph to match. SQL string.



genSQLQualParam
public String genSQLQualParam(int alias, char col)(Code)
Generate an SQL string to match a table column value to a parameter.
Parameters:
  alias - The table alias for this match.
Parameters:
  col - The column to match, one of S,P,O,N,T for subject,predicate, object, statement or type, respectively. SQL string.



genSQLReifQualAnyObj
public String genSQLReifQualAnyObj(boolean objIsStmt)(Code)
Generate an SQL string for a reified statement to match on any subject, predicate or object column.
Parameters:
  objIsStmt - If true, the object value is rdf:Statement so also matchon the hasType column. qualifier string



genSQLReifQualConst
public String genSQLReifQualConst(int alias, char pred, Node lit)(Code)
Similar to genSQLQualConst except that it generates SQL strings for the reification statement table.



genSQLReifQualObj
public String genSQLReifQualObj(char reifProp, boolean hasObj)(Code)
Generate an SQL string for a reified statement to match on a property column.
Parameters:
  reifProp - The property column to match, one of S,P,O,T for subject,predicate, object or type, respectively.
Parameters:
  hasObj - If true, the object value is known so do equality match. Otherwise,just check for non-null value. qualifier string



genSQLReifQualStmt
public String genSQLReifQualStmt()(Code)
Generate an SQL string for a reified statement to match on the stmt URI. qualifier string



genSQLResList
public String genSQLResList(int resIndex, VarDesc[] binding)(Code)
Generate an SQL string for a result list of a select stmt.
Parameters:
  binding - Array of Var containing the result list bindings. SQL string (not prefixed by "Select").



genSQLSelectStmt
public String genSQLSelectStmt(String res, String from, String where)(Code)
Generate an SQL Select statement given the result list, the from list and the where clause;
Parameters:
  res - The result list as a string.
Parameters:
  from - The from list as a string.
Parameters:
  where - The where qualifier as a string. SQL statement.



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)



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)



getCompressCacheSize
public int getCompressCacheSize()(Code)
Get the value of CompressCacheSize int



getCompressURILength
public int getCompressURILength()(Code)
Get the value of CompressURILength int



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



getDatabaseType
String getDatabaseType()(Code)
Return a string identifying underlying database type.



getDefaultModelProperties
DBPropGraph getDefaultModelProperties()(Code)
Obtain a default set of model properties. Return the default properties for a new model stored in this database DBPropGraph containg the default properties for a new model



getDoCompressURI
public boolean getDoCompressURI()(Code)
Get the value of DoCompressURI bool



getDoDuplicateCheck
public boolean getDoDuplicateCheck()(Code)
Get the value of DoDuplicateCheck bool



getIndexKeyLength
public int getIndexKeyLength()(Code)
Get the value of IndexKeyLength int



getIndexKeyLengthMax
public int getIndexKeyLengthMax()(Code)
Get the maximum possible value of IndexKeyLength int



getInsertID
public int getInsertID(String tableName)(Code)
Return an auto-generated identifier for a table row.
Parameters:
  tableName - The name of the table for the insert. the auto-generated identifier..



getIsTransactionDb
public boolean getIsTransactionDb()(Code)
Get the value of IsTransactionDb bool



getLongObjectLength
public int getLongObjectLength()(Code)
Get the value of LongObjectLength int



getLongObjectLengthMax
public int getLongObjectLengthMax()(Code)
Get the maximum possible value of LongObjectLength int



getStoreWithModel
public String getStoreWithModel()(Code)
Get the value of StoreWithModel String



getSystemSpecializedGraph
public SpecializedGraph getSystemSpecializedGraph(boolean doInit)(Code)
Return the specialized graph containing system properties. Formats the database and constucts a new one if doInit is true.
Parameters:
  doInit - if true, format the database if needed. SpecializedGraph holding properties of this database
since:
   Jena 2.0



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



getTableNamePrefix
public String getTableNamePrefix()(Code)
Get the value of TableNamePrefix String



graphIdAlloc
public int graphIdAlloc(String graphName)(Code)
Allocate an identifier for a new graph.
Parameters:
  graphName - The name of a new graph. the identifier of the new graph.



graphIdDealloc
public void graphIdDealloc(int graphId)(Code)
Deallocate an identifier for a new graph.
Parameters:
  graphId - The graph identifier.



isDBFormatOK
public boolean isDBFormatOK()(Code)
Test if the database has previously been formatted (there's no other way to easily tell, since getSpecializedGraph will always return something). boolean true if database is correctly formatted, false on any error.



lockDB
public void lockDB() throws RDFRDBException(Code)
Acquire the mutex lock in the database. This is used to implement critical sections to prevent concurrent Jena threads from inteferring with each other when creating/destroying models, formatting databases, etc. There should be no need for an application to call this method.



nodeToRDBString
public String nodeToRDBString(Node node, boolean addIfLong)(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.



recreateSpecializedGraphs
public List recreateSpecializedGraphs(DBPropGraph graphProperties)(Code)
Reconstruct and return a list of specialized graphs.
Parameters:
  graphProperties - A set of customization properties for the graph. List of SpecializedGraphs to store a Graph
since:
   Jena 2.0



removeSpecializedGraphs
public void removeSpecializedGraphs(DBPropGraph graphProperties, List specializedGraphs)(Code)
Remove the specialized graph, erasing all trace of a Graph.
Parameters:
  graphProperties - The properties for the graph to be removed.
since:
   Jena 2.0



setCompressCacheSize
public void setCompressCacheSize(int count)(Code)
Set the value of CompressCacheSize. int



setCompressURILength
public void setCompressURILength(int len)(Code)
Set the value of CompressURILength. Throws an exception if the database has been initialized. int



setConnection
public void setConnection(IDBConnection dbcon)(Code)
Set the database connection



setDatabaseProperties
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)
Set the value of DoCompressURI. Throws an exception if the database has been initialized.
Parameters:
  bool -



setDoDuplicateCheck
public void setDoDuplicateCheck(boolean bool)(Code)
Set the value of DoDuplicateCheck.
Parameters:
  bool -



setIndexKeyLength
public void setIndexKeyLength(int len)(Code)
Set the value of IndexKeyLength. Throws an exception if the database has been initialized. int



setIsTransactionDb
public void setIsTransactionDb(boolean bool)(Code)
Set the value of IsTransactionDb. Throws an exception if the database has been initialized.
Parameters:
  bool -



setLongObjectLength
public void setLongObjectLength(int len)(Code)
Set the value of LongObjectLength. Throws an exception if the database has been initialized. int



setStoreWithModel
public void setStoreWithModel(String modelName)(Code)
Set the value of StoreWithModel.
Parameters:
  String -



setTableNamePrefix
public void setTableNamePrefix(String prefix)(Code)
Set the value of TableNamePrefix.
Parameters:
  String -



stringMatchAllChar
public String stringMatchAllChar()(Code)



stringMatchEscapeChar
public String stringMatchEscapeChar()(Code)



stringMatchNeedsEscape
public boolean stringMatchNeedsEscape(String strToMatch)(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). boolean true if the database supports jena 1.0 reification.



supportsMultipleModels
public boolean supportsMultipleModels()(Code)
Returns true if the database layout supports multiple RDF models in the same database. boolean true if the database supports multiple models



transactionsSupported
public boolean transactionsSupported()(Code)
Returns true if the underlying database supports transactions.



tryLockDB
public boolean tryLockDB() throws RDFRDBException(Code)
Return true if the database is locked, else false.



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



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