Java Doc for IDBConnection.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » db » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.hp.hpl.jena.db.IDBConnection

All known Subclasses:   com.hp.hpl.jena.db.DBConnection,
IDBConnection
public interface IDBConnection (Code)
Encapsulate the specification of a jdbc connection, mostly used to simplify the calling pattern for ModelRDB factory methods.
author:
   csayers (based on earlier code by der)
version:
   $Revision: 1.8 $ on $Date: 2008/01/02 12:09:17 $




Method Summary
public  voidcleanDB()
     Clear all RDF information from the database.
public  voidclose()
    
public  booleancontainsDefaultModel()
     Test if a default model is contained in the database.
public  booleancontainsModel(String name)
     Test if a given model is contained in the database.
public  ExtendedIteratorgetAllModelNames()
    
public  ConnectiongetConnection()
     Return the jdbc connection or null if we no longer have access to a connection.
public  ModelgetDatabaseProperties()
     Returns a Jena Model containing database properties.

These describe the optimization/layout for the database.

If the database has not been formatted, then a default set of properties is returned.

public  StringgetDatabaseType()
     Get the database type.
public  ModelgetDefaultModelProperties()
     Retrieve a default set of model customization properties.
public  IRDBDrivergetDriver()
     Get the database-specific driver For this to work, it needs to know the type of database being used.
public  IRDBDrivergetDriver(String layout, String database)
    
public  booleanisFormatOK()
     Return true if the database seems to be formated for RDF storage.
public  voidsetDatabaseProperties(Model propertyModel)
     Sets database-specific properties.

These properties may only be set before the first Model has been stored in the database.

public  voidsetDatabaseType(String databaseType)
     Set the database type manually.
public  voidsetDriver(IRDBDriver driver)
     Set the IRDBDriver to use for this connection.



Method Detail
cleanDB
public void cleanDB() throws SQLException(Code)
Clear all RDF information from the database. This wipes all the information stored by Jena from the database. Obviously should be used with care.



close
public void close() throws SQLException(Code)
Close the jdbc connection



containsDefaultModel
public boolean containsDefaultModel() throws RDFRDBException(Code)
Test if a default model is contained in the database. A default model is a model for which no specific name was specified. (One that was created by calling ModelRDB.createModel without specifying a name). Boolean true if the model is contained in the database
throws:
  RDFDBException -
since:
   Jena 2.0



containsModel
public boolean containsModel(String name) throws RDFRDBException(Code)
Test if a given model is contained in the database.
Parameters:
  name - the name of a model which may be in the database Boolean true if the model is contained in the database
throws:
  RDFDBException -
since:
   Jena 2.0



getAllModelNames
public ExtendedIterator getAllModelNames() throws RDFRDBException(Code)
Retrieve a list of all models in the database Iterator over String names for graphs.
throws:
  RDFDBException -
since:
   Jena 2.0



getConnection
public Connection getConnection() throws SQLException(Code)
Return the jdbc connection or null if we no longer have access to a connection.



getDatabaseProperties
public Model getDatabaseProperties() throws RDFRDBException(Code)
Returns a Jena Model containing database properties.

These describe the optimization/layout for the database.

If the database has not been formatted, then a default set of properties is returned. Otherwise the actual properties are returned.

The returned Model is a copy, modifying it will have no effect on the database. (Use setDatabaseProperties to make changes).


since:
   Jena 2.0



getDatabaseType
public String getDatabaseType()(Code)
Get the database type. String database type, or null if unset
since:
   Jena 2.0



getDefaultModelProperties
public Model getDefaultModelProperties() throws RDFRDBException(Code)
Retrieve a default set of model customization properties. The returned default set of properties is suitable for use in a call to ModelRDB.create(..., modelProperties); Model containing default properties



getDriver
public IRDBDriver getDriver() throws RDFRDBException(Code)
Get the database-specific driver For this to work, it needs to know the type of database being used. That may be specified in the constructor (preferred) or done later by using the setDatabaseType method (for backward compatability).



getDriver
public IRDBDriver getDriver(String layout, String database) throws RDFRDBException(Code)
Helper function to locate and instantiate the driver class corresponding to a given layout and database name Throws an RDFRDBexception if the driver can't be instantiated



isFormatOK
public boolean isFormatOK() throws RDFRDBException(Code)
Return true if the database seems to be formated for RDF storage. This is not an integrity check this is simply a flag recording that a base level table exists. Any access errors are treated as the database not being formated.



setDatabaseProperties
public void setDatabaseProperties(Model propertyModel) throws RDFRDBException(Code)
Sets database-specific properties.

These properties may only be set before the first Model has been stored in the database. After that point, the database structure is frozen.

Use these properties to optionally customize the database - this won't change the results you see when using the graph interface, but it may alter the speed with which you get them or the space required by the database.

The properties must form a complete and consistent set. The easist way to get a complete and consistent set is to call getDatabaseProperties, modify the returned model, and then use that as an argument in the call to setDatabaseProperties.

Note that some implementations may choose to delay actually peforming the formatting operation until at least one Graph is constructed in the database. Consequently, a successful return from this call does not necessarily guarantee that the database properties were set correctly.


Parameters:
  propertyModel - is a Model describing the database parameters
since:
   Jena 2.0



setDatabaseType
public void setDatabaseType(String databaseType)(Code)
Set the database type manually.

This is not for public use (it is preferable to specify it in the constructor) - included here to handle older code, which didn't use the new constructor.


since:
   Jena 2.0



setDriver
public void setDriver(IRDBDriver driver)(Code)
Set the IRDBDriver to use for this connection. Useful to enable external drivers to be registered outside of the standard driver package.



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