org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions
Class LexBIGServiceConvenienceMethodsImpl

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions.LexBIGServiceConvenienceMethodsImpl
All Implemented Interfaces:
java.io.Serializable, Extendable, GenericExtension, LexBIGServiceConvenienceMethods

public class LexBIGServiceConvenienceMethodsImpl
extends java.lang.Object
implements LexBIGServiceConvenienceMethods

Implementation of the server side convenience methods.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust, Jesse Erdmann, Thomas Johnson, Scott Bauer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.LexGrid.LexBIG.Extensions.Generic.LexBIGServiceConvenienceMethods
LexBIGServiceConvenienceMethods.HierarchyPathResolveOption
 
Constructor Summary
LexBIGServiceConvenienceMethodsImpl()
           
 
Method Summary
 void addEntityLuceneIndexes(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.util.List<java.lang.String> entityCodes)
          Add LuceneIndexes for the given list of concepts.
 CodedNodeSet createCodeNodeSet(java.lang.String[] conceptCodes, java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Create a CodedNodeSet from a set of concept codes in a coding scheme.
protected  java.lang.String doGetAssociationDirectionalName(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String associationName, org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions.LexBIGServiceConvenienceMethodsImpl.DirectionalName direction)
           
protected  java.lang.String[] doGetAssociationNames(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions.LexBIGServiceConvenienceMethodsImpl.DirectionalName direction)
           
 java.lang.String getAssociationCodeFromAssociationName(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String associationName)
          Return the Association Entity Code given an Association Name.
 java.lang.String[] getAssociationForwardAndReverseNames(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return all the association forward name and reverse name for the coding scheme.
 java.lang.String getAssociationForwardName(java.lang.String associationName, java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return the forward name for the identified association.
 java.lang.String[] getAssociationForwardNames(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return all the association forward name for the coding scheme.
 Association getAssociationForwardOneLevel(java.lang.String conceptCode, java.lang.String relationContainerName, java.lang.String association, java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, boolean buildReferencedEntries, NameAndValueList associationQualifiers)
          Return a representation of the association between the concepts with the given code in the forward direction of the association in the specified relation containerName.
 java.lang.String[] getAssociationNameForDirectionalName(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String directionalName)
          Gets the association names that contain a directional name.
 java.lang.String getAssociationNameFromAssociationCode(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String entityCode)
          Return the Association Name given an Association Entity Code.
 java.lang.String getAssociationReverseName(java.lang.String associationName, java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return the reverse name for the identified association.
 java.lang.String[] getAssociationReverseNames(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return all the association reverse name for the coding scheme.
 Association getAssociationReverseOneLevel(java.lang.String conceptCode, java.lang.String relationContainerName, java.lang.String association, java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, boolean buildReferencedEntries, NameAndValueList associationQualifiers)
          Return a representation of the association between the concepts with the given code in the reverse direction of the association in the specified relation containerName.
protected  java.util.Map getCache_CodingSchemes()
          Return the map used to cache codingScheme copyRitght information, which maps from key (derived from request parameters) to CopyRight String.
protected  java.util.Map getCache_CopyRights()
          Return the map used to cache codingScheme information, which maps from key (derived from request parameters) to CodingScheme object.
protected  java.util.Map getCache_HIDs()
          Return the map used to cache hierarchy ID information, which maps from key (derived from request parameters) to an array of hierarchy IDs (String[]).
protected  java.util.Map getCache_HPathToRootExists()
          Return the map used to cache hierarchy root existence, which maps from key (derived from request parameters) to a Boolean value.
protected  java.util.Map getCache_HRootCodes()
          Return the map used to cache hierarchy root code information, which maps from key (derived from request parameters) to an array of root codes (String[]).
protected  java.util.Map getCache_HRoots()
          Return the map used to cache hierarchy root information, which maps from key (derived from request parameters) to a ResolvedConceptReferenceList.
protected  java.lang.Object getCacheKey(java.lang.Object[] basis)
          Return a cache key based on the given items.
protected  CodingScheme getCodingScheme(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Primitive method to resolve and cache coding scheme representations.
 java.lang.String getCodingSchemeCopyright(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Primitive method to resolve and cache coding scheme copyRight text.
 CodingSchemeRenderingList getCodingSchemesWithSupportedAssociation(java.lang.String associationName)
          Return the coding schemes who supported association matching with associationName.
 java.lang.String getDescription()
          Return a description of the extension.
 java.lang.String getEntityDescription(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String code)
          Returns the entity description for the given code.
 java.lang.String[] getHierarchyIDs(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns the identifiers for hierarchical relationships available for navigation within a coding scheme.
protected  AssociationList getHierarchyLevelNext(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList assocQuals)
          Primitive method to retrieve next level of hierarchy based on association names and directionality, but could ultimately be linked to several root nodes based on supported hierarchy definitions.
 AssociationList getHierarchyLevelNext(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, boolean checkForHasHierarchyPathToRoot, NameAndValueList assocQuals)
          Return a representation of associations between a concept and its immediate descendants.
 AssociationList getHierarchyLevelNext(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList assocQuals)
          Return a representation of associations between a concept and its immediate descendants.
 int getHierarchyLevelNextCount(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReference conceptRef)
          Return a count of the number of concepts at the next level in the hierarchy.
 ConceptReferenceList getHierarchyLevelNextCount(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReferenceList conceptCodes)
          Returns a ConceptReferenceList of CountConceptReference that holds the count of concepts at the next level in the hierarchy.
protected  ConceptReferenceList getHierarchyLevelNextCount(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReferenceList conceptCodes, boolean forward)
           
protected  ConceptReferenceList getHierarchyLevelNextCountBackwardCompatible(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReferenceList conceptCodes, boolean forward)
           
 AssociationList getHierarchyLevelPrev(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, boolean checkForHasHierarchyPathToRoot, NameAndValueList assocQuals)
          Return a representation of associations between a concept and its immediate ancestor(s).
 AssociationList getHierarchyLevelPrev(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList assocQuals)
          Return a representation of associations between a concept and its immediate ancestor(s).
 int getHierarchyLevelPrevCount(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReference conceptRef)
          Return a count of the number of concepts at the previous level in the hierarchy.
 ConceptReferenceList getHierarchyLevelPrevCount(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, ConceptReferenceList conceptCodes)
          Returns a ConceptReferenceList of CountConceptReference that holds the count of concepts at the previous level in the hierarchy.
protected  ResolvedConceptReferenceList getHierarchyNodesNext(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList assocQuals)
          Primitive method to retrieve next level of hierarchy based on association names and directionality, but could ultimately be linked to several root nodes based on supported hierarchy definitions.
 ResolvedConceptReferenceList getHierarchyOrphanedConcepts(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID)
          Returns all concepts that can not be reached by traversing the hierarchy specified by the hierarchyId from the root.
protected  AssociationList getHierarchyPathToRoot(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, boolean resolveConcepts, NameAndValueList assocQuals, int maxToReturn)
          Returns a list of associations representing navigable paths between the given concept and root node combination.
 AssociationList getHierarchyPathToRoot(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, LexBIGServiceConvenienceMethods.HierarchyPathResolveOption pathResolveOption, NameAndValueList assocQuals)
          Return a representation of associations between a concept and hierarchical root node(s).
protected  AssociationList getHierarchyPathToRootPrim(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, boolean resolveConcepts, NameAndValueList assocQuals, int maxToReturn)
          Resolves all links representing navigable paths between the start and stop codes for the given association, adding them to the returned association list.
protected  AssociationList getHierarchyPathToRootPrim(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, boolean resolveConcepts, NameAndValueList assocQuals, int maxToReturn, java.util.List<java.lang.String> codeChain)
           
protected  java.lang.String[] getHierarchyRootCodes(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID)
          Return a basic array of strings containing root codes for the given hierarchy ID.
 ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID)
          Returns all root nodes for the given hierarchy and coding scheme.
 ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, boolean resolveConcepts)
          Returns all root nodes for the given hierarchy and coding scheme.
 CodedNodeSet getHierarchyRootSet(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID)
          Returns all root nodes for the given hierarchy as a CodeNodeSet, which can be further restricted.
 LexBIGService getLexBIGService()
          Return the associated LexBIGService instance; lazy initialized as required.
 LgLoggerIF getLogger()
           
 java.lang.String getName()
          Return the name assigned to this service extension.
 ResolvedConceptReference getNodesPath(java.lang.String codingSchemeUri, CodingSchemeVersionOrTag versionOrTag, java.lang.String containerName, java.lang.String associationName, java.lang.String sourceCode, java.lang.String sourceNS, java.lang.String targetCode, java.lang.String targetNS)
          Return the path/transitive closure path between two nodes.
 java.lang.String getProvider()
          Return an identifier for the extension provider.
 CodingSchemeRendering getRenderingDetail(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return detailed rendering information (including coding scheme summary, version and status information, reference links, etc) for the given coding scheme; null if not available.
protected  SupportedHierarchy[] getSupportedHierarchies(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns an array of hierarchies supported by the given coding scheme.
 SupportedHierarchy[] getSupportedHierarchies(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyId)
          Returns an array of hierarchies supported by the given coding scheme and matching the specified ID.
 java.util.List<SupportedProperty> getSupportedPropertiesOfTypeComment(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns an list of properties supported with propertyType of 'comment'.
 java.util.List<SupportedProperty> getSupportedPropertiesOfTypeDefinition(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns an list of properties supported with propertyType of 'definition'.
 java.util.List<SupportedProperty> getSupportedPropertiesOfTypePresentation(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns an list of properties supported with propertyType of 'presentation'.
 java.util.List<SupportedProperty> getSupportedPropertiesOfTypeProperty(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Returns an list of properties supported with propertyType of 'property'.
 java.lang.String getVersion()
          Return version information about the extension.
protected  boolean hasHierarchyPathToRoot(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String[] rootCodes, NameAndValueList assocQuals)
          Returns an indication of whether a path exists between the given concept and the set of root concepts for the given associations in the given direction.
protected  boolean hasHierarchyPathToRoot(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, NameAndValueList assocQuals)
          Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.
protected  boolean hasHierarchyPathToRootMultiAxis(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String[] assocNames, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, NameAndValueList assocQuals)
          Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.
protected  boolean hasHierarchyPathToRootSingleAxis(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String assocName, boolean fwd, java.lang.String conceptCode, java.lang.String rootCode, NameAndValueList assocQuals)
          Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.
 boolean isCodeRetired(java.lang.String code, java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag)
          Indicates if the given code is considered retired or inactive within context of the provided scheme.
 boolean isForwardName(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String directionalName)
          Return true if directionalName is the forwardName of an association for the coding scheme
 boolean isReverseName(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String directionalName)
          Return true if directionalName is the reverseName of an association for the coding scheme
 void modifyEntityLuceneIndexes(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.util.List<java.lang.String> entityCodes)
          modify LuceneIndexes for the given list of concepts.
static void register()
           
 void removeEntityLuceneIndexes(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag, java.util.List<java.lang.String> entityCodes)
          Remove LuceneIndexes for the given list of concepts.
 void setLexBIGService(LexBIGService lbs)
          Assign the associated LexBIGService instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexBIGServiceConvenienceMethodsImpl

public LexBIGServiceConvenienceMethodsImpl()
Method Detail

getLogger

public LgLoggerIF getLogger()

register

public static void register()
                     throws LBParameterException,
                            LBException
Throws:
LBParameterException
LBException

createCodeNodeSet

public CodedNodeSet createCodeNodeSet(java.lang.String[] conceptCodes,
                                      java.lang.String codingScheme,
                                      CodingSchemeVersionOrTag versionOrTag)
                               throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Create a CodedNodeSet from a set of concept codes in a coding scheme.

Specified by:
createCodeNodeSet in interface LexBIGServiceConvenienceMethods
Parameters:
conceptCodes - The concept codes for included items.
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Returns:
A CodedNodeSet representing the corresponding coded entries.
Throws:
LBException

getAssociationForwardOneLevel

public Association getAssociationForwardOneLevel(java.lang.String conceptCode,
                                                 java.lang.String relationContainerName,
                                                 java.lang.String association,
                                                 java.lang.String codingScheme,
                                                 CodingSchemeVersionOrTag versionOrTag,
                                                 boolean buildReferencedEntries,
                                                 NameAndValueList associationQualifiers)
                                          throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of the association between the concepts with the given code in the forward direction of the association in the specified relation containerName.

Specified by:
getAssociationForwardOneLevel in interface LexBIGServiceConvenienceMethods
Parameters:
conceptCode - The conceptCode to lookup.
relationContainerName - The relations container to query. If null, the native relations container for the code system will be assumed.
association - Local name of the specific relation/association to evaluate ("hasSubtype", etc).
codingScheme - The local name or URN of the coding scheme to query.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
buildReferencedEntries - true to resolve the full concept codes, false for skeletons
associationQualifiers - Restrict to associations with specific qualifiers, for example from a specific source
Throws:
LBException

getAssociationReverseOneLevel

public Association getAssociationReverseOneLevel(java.lang.String conceptCode,
                                                 java.lang.String relationContainerName,
                                                 java.lang.String association,
                                                 java.lang.String codingScheme,
                                                 CodingSchemeVersionOrTag versionOrTag,
                                                 boolean buildReferencedEntries,
                                                 NameAndValueList associationQualifiers)
                                          throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of the association between the concepts with the given code in the reverse direction of the association in the specified relation containerName.

Specified by:
getAssociationReverseOneLevel in interface LexBIGServiceConvenienceMethods
Parameters:
conceptCode - ConceptCode to lookup.
relationContainerName - The relations container to query. If null, the native relations container for the code system will be assumed.
association - Local name of the specific relation/association to evaluate ("hasSubtype", etc).
codingScheme - The local name or URN of the coding scheme to query.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
buildReferencedEntries - true to resolve the full concept codes, false for skeletons
associationQualifiers - Restrict to associations with specific qualifiers, for example from a specific source
Throws:
LBException

isCodeRetired

public boolean isCodeRetired(java.lang.String code,
                             java.lang.String codingSchemeName,
                             CodingSchemeVersionOrTag versionOrTag)
                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Indicates if the given code is considered retired or inactive within context of the provided scheme.

Specified by:
isCodeRetired in interface LexBIGServiceConvenienceMethods
Parameters:
code - The concept code to evaluate.
codingSchemeName - The local name or URN of the coding scheme to query.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme to query.
Returns:
true if retired; false otherwise
Throws:
LBException

getName

public java.lang.String getName()
Description copied from interface: Extendable
Return the name assigned to this service extension. This name must be unique within context of the installed node and is used to register and lookup the extension through a LexBIGService.

Specified by:
getName in interface Extendable

getDescription

public java.lang.String getDescription()
Description copied from interface: Extendable
Return a description of the extension.

Specified by:
getDescription in interface Extendable

getVersion

public java.lang.String getVersion()
Description copied from interface: Extendable
Return version information about the extension.

Specified by:
getVersion in interface Extendable

getProvider

public java.lang.String getProvider()
Description copied from interface: Extendable
Return an identifier for the extension provider.

Specified by:
getProvider in interface Extendable

getRenderingDetail

public CodingSchemeRendering getRenderingDetail(java.lang.String codingScheme,
                                                CodingSchemeVersionOrTag versionOrTag)
                                         throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return detailed rendering information (including coding scheme summary, version and status information, reference links, etc) for the given coding scheme; null if not available.

Specified by:
getRenderingDetail in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

getCodingSchemesWithSupportedAssociation

public CodingSchemeRenderingList getCodingSchemesWithSupportedAssociation(java.lang.String associationName)
                                                                   throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the coding schemes who supported association matching with associationName. The search is performed only for loaded coding schemes.

Specified by:
getCodingSchemesWithSupportedAssociation in interface LexBIGServiceConvenienceMethods
Parameters:
associationName - Association name to search for. It is case sensitive.
Returns:
List of coding schemes who has supported association matching with the value of associationName
Throws:
LBException

getAssociationCodeFromAssociationName

public java.lang.String getAssociationCodeFromAssociationName(java.lang.String codingScheme,
                                                              CodingSchemeVersionOrTag versionOrTag,
                                                              java.lang.String associationName)
                                                       throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the Association Entity Code given an Association Name.

Specified by:
getAssociationCodeFromAssociationName in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
associationName - The Association Name.
Returns:
The Association Entity Code.
Throws:
LBException

getAssociationNameFromAssociationCode

public java.lang.String getAssociationNameFromAssociationCode(java.lang.String codingScheme,
                                                              CodingSchemeVersionOrTag versionOrTag,
                                                              java.lang.String entityCode)
                                                       throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the Association Name given an Association Entity Code.

Specified by:
getAssociationNameFromAssociationCode in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
entityCode - The Association Entity Code.
Returns:
The Association Name.
Throws:
LBException

getAssociationNameForDirectionalName

public java.lang.String[] getAssociationNameForDirectionalName(java.lang.String codingScheme,
                                                               CodingSchemeVersionOrTag versionOrTag,
                                                               java.lang.String directionalName)
                                                        throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Gets the association names that contain a directional name.

Specified by:
getAssociationNameForDirectionalName in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
directionalName - The directionalName string
Throws:
LBException

getAssociationForwardName

public java.lang.String getAssociationForwardName(java.lang.String associationName,
                                                  java.lang.String codingScheme,
                                                  CodingSchemeVersionOrTag versionOrTag)
                                           throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the forward name for the identified association.

Specified by:
getAssociationForwardName in interface LexBIGServiceConvenienceMethods
Parameters:
associationName - Primary name of the association.
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

doGetAssociationDirectionalName

protected java.lang.String doGetAssociationDirectionalName(java.lang.String codingScheme,
                                                           CodingSchemeVersionOrTag versionOrTag,
                                                           java.lang.String associationName,
                                                           org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions.LexBIGServiceConvenienceMethodsImpl.DirectionalName direction)
                                                    throws LBException
Throws:
LBException

doGetAssociationNames

protected java.lang.String[] doGetAssociationNames(java.lang.String codingScheme,
                                                   CodingSchemeVersionOrTag versionOrTag,
                                                   org.LexGrid.LexBIG.Impl.Extensions.GenericExtensions.LexBIGServiceConvenienceMethodsImpl.DirectionalName direction)
                                            throws LBException
Throws:
LBException

getAssociationForwardNames

public java.lang.String[] getAssociationForwardNames(java.lang.String codingScheme,
                                                     CodingSchemeVersionOrTag versionOrTag)
                                              throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return all the association forward name for the coding scheme.

Specified by:
getAssociationForwardNames in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

getAssociationReverseName

public java.lang.String getAssociationReverseName(java.lang.String associationName,
                                                  java.lang.String codingScheme,
                                                  CodingSchemeVersionOrTag versionOrTag)
                                           throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the reverse name for the identified association.

Specified by:
getAssociationReverseName in interface LexBIGServiceConvenienceMethods
Parameters:
associationName - Basic (non-directional) name of the association.
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

getAssociationReverseNames

public java.lang.String[] getAssociationReverseNames(java.lang.String codingScheme,
                                                     CodingSchemeVersionOrTag versionOrTag)
                                              throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return all the association reverse name for the coding scheme.

Specified by:
getAssociationReverseNames in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

getAssociationForwardAndReverseNames

public java.lang.String[] getAssociationForwardAndReverseNames(java.lang.String codingScheme,
                                                               CodingSchemeVersionOrTag versionOrTag)
                                                        throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return all the association forward name and reverse name for the coding scheme.

Specified by:
getAssociationForwardAndReverseNames in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Throws:
LBException

isForwardName

public boolean isForwardName(java.lang.String codingScheme,
                             CodingSchemeVersionOrTag versionOrTag,
                             java.lang.String directionalName)
                      throws LBException
Return true if directionalName is the forwardName of an association for the coding scheme

Specified by:
isForwardName in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
directionalName - The directionalName string
Throws:
LBException

isReverseName

public boolean isReverseName(java.lang.String codingScheme,
                             CodingSchemeVersionOrTag versionOrTag,
                             java.lang.String directionalName)
                      throws LBException
Return true if directionalName is the reverseName of an association for the coding scheme

Specified by:
isReverseName in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
directionalName - The directionalName string
Throws:
LBException

getHierarchyIDs

public java.lang.String[] getHierarchyIDs(java.lang.String codingScheme,
                                          CodingSchemeVersionOrTag versionOrTag)
                                   throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns the identifiers for hierarchical relationships available for navigation within a coding scheme. These identifiers can be submitted to the getHierarchyBroader() or getHierarchyNarrower() methods to navigate corresponding tree structures.

Possible return values are defined by the LexBIG model (see http://informatics.mayo.edu/LexGrid/downloads/LexGrid%20Model/ schemas/2008/01/EAwebpublish/index.htm).

Specified by:
getHierarchyIDs in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
Returns:
The array of identifiers; empty if no hierarchies are explicitly defined (the ontology is 'flat').
Throws:
LBException

getHierarchyLevelNextCount

public ConceptReferenceList getHierarchyLevelNextCount(java.lang.String codingSchemeName,
                                                       CodingSchemeVersionOrTag versionOrTag,
                                                       java.lang.String hierarchyID,
                                                       ConceptReferenceList conceptCodes)
                                                throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns a ConceptReferenceList of CountConceptReference that holds the count of concepts at the next level in the hierarchy.

Specified by:
getHierarchyLevelNextCount in interface LexBIGServiceConvenienceMethods
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
Returns:
ConceptReferenceList of CountConceptReference that holds the count
Throws:
LBException

getHierarchyLevelPrevCount

public ConceptReferenceList getHierarchyLevelPrevCount(java.lang.String codingSchemeName,
                                                       CodingSchemeVersionOrTag versionOrTag,
                                                       java.lang.String hierarchyID,
                                                       ConceptReferenceList conceptCodes)
                                                throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns a ConceptReferenceList of CountConceptReference that holds the count of concepts at the previous level in the hierarchy.

Specified by:
getHierarchyLevelPrevCount in interface LexBIGServiceConvenienceMethods
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
Returns:
ConceptReferenceList of CountConceptReference that holds the count
Throws:
LBException

getHierarchyLevelNextCount

public int getHierarchyLevelNextCount(java.lang.String codingSchemeName,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.lang.String hierarchyID,
                                      ConceptReference conceptRef)
                               throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a count of the number of concepts at the next level in the hierarchy.

Specified by:
getHierarchyLevelNextCount in interface LexBIGServiceConvenienceMethods
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptRef - The starting point for resolution; not null.
Returns:
The number of concepts at the next level
Throws:
LBException

getHierarchyLevelPrevCount

public int getHierarchyLevelPrevCount(java.lang.String codingSchemeName,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.lang.String hierarchyID,
                                      ConceptReference conceptRef)
                               throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a count of the number of concepts at the previous level in the hierarchy.

Specified by:
getHierarchyLevelPrevCount in interface LexBIGServiceConvenienceMethods
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptRef - The starting point for resolution; not null.
Returns:
The number of concepts at the previous level
Throws:
LBException

getHierarchyLevelNextCountBackwardCompatible

protected ConceptReferenceList getHierarchyLevelNextCountBackwardCompatible(java.lang.String codingSchemeName,
                                                                            CodingSchemeVersionOrTag versionOrTag,
                                                                            java.lang.String hierarchyID,
                                                                            ConceptReferenceList conceptCodes,
                                                                            boolean forward)
                                                                     throws LBException
Throws:
LBException

getHierarchyLevelNextCount

protected ConceptReferenceList getHierarchyLevelNextCount(java.lang.String codingSchemeName,
                                                          CodingSchemeVersionOrTag versionOrTag,
                                                          java.lang.String hierarchyID,
                                                          ConceptReferenceList conceptCodes,
                                                          boolean forward)
                                                   throws LBException
Throws:
LBException

getHierarchyLevelNext

public AssociationList getHierarchyLevelNext(java.lang.String codingScheme,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String hierarchyID,
                                             java.lang.String conceptCode,
                                             boolean resolveConcepts,
                                             boolean checkForHasHierarchyPathToRoot,
                                             NameAndValueList assocQuals)
                                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of associations between a concept and its immediate descendants. The resolved association list represents the next branch of the hierarchy when visualized in a top (root) to bottom (leaf) representation. This method allows for a boolean flag checkForHasHierarchyPathToRoot to be passed in.

Specified by:
getHierarchyLevelNext in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptCode - The starting point for resolution; not null.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
checkForHasHierarchyPathToRoot - True checks for the existence of a path from the concept to the root. This check slows down the processing as hierarchy checks have to be made. If no path is found, the method returns an empty AssociationList
assocQuals - Restrict to associations with specific qualifiers (e.g. associations might be tagged with source-specific information); null or empty to ignore qualifications.
Returns:
The list of associations and referenced concepts representing immediate descendant within the hierarchy; empty if no items are found.
Throws:
LBException

getHierarchyLevelNext

public AssociationList getHierarchyLevelNext(java.lang.String codingScheme,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String hierarchyID,
                                             java.lang.String conceptCode,
                                             boolean resolveConcepts,
                                             NameAndValueList assocQuals)
                                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of associations between a concept and its immediate descendants. The resolved association list represents the next branch of the hierarchy when visualized in a top (root) to bottom (leaf) representation. This method checks for the existence of a path to root and is equivalent to calling getHierarchyLevelNext with checkForHasHierarchyPathToRoot set to true.

Specified by:
getHierarchyLevelNext in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptCode - The starting point for resolution; not null.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
assocQuals - Restrict to associations with specific qualifiers (e.g. associations might be tagged with source-specific information); null or empty to ignore qualifications.
Returns:
The list of associations and referenced concepts representing immediate descendant within the hierarchy; empty if no items are found.
Throws:
LBException

getHierarchyLevelPrev

public AssociationList getHierarchyLevelPrev(java.lang.String codingScheme,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String hierarchyID,
                                             java.lang.String conceptCode,
                                             boolean resolveConcepts,
                                             boolean checkForHasHierarchyPathToRoot,
                                             NameAndValueList assocQuals)
                                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of associations between a concept and its immediate ancestor(s). The resolved association list represents the previous level of the hierarchy when visualized in a top (root) to bottom (leaf) representation. This method allows for a boolean flag checkForHasHierarchyPathToRoot to be passed in.

Specified by:
getHierarchyLevelPrev in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptCode - The starting point for resolution; not null.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
checkForHasHierarchyPathToRoot - True checks for the existence of a path from the concept to the root. This check slows down the processing as hierarchy checks have to be made.
assocQuals - Restrict to associations with specific qualifiers (e.g. associations might be tagged with source-specific information); null or empty to ignore qualifications.
Returns:
The list of associations and referenced concepts representing the immediate ancestor(s) within the hierarchy; empty if no items are found.
Throws:
LBException

getHierarchyLevelPrev

public AssociationList getHierarchyLevelPrev(java.lang.String codingScheme,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String hierarchyID,
                                             java.lang.String conceptCode,
                                             boolean resolveConcepts,
                                             NameAndValueList assocQuals)
                                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of associations between a concept and its immediate ancestor(s). The resolved association list represents the previous level of the hierarchy when visualized in a top (root) to bottom (leaf) representation. This method checks for the existence of a path to root and is equivalent to calling getHierarchyLevelPrev with checkForHasHierarchyPathToRoot set to true. The check slows down the computation.

Specified by:
getHierarchyLevelPrev in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptCode - The starting point for resolution; not null.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
assocQuals - Restrict to associations with specific qualifiers (e.g. associations might be tagged with source-specific information); null or empty to ignore qualifications.
Returns:
The list of associations and referenced concepts representing the immediate ancestor(s) within the hierarchy; empty if no items are found.
Throws:
LBException

getHierarchyPathToRoot

public AssociationList getHierarchyPathToRoot(java.lang.String codingScheme,
                                              CodingSchemeVersionOrTag versionOrTag,
                                              java.lang.String hierarchyID,
                                              java.lang.String conceptCode,
                                              boolean resolveConcepts,
                                              LexBIGServiceConvenienceMethods.HierarchyPathResolveOption pathResolveOption,
                                              NameAndValueList assocQuals)
                                       throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Return a representation of associations between a concept and hierarchical root node(s). The resolved association list represents the path within the hierarchy from traversed from bottom (leaf) to top (root).

Specified by:
getHierarchyPathToRoot in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, associations for all registered hierarchies are navigated (less precise, but improves performance).
conceptCode - The starting point for resolution; not null.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
pathResolveOption - It is possible that more than one path can exist between the conceptCode and hierarchy roots by navigating different intermediate nodes. This parameter allows the number of returned paths to be constrained.
assocQuals - Restrict to associations with specific qualifiers (e.g. associations might be tagged with source-specific information); null or empty to ignore qualifications.
Returns:
The list of associations and referenced concepts representing the path to root node(s) within the hierarchy; empty if no items are found. If not empty, each association in the initial list represents a separate path to root for the given concept.
Throws:
LBException

getHierarchyRoots

public ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme,
                                                      CodingSchemeVersionOrTag versionOrTag,
                                                      java.lang.String hierarchyID)
                                               throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns all root nodes for the given hierarchy and coding scheme. Each root concept represents the conceptual start or narrowest point of a tree when visualizing the hierarchy.

Specified by:
getHierarchyRoots in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, roots for all registered hierarchies are returned.
Returns:
The collection of references to root nodes; empty if the given hierarchy is not recognized or is unfulfilled by the given coding scheme and version.
Throws:
LBException

getHierarchyRoots

public ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme,
                                                      CodingSchemeVersionOrTag versionOrTag,
                                                      java.lang.String hierarchyID,
                                                      boolean resolveConcepts)
                                               throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns all root nodes for the given hierarchy and coding scheme. Each root concept represents the conceptual start or narrowest point of a tree when visualizing the hierarchy.

Specified by:
getHierarchyRoots in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, roots for all registered hierarchies are returned.
resolveConcepts - True to fill in all information for concepts identified as part of the returned association; false to return only basic references (e.g. code, coding scheme, and description). If false, additional properties for referenced concepts can be resolved on an item-by-item basis as controlled by the application.
Returns:
The collection of references to root nodes; empty if the given hierarchy is not recognized or is unfulfilled by the given coding scheme and version.
Throws:
LBException

getHierarchyRootSet

public CodedNodeSet getHierarchyRootSet(java.lang.String codingScheme,
                                        CodingSchemeVersionOrTag versionOrTag,
                                        java.lang.String hierarchyID)
                                 throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns all root nodes for the given hierarchy as a CodeNodeSet, which can be further restricted. Each root concept represents the conceptual start or narrowest point of a tree when visualizing the hierarchy.

Specified by:
getHierarchyRootSet in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, roots for all registered hierarchies are returned.
Returns:
The collection of references to root nodes; empty if the given hierarchy is not recognized or is unfulfilled by the given coding scheme and version.
Throws:
LBException

getCodingScheme

protected CodingScheme getCodingScheme(java.lang.String codingScheme,
                                       CodingSchemeVersionOrTag versionOrTag)
                                throws LBException
Primitive method to resolve and cache coding scheme representations.

Parameters:
codingScheme -
versionOrTag -
Returns:
CodingScheme
Throws:
LBException

getCodingSchemeCopyright

public java.lang.String getCodingSchemeCopyright(java.lang.String codingScheme,
                                                 CodingSchemeVersionOrTag versionOrTag)
                                          throws LBException
Primitive method to resolve and cache coding scheme copyRight text.

Specified by:
getCodingSchemeCopyright in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme -
versionOrTag -
Returns:
CodingScheme
Throws:
LBException

getHierarchyLevelNext

protected AssociationList getHierarchyLevelNext(java.lang.String codingScheme,
                                                CodingSchemeVersionOrTag versionOrTag,
                                                java.lang.String[] assocNames,
                                                boolean fwd,
                                                java.lang.String conceptCode,
                                                boolean resolveConcepts,
                                                NameAndValueList assocQuals)
                                         throws LBException
Primitive method to retrieve next level of hierarchy based on association names and directionality, but could ultimately be linked to several root nodes based on supported hierarchy definitions.

Returns the list of concepts that match the given concept and association names, empty if none are available.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
resolveConcepts -
assocQuals -
Returns:
AssociationList
Throws:
LBException

getHierarchyNodesNext

protected ResolvedConceptReferenceList getHierarchyNodesNext(java.lang.String codingScheme,
                                                             CodingSchemeVersionOrTag versionOrTag,
                                                             java.lang.String[] assocNames,
                                                             boolean fwd,
                                                             java.lang.String conceptCode,
                                                             boolean resolveConcepts,
                                                             NameAndValueList assocQuals)
                                                      throws LBException
Primitive method to retrieve next level of hierarchy based on association names and directionality, but could ultimately be linked to several root nodes based on supported hierarchy definitions.

Returns the list of concepts that match the given concept and association names, empty if none are available.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
assocQuals -
resolveConcepts -
Returns:
ResolvedConceptReferenceList
Throws:
LBException

getHierarchyPathToRoot

protected AssociationList getHierarchyPathToRoot(java.lang.String codingScheme,
                                                 CodingSchemeVersionOrTag versionOrTag,
                                                 java.lang.String[] assocNames,
                                                 boolean fwd,
                                                 java.lang.String conceptCode,
                                                 java.lang.String rootCode,
                                                 boolean resolveConcepts,
                                                 NameAndValueList assocQuals,
                                                 int maxToReturn)
                                          throws LBException
Returns a list of associations representing navigable paths between the given concept and root node combination. It is assumed that the associations generally narrow in the given direction, making this a bounded problem.

This method handles caching. The primitive methods performing the actual resolve are the single and multi-root getters.

Returns the resolved chain; empty if the association cannot be followed from the concept to root code.

Note: For purposes of this method, hierarchical associations are assumed to be transitive.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
rootCode -
resolveConcepts -
assocQuals -
maxToReturn -
Returns:
AssociationList
Throws:
LBException

getHierarchyPathToRootPrim

protected AssociationList getHierarchyPathToRootPrim(java.lang.String codingScheme,
                                                     CodingSchemeVersionOrTag versionOrTag,
                                                     java.lang.String[] assocNames,
                                                     boolean fwd,
                                                     java.lang.String conceptCode,
                                                     java.lang.String rootCode,
                                                     boolean resolveConcepts,
                                                     NameAndValueList assocQuals,
                                                     int maxToReturn)
                                              throws LBException
Resolves all links representing navigable paths between the start and stop codes for the given association, adding them to the returned association list. This method assumes navigation occurs on a single association axis.

Returns the resolved chain; empty if the association cannot be followed from the concept to root code.

Note: For purposes of this method, hierarchical associations are assumed to be transitive.

Parameters:
codingScheme -
versionOrTag -
assocName -
fwd -
conceptCode -
rootCode -
resolveConcepts -
pathResolveOption -
assocQuals -
maxToReturn -
Returns:
AssociationList
Throws:
LBException

getHierarchyPathToRootPrim

protected AssociationList getHierarchyPathToRootPrim(java.lang.String codingScheme,
                                                     CodingSchemeVersionOrTag versionOrTag,
                                                     java.lang.String[] assocNames,
                                                     boolean fwd,
                                                     java.lang.String conceptCode,
                                                     java.lang.String rootCode,
                                                     boolean resolveConcepts,
                                                     NameAndValueList assocQuals,
                                                     int maxToReturn,
                                                     java.util.List<java.lang.String> codeChain)
                                              throws LBException
Throws:
LBException

getHierarchyRootCodes

protected java.lang.String[] getHierarchyRootCodes(java.lang.String codingScheme,
                                                   CodingSchemeVersionOrTag versionOrTag,
                                                   java.lang.String hierarchyID)
                                            throws LBException
Return a basic array of strings containing root codes for the given hierarchy ID. If present, artificial codes '@' and '@@' are pre-expanded. If the hierarchy ID is null, root codes for all registered hierarchies are returned.

Parameters:
codingScheme -
versionOrTag -
hierarchyID -
Returns:
String[]
Throws:
LBException

getSupportedHierarchies

protected SupportedHierarchy[] getSupportedHierarchies(java.lang.String codingScheme,
                                                       CodingSchemeVersionOrTag versionOrTag)
                                                throws LBException
Returns an array of hierarchies supported by the given coding scheme.

Parameters:
codingScheme -
versionOrTag -
Returns:
SupportedHierarchy[]
Throws:
LBException

getSupportedHierarchies

public SupportedHierarchy[] getSupportedHierarchies(java.lang.String codingScheme,
                                                    CodingSchemeVersionOrTag versionOrTag,
                                                    java.lang.String hierarchyId)
                                             throws LBException
Returns an array of hierarchies supported by the given coding scheme and matching the specified ID. If the ID is null, return all registered hierarchies (any ID).

Specified by:
getSupportedHierarchies in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme -
versionOrTag -
hierarchyId -
Returns:
SupportedHierarchy
Throws:
LBException

hasHierarchyPathToRoot

protected boolean hasHierarchyPathToRoot(java.lang.String codingScheme,
                                         CodingSchemeVersionOrTag versionOrTag,
                                         java.lang.String[] assocNames,
                                         boolean fwd,
                                         java.lang.String conceptCode,
                                         java.lang.String[] rootCodes,
                                         NameAndValueList assocQuals)
                                  throws LBException
Returns an indication of whether a path exists between the given concept and the set of root concepts for the given associations in the given direction.

Note: For purposes of this method, hierarchical associations are assumed to be transitive. When possible, transitive closure is used as a shortcut to determine the answer.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
rootCodes -
assocQuals -
Returns:
boolean
Throws:
LBException

hasHierarchyPathToRoot

protected boolean hasHierarchyPathToRoot(java.lang.String codingScheme,
                                         CodingSchemeVersionOrTag versionOrTag,
                                         java.lang.String[] assocNames,
                                         boolean fwd,
                                         java.lang.String conceptCode,
                                         java.lang.String rootCode,
                                         NameAndValueList assocQuals)
                                  throws LBException
Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.

Note: For purposes of this method, hierarchical associations are assumed to be transitive. When possible, transitive closure is used as a shortcut to determine the answer.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
rootCode -
assocQuals -
Returns:
boolean
Throws:
LBException

hasHierarchyPathToRootSingleAxis

protected boolean hasHierarchyPathToRootSingleAxis(java.lang.String codingScheme,
                                                   CodingSchemeVersionOrTag versionOrTag,
                                                   java.lang.String assocName,
                                                   boolean fwd,
                                                   java.lang.String conceptCode,
                                                   java.lang.String rootCode,
                                                   NameAndValueList assocQuals)
                                            throws LBException
Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.

Note: For purposes of this method, hierarchical associations are assumed to be transitive. When possible, transitive closure is used as a shortcut to determine the answer.

Parameters:
codingScheme -
versionOrTag -
assocName -
fwd -
conceptCode -
rootCode -
assocQuals -
Returns:
boolean
Throws:
LBException

hasHierarchyPathToRootMultiAxis

protected boolean hasHierarchyPathToRootMultiAxis(java.lang.String codingScheme,
                                                  CodingSchemeVersionOrTag versionOrTag,
                                                  java.lang.String[] assocNames,
                                                  boolean fwd,
                                                  java.lang.String conceptCode,
                                                  java.lang.String rootCode,
                                                  NameAndValueList assocQuals)
                                           throws LBException
Returns an indication of whether a path exists between the given concept and root for the given associations in the given direction.

Note: For purposes of this method, hierarchical associations are assumed to be transitive. When possible, transitive closure is used as a shortcut to determine the answer.

Parameters:
codingScheme -
versionOrTag -
assocNames -
fwd -
conceptCode -
rootCode -
assocQuals -
Returns:
boolean
Throws:
LBException

setLexBIGService

public void setLexBIGService(LexBIGService lbs)
Assign the associated LexBIGService instance.

Note: This method must be invoked by users of the distributed LexBIG API to set the service to an EVSApplicationService object, allowing client side implementations to use these convenience methods.

Specified by:
setLexBIGService in interface LexBIGServiceConvenienceMethods

getLexBIGService

public LexBIGService getLexBIGService()
Return the associated LexBIGService instance; lazy initialized as required.

Specified by:
getLexBIGService in interface LexBIGServiceConvenienceMethods
Returns:
LexBIGService Return the associated LexBIGService instance; lazy initialized as required.

getCacheKey

protected java.lang.Object getCacheKey(java.lang.Object[] basis)
Return a cache key based on the given items.

Parameters:
basis -
Returns:
Object

getCache_CopyRights

protected java.util.Map getCache_CopyRights()
Return the map used to cache codingScheme information, which maps from key (derived from request parameters) to CodingScheme object.

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getCache_CodingSchemes

protected java.util.Map getCache_CodingSchemes()
Return the map used to cache codingScheme copyRitght information, which maps from key (derived from request parameters) to CopyRight String.

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getCache_HIDs

protected java.util.Map getCache_HIDs()
Return the map used to cache hierarchy ID information, which maps from key (derived from request parameters) to an array of hierarchy IDs (String[]).

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getCache_HRoots

protected java.util.Map getCache_HRoots()
Return the map used to cache hierarchy root information, which maps from key (derived from request parameters) to a ResolvedConceptReferenceList.

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getCache_HRootCodes

protected java.util.Map getCache_HRootCodes()
Return the map used to cache hierarchy root code information, which maps from key (derived from request parameters) to an array of root codes (String[]).

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getCache_HPathToRootExists

protected java.util.Map getCache_HPathToRootExists()
Return the map used to cache hierarchy root existence, which maps from key (derived from request parameters) to a Boolean value.

Note: Methods requiring the cache should invoke this method rather than directly referencing the class variable in order to allow lazy initialization.


getEntityDescription

public java.lang.String getEntityDescription(java.lang.String codingScheme,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String code)
                                      throws LBException
Returns the entity description for the given code.

Specified by:
getEntityDescription in interface LexBIGServiceConvenienceMethods
Parameters:
codingScheme - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
code - The code to resolve.
Returns:
The entity description associated with the code, or null if not available.
Throws:
LBException

addEntityLuceneIndexes

public void addEntityLuceneIndexes(java.lang.String codingSchemeName,
                                   CodingSchemeVersionOrTag versionOrTag,
                                   java.util.List<java.lang.String> entityCodes)
                            throws LBException
Add LuceneIndexes for the given list of concepts.

Specified by:
addEntityLuceneIndexes in interface LexBIGServiceConvenienceMethods
Parameters:
codingSchemeName -
versionOrTag -
entityCode -
Throws:
LBException

removeEntityLuceneIndexes

public void removeEntityLuceneIndexes(java.lang.String codingSchemeName,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.util.List<java.lang.String> entityCodes)
                               throws LBException
Remove LuceneIndexes for the given list of concepts.

Specified by:
removeEntityLuceneIndexes in interface LexBIGServiceConvenienceMethods
Parameters:
codingSchemeName -
versionOrTag -
entityCode -
Throws:
LBException

modifyEntityLuceneIndexes

public void modifyEntityLuceneIndexes(java.lang.String codingSchemeName,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.util.List<java.lang.String> entityCodes)
                               throws LBException
modify LuceneIndexes for the given list of concepts.

Specified by:
modifyEntityLuceneIndexes in interface LexBIGServiceConvenienceMethods
Parameters:
codingSchemeName -
versionOrTag -
entityCode -
Throws:
LBException

getHierarchyOrphanedConcepts

public ResolvedConceptReferenceList getHierarchyOrphanedConcepts(java.lang.String codingSchemeName,
                                                                 CodingSchemeVersionOrTag versionOrTag,
                                                                 java.lang.String hierarchyID)
                                                          throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns all concepts that can not be reached by traversing the hierarchy specified by the hierarchyId from the root.

Specified by:
getHierarchyOrphanedConcepts in interface LexBIGServiceConvenienceMethods
Parameters:
codingSchemeName - The local name or URN of the coding scheme.
versionOrTag - The assigned tag/label or absolute version identifier of the coding scheme.
hierarchyID - Identifies the type of hierarchy being traversed. Supported values for the coding scheme are retrievable through the getHierarchyIDs() method. If null, roots for all registered hierarchies are returned.
Returns:
The collection orphaned concepts; empty if the given hierarchy is not recognized or is unfulfilled by the given coding scheme and version.
Throws:
LBException

getSupportedPropertiesOfTypeComment

public java.util.List<SupportedProperty> getSupportedPropertiesOfTypeComment(java.lang.String codingScheme,
                                                                             CodingSchemeVersionOrTag versionOrTag)
                                                                      throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns an list of properties supported with propertyType of 'comment'.

Specified by:
getSupportedPropertiesOfTypeComment in interface LexBIGServiceConvenienceMethods
Returns:
SupportedProperty
Throws:
LBException

getSupportedPropertiesOfTypeDefinition

public java.util.List<SupportedProperty> getSupportedPropertiesOfTypeDefinition(java.lang.String codingScheme,
                                                                                CodingSchemeVersionOrTag versionOrTag)
                                                                         throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns an list of properties supported with propertyType of 'definition'.

Specified by:
getSupportedPropertiesOfTypeDefinition in interface LexBIGServiceConvenienceMethods
Returns:
SupportedProperty
Throws:
LBException

getSupportedPropertiesOfTypePresentation

public java.util.List<SupportedProperty> getSupportedPropertiesOfTypePresentation(java.lang.String codingScheme,
                                                                                  CodingSchemeVersionOrTag versionOrTag)
                                                                           throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns an list of properties supported with propertyType of 'presentation'.

Specified by:
getSupportedPropertiesOfTypePresentation in interface LexBIGServiceConvenienceMethods
Returns:
SupportedProperty
Throws:
LBException

getSupportedPropertiesOfTypeProperty

public java.util.List<SupportedProperty> getSupportedPropertiesOfTypeProperty(java.lang.String codingScheme,
                                                                              CodingSchemeVersionOrTag versionOrTag)
                                                                       throws LBException
Description copied from interface: LexBIGServiceConvenienceMethods
Returns an list of properties supported with propertyType of 'property'.

Specified by:
getSupportedPropertiesOfTypeProperty in interface LexBIGServiceConvenienceMethods
Returns:
SupportedProperty
Throws:
LBException

getNodesPath

public ResolvedConceptReference getNodesPath(java.lang.String codingSchemeUri,
                                             CodingSchemeVersionOrTag versionOrTag,
                                             java.lang.String containerName,
                                             java.lang.String associationName,
                                             java.lang.String sourceCode,
                                             java.lang.String sourceNS,
                                             java.lang.String targetCode,
                                             java.lang.String targetNS)
                                      throws LBParameterException
Description copied from interface: LexBIGServiceConvenienceMethods
Return the path/transitive closure path between two nodes.

Specified by:
getNodesPath in interface LexBIGServiceConvenienceMethods
Returns:
ResolvedConceptReference, which contains the path
Throws:
LBParameterException

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.