org.LexGrid.LexBIG.caCore.connection.orm.utils
Class DBConnector

java.lang.Object
  extended by org.LexGrid.LexBIG.caCore.connection.orm.utils.DBConnector

public class DBConnector
extends java.lang.Object

The junction point between the LexEVSAPI and the local LexBIG installation. Used to obtain information about the loaded vocabularies and their Database Connection information.

Author:
Kevin Peterson

Constructor Summary
DBConnector(LexEVSProperties properties)
          Create a connection to a local LexBIG installation, given a set of properties.
 
Method Summary
 SQLConnectionInfo[] getCodingSchemeConnections()
           
 CodingSchemeRendering getCodingSchemeRenderingForURIAndVersion(java.lang.String uri, java.lang.String version)
          Gets the Complete CodingSchemeRendering of a CodingScheme.
 CodingSchemeRendering[] getCodingSchemeRenderings()
           
 SQLConnectionInfo[] getHistoryConnections()
           
 java.lang.String getLocalDBNameForURIAndVersion(java.lang.String uri, java.lang.String version)
          Gets the local DB name (in other words, the name that this Coding Scheme uses to identify itself in the database).
 CodingSchemeTagList getTagList(java.lang.String uri, java.lang.String version)
          Returns the list of Tags associated with this Coding Scheme
 java.lang.String getURIFromCodingSchemeName(java.lang.String codingSchemeName, CodingSchemeVersionOrTag tagOrVersion)
          Returns the URI of the CodingScheme given a local name.
 boolean isCodingSchemeActive(java.lang.String name, CodingSchemeVersionOrTag csvt)
          Determines whether or not the requested Coding Scheme is active in the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnector

public DBConnector(LexEVSProperties properties)
Create a connection to a local LexBIG installation, given a set of properties.

Parameters:
properties - LexEVSProperties used to establish a connection to the local LexBIG installation
Method Detail

isCodingSchemeActive

public boolean isCodingSchemeActive(java.lang.String name,
                                    CodingSchemeVersionOrTag csvt)
                             throws LBParameterException
Determines whether or not the requested Coding Scheme is active in the system.

Parameters:
name - Local Name of the Coding Scheme
csvt - Version or Tag information
Returns:
true if active, false if inactive
Throws:
LBParameterException

getTagList

public CodingSchemeTagList getTagList(java.lang.String uri,
                                      java.lang.String version)
                               throws java.lang.Exception
Returns the list of Tags associated with this Coding Scheme

Parameters:
uri - URI of the Coding Scheme
version - Version of the Coding Scheme
Returns:
List of Tags associated with this Coding Scheme
Throws:
java.lang.Exception

getURIFromCodingSchemeName

public java.lang.String getURIFromCodingSchemeName(java.lang.String codingSchemeName,
                                                   CodingSchemeVersionOrTag tagOrVersion)
                                            throws LBParameterException
Returns the URI of the CodingScheme given a local name.

Parameters:
codingSchemeName - Local Name of the Coding Scheme
tagOrVersion - Version or Tag information
Returns:
URI of the CodingScheme
Throws:
LBParameterException

getCodingSchemeRenderingForURIAndVersion

public CodingSchemeRendering getCodingSchemeRenderingForURIAndVersion(java.lang.String uri,
                                                                      java.lang.String version)
                                                               throws LBParameterException
Gets the Complete CodingSchemeRendering of a CodingScheme.

Parameters:
uri - URI of the Coding Scheme
version - Version of the Coding Scheme
Returns:
the CodingSchemeRendering
Throws:
LBParameterException

getLocalDBNameForURIAndVersion

public java.lang.String getLocalDBNameForURIAndVersion(java.lang.String uri,
                                                       java.lang.String version)
                                                throws LBParameterException
Gets the local DB name (in other words, the name that this Coding Scheme uses to identify itself in the database).

Parameters:
uri - URI of the Coding Scheme
version - Version of the Coding Scheme
Returns:
the Local DB name
Throws:
LBParameterException

getCodingSchemeRenderings

public CodingSchemeRendering[] getCodingSchemeRenderings()

getCodingSchemeConnections

public SQLConnectionInfo[] getCodingSchemeConnections()

getHistoryConnections

public SQLConnectionInfo[] getHistoryConnections()