com.hp.hpl.jena.assembler
Class ConnectionDescription

java.lang.Object
  extended by com.hp.hpl.jena.assembler.ConnectionDescription

public class ConnectionDescription
extends java.lang.Object

A ConnectionDescription holds the information required to construct an IDBConnection, and can construct that connection on demand.

Author:
kers

Field Summary
 java.lang.String dbPassword
           
 java.lang.String dbType
           
 java.lang.String dbURL
           
 java.lang.String dbUser
           
 java.lang.String subject
           
 
Constructor Summary
ConnectionDescription(java.lang.String subject, java.lang.String dbURL, java.lang.String dbUser, java.lang.String dbPassword, java.lang.String dbType)
          Initialise a description from the given arguments.
 
Method Summary
static ConnectionDescription create(java.lang.String subject, java.lang.String dbURL, java.lang.String dbUser, java.lang.String dbPassword, java.lang.String dbType)
          Answer a description containing the specified components.
 IDBConnection getConnection()
          Answer the connection specified by the description.
 java.lang.String toString()
          Answer a descriptive string for this connection object, including whether or not it has already had its connection opened.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subject

public final java.lang.String subject

dbURL

public final java.lang.String dbURL

dbUser

public final java.lang.String dbUser

dbPassword

public final java.lang.String dbPassword

dbType

public final java.lang.String dbType
Constructor Detail

ConnectionDescription

public ConnectionDescription(java.lang.String subject,
                             java.lang.String dbURL,
                             java.lang.String dbUser,
                             java.lang.String dbPassword,
                             java.lang.String dbType)
Initialise a description from the given arguments.

Parameters:
subject - the URI of the subject node from which this description is created
dbURL - the URL of the database to connect to
dbUser - the name of the user authorising the connection
dbPassword - the password of that user
dbType - the type of the database
Method Detail

getConnection

public IDBConnection getConnection()
Answer the connection specified by the description. Once created, that same connection is returned for each call to getConnection.


create

public static ConnectionDescription create(java.lang.String subject,
                                           java.lang.String dbURL,
                                           java.lang.String dbUser,
                                           java.lang.String dbPassword,
                                           java.lang.String dbType)
Answer a description containing the specified components.


toString

public java.lang.String toString()
Answer a descriptive string for this connection object, including whether or not it has already had its connection opened.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP