org.LexGrid.LexBIG.Impl.dataAccess
Class SQLImplementedMethods

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.dataAccess.SQLImplementedMethods

Deprecated.

@Deprecated
public class SQLImplementedMethods
extends java.lang.Object

SQL Queries necessary for LexBIG operations.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust, Thomas Johnson, Deepak Sharma, Sridhar Dwarkanath, Kevin Peterson

Field Summary
protected static java.util.Map<java.lang.String,java.lang.String> csNamespaceToName_
          Deprecated.  
 
Constructor Summary
SQLImplementedMethods()
          Deprecated.  
 
Method Summary
static java.lang.Boolean areCodesRelated(NameAndValue association, ConceptReference sourceCode, ConceptReference targetCode, boolean directOnly, java.util.ArrayList<Operation> operations, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String relationName)
          Deprecated.  
static Entity buildCodedEntry(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String code, java.lang.String namespace, LocalNameList restrictToProperties, CodedNodeSet.PropertyType[] restrictToPropertyTypes)
          Deprecated.  
static EntityDescription buildConceptEntityDescription(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String conceptCode)
          Deprecated. 
static ConceptReferenceList countQuery(SQLInterface si, java.util.ArrayList<Operation> operations, boolean forward, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String containerName)
          Deprecated. This returns a list of CountConceptReferences that hold the count of the concepts at the next/prev level depending the value of the forward flag
protected static java.lang.String createUniqueKeyForSource(java.lang.String value, java.lang.String val1)
          Deprecated. Generate a unique key for a Source object.
static GAssociationInfo getAssociationInfo(java.lang.String internalCodeSystemName, java.lang.String internalVersionString, java.lang.String associationName, java.lang.String relationName)
          Deprecated.  
static ConceptReference getAssociationReference(java.lang.String associationName, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString)
          Deprecated.  
static java.lang.String getCodingSchemeCopyright(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString)
          Deprecated.  
protected static LgLoggerIF getLogger()
          Deprecated.  
static java.lang.String[] getNativeRelations(java.lang.String internalCodingScheme, java.lang.String internalVersionString)
          Deprecated.  
static java.lang.String getRelationshipCodingSchemeNameForURN(java.lang.String urn, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString)
          Deprecated. Get a the urn (registered name) for a coding scheme label used in the relationship tables.
static java.lang.String getURNForAssociationName(java.lang.String associationName, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString)
          Deprecated. Get a the urn (registered name) for an association label used in the relationship tables.
static java.lang.String getURNForInternalCodingSchemeName(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString)
          Deprecated. Get the urn (registered name) for a code systems internal coding scheme name.
static java.lang.String getURNForRelationshipCodingSchemeName(java.lang.String supportedCodingScheme, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, boolean throwError)
          Deprecated. Get a the urn (registered name) for a coding scheme label used in the relationship tables.
protected static ConceptReferenceList helper(SQLInterface si, GHolder resultsToReturn, java.util.ArrayList<Operation> operations, boolean forward, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, int userMaxToReturn, java.lang.String relationName)
          Deprecated. This returns a list of ConceptReferences that are found to be new - or unqueried.
static boolean isAssociationSymmetric(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String relationName, java.lang.String association)
          Deprecated.  
static java.lang.Boolean isCodeInGraph(ConceptReference code, java.util.ArrayList<Operation> operations, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String relationName)
          Deprecated.  
protected static boolean isEntityAssnsToEQualsIndexPresent(SQLInterface si)
          Deprecated. Checks if the EntityAssnsToEQuals multiAttributesKey column index is present
protected static boolean isEntryStateIdInAssociationTable(SQLInterface si)
          Deprecated. Checks if the current Association Table contains the EntryStateId column.
static java.util.List<java.lang.String> listCodeRelationships(ConceptReference sourceCode, ConceptReference targetCode, boolean directOnly, java.util.ArrayList<Operation> operations, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String relationName)
          Deprecated.  
static ResolvedConceptReferenceList orphanedEntityQuery(SQLInterface si, java.util.ArrayList<Operation> operations, boolean forward, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String containerName)
          Deprecated. This returns a list of ConceptReferences that are orphaned.
protected static float parseFloatFromTableVersion(SQLInterface si)
          Deprecated. Returns the float representation of the current table version.
static ResolvedConceptReference resolveConceptReference(ConceptReference conceptReference, java.lang.String version)
          Deprecated. Resolve a ConceptReference.
static GHolder resolveRelationships(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveAssociationDepth, int maxToReturn, java.util.ArrayList<Operation> operations, java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String relationName, boolean keepLastAssociationLevelUnResolved)
          Deprecated.  
static boolean validateContext(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String context)
          Deprecated.  
static boolean validateLanguage(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String language)
          Deprecated.  
static boolean validateProperty(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String property)
          Deprecated.  
static boolean validatePropertyQualifier(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String propertyQualifier)
          Deprecated.  
static boolean validateSource(java.lang.String internalCodingSchemeName, java.lang.String internalVersionString, java.lang.String source)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

csNamespaceToName_

protected static java.util.Map<java.lang.String,java.lang.String> csNamespaceToName_
Deprecated. 
Constructor Detail

SQLImplementedMethods

public SQLImplementedMethods()
Deprecated. 
Method Detail

getLogger

protected static LgLoggerIF getLogger()
Deprecated. 

buildCodedEntry

public static Entity buildCodedEntry(java.lang.String internalCodingSchemeName,
                                     java.lang.String internalVersionString,
                                     java.lang.String code,
                                     java.lang.String namespace,
                                     LocalNameList restrictToProperties,
                                     CodedNodeSet.PropertyType[] restrictToPropertyTypes)
                              throws UnexpectedInternalError,
                                     MissingResourceException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException

buildConceptEntityDescription

@Deprecated
public static EntityDescription buildConceptEntityDescription(java.lang.String internalCodingSchemeName,
                                                                         java.lang.String internalVersionString,
                                                                         java.lang.String conceptCode)
                                                       throws MissingResourceException,
                                                              UnexpectedInternalError
Deprecated. 

Throws:
MissingResourceException
UnexpectedInternalError

getCodingSchemeCopyright

public static java.lang.String getCodingSchemeCopyright(java.lang.String internalCodingSchemeName,
                                                        java.lang.String internalVersionString)
                                                 throws MissingResourceException,
                                                        UnexpectedInternalError
Deprecated. 
Throws:
MissingResourceException
UnexpectedInternalError

validateLanguage

public static boolean validateLanguage(java.lang.String internalCodingSchemeName,
                                       java.lang.String internalVersionString,
                                       java.lang.String language)
                                throws UnexpectedInternalError,
                                       MissingResourceException,
                                       LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

validateSource

public static boolean validateSource(java.lang.String internalCodingSchemeName,
                                     java.lang.String internalVersionString,
                                     java.lang.String source)
                              throws UnexpectedInternalError,
                                     MissingResourceException,
                                     LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

validateContext

public static boolean validateContext(java.lang.String internalCodingSchemeName,
                                      java.lang.String internalVersionString,
                                      java.lang.String context)
                               throws UnexpectedInternalError,
                                      MissingResourceException,
                                      LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

validatePropertyQualifier

public static boolean validatePropertyQualifier(java.lang.String internalCodingSchemeName,
                                                java.lang.String internalVersionString,
                                                java.lang.String propertyQualifier)
                                         throws UnexpectedInternalError,
                                                MissingResourceException,
                                                LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

validateProperty

public static boolean validateProperty(java.lang.String internalCodingSchemeName,
                                       java.lang.String internalVersionString,
                                       java.lang.String property)
                                throws UnexpectedInternalError,
                                       MissingResourceException,
                                       LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

getNativeRelations

public static java.lang.String[] getNativeRelations(java.lang.String internalCodingScheme,
                                                    java.lang.String internalVersionString)
                                             throws MissingResourceException,
                                                    UnexpectedInternalError,
                                                    LBParameterException
Deprecated. 
Throws:
MissingResourceException
UnexpectedInternalError
LBParameterException

getURNForInternalCodingSchemeName

public static java.lang.String getURNForInternalCodingSchemeName(java.lang.String internalCodingSchemeName,
                                                                 java.lang.String internalVersionString)
                                                          throws UnexpectedInternalError,
                                                                 MissingResourceException
Deprecated. 
Get the urn (registered name) for a code systems internal coding scheme name. This is cached.

Throws:
UnexpectedInternalError
MissingResourceException

getURNForRelationshipCodingSchemeName

public static java.lang.String getURNForRelationshipCodingSchemeName(java.lang.String supportedCodingScheme,
                                                                     java.lang.String internalCodingSchemeName,
                                                                     java.lang.String internalVersionString,
                                                                     boolean throwError)
                                                              throws MissingResourceException,
                                                                     UnexpectedInternalError
Deprecated. 
Get a the urn (registered name) for a coding scheme label used in the relationship tables. This is cached.

Throws:
MissingResourceException
UnexpectedInternalError

getURNForAssociationName

public static java.lang.String getURNForAssociationName(java.lang.String associationName,
                                                        java.lang.String internalCodingSchemeName,
                                                        java.lang.String internalVersionString)
                                                 throws MissingResourceException,
                                                        UnexpectedInternalError
Deprecated. 
Get a the urn (registered name) for an association label used in the relationship tables. This is cached.

Throws:
MissingResourceException
UnexpectedInternalError

getRelationshipCodingSchemeNameForURN

public static java.lang.String getRelationshipCodingSchemeNameForURN(java.lang.String urn,
                                                                     java.lang.String internalCodingSchemeName,
                                                                     java.lang.String internalVersionString)
                                                              throws MissingResourceException,
                                                                     UnexpectedInternalError
Deprecated. 
Get a the urn (registered name) for a coding scheme label used in the relationship tables. This is cached.

Throws:
MissingResourceException
UnexpectedInternalError

getAssociationInfo

public static GAssociationInfo getAssociationInfo(java.lang.String internalCodeSystemName,
                                                  java.lang.String internalVersionString,
                                                  java.lang.String associationName,
                                                  java.lang.String relationName)
                                           throws LBParameterException,
                                                  UnexpectedInternalError,
                                                  MissingResourceException
Deprecated. 
Throws:
LBParameterException
UnexpectedInternalError
MissingResourceException

isCodeInGraph

public static java.lang.Boolean isCodeInGraph(ConceptReference code,
                                              java.util.ArrayList<Operation> operations,
                                              java.lang.String internalCodingSchemeName,
                                              java.lang.String internalVersionString,
                                              java.lang.String relationName)
                                       throws java.lang.Exception
Deprecated. 
Throws:
java.lang.Exception

areCodesRelated

public static java.lang.Boolean areCodesRelated(NameAndValue association,
                                                ConceptReference sourceCode,
                                                ConceptReference targetCode,
                                                boolean directOnly,
                                                java.util.ArrayList<Operation> operations,
                                                java.lang.String internalCodingSchemeName,
                                                java.lang.String internalVersionString,
                                                java.lang.String relationName)
                                         throws java.lang.Exception
Deprecated. 
Throws:
java.lang.Exception

listCodeRelationships

public static java.util.List<java.lang.String> listCodeRelationships(ConceptReference sourceCode,
                                                                     ConceptReference targetCode,
                                                                     boolean directOnly,
                                                                     java.util.ArrayList<Operation> operations,
                                                                     java.lang.String internalCodingSchemeName,
                                                                     java.lang.String internalVersionString,
                                                                     java.lang.String relationName)
                                                              throws java.lang.Exception
Deprecated. 
Throws:
java.lang.Exception

getAssociationReference

public static ConceptReference getAssociationReference(java.lang.String associationName,
                                                       java.lang.String internalCodingSchemeName,
                                                       java.lang.String internalVersionString)
                                                throws MissingResourceException,
                                                       UnexpectedInternalError
Deprecated. 
Throws:
MissingResourceException
UnexpectedInternalError

resolveRelationships

public static GHolder resolveRelationships(ConceptReference graphFocus,
                                           boolean resolveForward,
                                           boolean resolveBackward,
                                           int resolveAssociationDepth,
                                           int maxToReturn,
                                           java.util.ArrayList<Operation> operations,
                                           java.lang.String internalCodingSchemeName,
                                           java.lang.String internalVersionString,
                                           java.lang.String relationName,
                                           boolean keepLastAssociationLevelUnResolved)
                                    throws java.lang.Exception
Deprecated. 
Throws:
java.lang.Exception

helper

protected static ConceptReferenceList helper(SQLInterface si,
                                             GHolder resultsToReturn,
                                             java.util.ArrayList<Operation> operations,
                                             boolean forward,
                                             java.lang.String internalCodingSchemeName,
                                             java.lang.String internalVersionString,
                                             int userMaxToReturn,
                                             java.lang.String relationName)
                                      throws java.sql.SQLException,
                                             LBInvocationException,
                                             LBParameterException,
                                             MissingResourceException,
                                             UnexpectedInternalError
Deprecated. 
This returns a list of ConceptReferences that are found to be new - or unqueried. Note: As of LexGrid database tables version 1.8, the AssociationQualifiers are loaded via a JOIN instead of separate SELECTs. To preserve backwards compatibility, if the table does not implement version 1.8, separate selects will still be used.

Throws:
UnexpectedInternalError
MissingResourceException
java.sql.SQLException
LBInvocationException
LBParameterException

isAssociationSymmetric

public static boolean isAssociationSymmetric(java.lang.String internalCodingSchemeName,
                                             java.lang.String internalVersionString,
                                             java.lang.String relationName,
                                             java.lang.String association)
                                      throws UnexpectedInternalError,
                                             MissingResourceException,
                                             LBParameterException
Deprecated. 
Throws:
UnexpectedInternalError
MissingResourceException
LBParameterException

resolveConceptReference

public static ResolvedConceptReference resolveConceptReference(ConceptReference conceptReference,
                                                               java.lang.String version)
                                                        throws LBParameterException,
                                                               MissingResourceException
Deprecated. 
Resolve a ConceptReference.

Parameters:
conceptReference - The ConceptReference to resolve.
codingScheme - The CodingScheme Name that contains this ConceptReference.
version - The Version of the containing CodingScheme.
Returns:
The ResolvedConceptReferenece, null if not found.
Throws:
LBException - Thrown the ConceptReference cannot be resolved, or more than one result is resolved (the ConceptReference is ambiguous).
LBParameterException
MissingResourceException

orphanedEntityQuery

public static ResolvedConceptReferenceList orphanedEntityQuery(SQLInterface si,
                                                               java.util.ArrayList<Operation> operations,
                                                               boolean forward,
                                                               java.lang.String internalCodingSchemeName,
                                                               java.lang.String internalVersionString,
                                                               java.lang.String containerName)
                                                        throws LBException
Deprecated. 
This returns a list of ConceptReferences that are orphaned.

Throws:
UnexpectedInternalError
MissingResourceException
LBException

countQuery

public static ConceptReferenceList countQuery(SQLInterface si,
                                              java.util.ArrayList<Operation> operations,
                                              boolean forward,
                                              java.lang.String internalCodingSchemeName,
                                              java.lang.String internalVersionString,
                                              java.lang.String containerName)
                                       throws LBException
Deprecated. 
This returns a list of CountConceptReferences that hold the count of the concepts at the next/prev level depending the value of the forward flag

Throws:
UnexpectedInternalError
MissingResourceException
LBException

isEntityAssnsToEQualsIndexPresent

protected static boolean isEntityAssnsToEQualsIndexPresent(SQLInterface si)
Deprecated. 
Checks if the EntityAssnsToEQuals multiAttributesKey column index is present

Parameters:
si -
Returns:
if the multiAttributesKey column index is present

isEntryStateIdInAssociationTable

protected static boolean isEntryStateIdInAssociationTable(SQLInterface si)
Deprecated. 
Checks if the current Association Table contains the EntryStateId column.

Parameters:
si -
Returns:
if the EntryStateId column is present.

parseFloatFromTableVersion

protected static float parseFloatFromTableVersion(SQLInterface si)
Deprecated. 
Returns the float representation of the current table version.

Parameters:
si -
Returns:
the current (float) table version.

createUniqueKeyForSource

protected static java.lang.String createUniqueKeyForSource(java.lang.String value,
                                                           java.lang.String val1)
Deprecated. 
Generate a unique key for a Source object. We can't rely on the equals() method being implemented correctly on the Source object (because model objects can be generated with our without it depending on preferences), so we have to construct a unique id here. (This is to be used when putting Sources in Maps or Sets)

Parameters:
source -
Returns:
The id to uniquely identify this source within an Entity

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.