Package com.complexible.stardog.api
Class DriverManager
- java.lang.Object
-
- com.complexible.stardog.api.DriverManager
-
public final class DriverManager extends java.lang.ObjectService for obtaining instances of
DriversandConnectioninstances.- Since:
- 0.3
- Version:
- 4.0
- Author:
- Michael Grove, Fernando Hernandez
- See Also:
Driver,Connection
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection(java.lang.String theURL, Options theOptions)Obtain a connection to the database at the specified URLDrivergetDriver(java.lang.String theURL)Return a Driver suitable for opening the provided database URLstatic DriverManagergetInstance()voidregister(Driver theDriver)
-
-
-
Method Detail
-
getInstance
public static DriverManager getInstance()
-
register
public void register(Driver theDriver)
-
getDriver
public Driver getDriver(java.lang.String theURL) throws StardogException
Return a Driver suitable for opening the provided database URL- Parameters:
theURL- the database URL- Returns:
- a Driver which can open connections to the database at the provided URL
- Throws:
StardogException- if no driver is found
-
getConnection
public Connection getConnection(java.lang.String theURL, Options theOptions) throws StardogException
Obtain a connection to the database at the specified URL- Parameters:
theURL- the database URL WITHOUT any propertiestheOptions- the connection options- Returns:
- the connection or null if no suitable driver is found.
- Throws:
StardogException- if there is an error while obtaining the connection.
-
-