org.LexGrid.LexBIG.Extensions.Generic
Interface LexBIGServiceConvenienceMethods

All Superinterfaces:
Extendable, GenericExtension, java.io.Serializable

public interface LexBIGServiceConvenienceMethods
extends GenericExtension

Convenience methods to be implemented as a generic extension of the LexBIG API.


Nested Class Summary
static class LexBIGServiceConvenienceMethods.HierarchyPathResolveOption
           
 
Method Summary
 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.
 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 association, 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 getAssociationReverseName(java.lang.String association, 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.
 java.lang.String getCodingSchemeCopyright(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag)
          Return the copyright text for the coding scheme.
 CodingSchemeRenderingList getCodingSchemesWithSupportedAssociation(java.lang.String associationName)
          Return the coding schemes who supported association matching with associationName.
 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.
 AssociationList getHierarchyLevelNext(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList associationQualifiers)
          Return a representation of associations between a concept and its immediate descendants.
 AssociationList getHierarchyLevelPrev(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, NameAndValueList associationQualifiers)
          Return a representation of associations between a concept and its immediate ancestor(s).
 AssociationList getHierarchyPathToRoot(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID, java.lang.String conceptCode, boolean resolveConcepts, LexBIGServiceConvenienceMethods.HierarchyPathResolveOption pathResolveOption, NameAndValueList associationQualifiers)
          Return a representation of associations between a concept and hierarchical root node(s).
 ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme, CodingSchemeVersionOrTag versionOrTag, java.lang.String hierarchyID)
          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()
           
 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.
 boolean isCodeRetired(java.lang.String conceptCode, java.lang.String codingScheme, 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 forward name 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 reverse name of an association for the coding scheme.
 void setLexBIGService(LexBIGService lbs)
          Assign the associated LexBIGService instance.
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Extendable
getDescription, getName, getProvider, getVersion
 

Method Detail

getLexBIGService

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

setLexBIGService

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.


createCodeNodeSet

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

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

getEntityDescription

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

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

getHierarchyIDs

java.lang.String[] getHierarchyIDs(java.lang.String codingScheme,
                                   CodingSchemeVersionOrTag versionOrTag)
                                   throws LBException
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).

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

getHierarchyRoots

ResolvedConceptReferenceList getHierarchyRoots(java.lang.String codingScheme,
                                               CodingSchemeVersionOrTag versionOrTag,
                                               java.lang.String hierarchyID)
                                               throws LBException
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.

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

getHierarchyRootSet

CodedNodeSet getHierarchyRootSet(java.lang.String codingScheme,
                                 CodingSchemeVersionOrTag versionOrTag,
                                 java.lang.String hierarchyID)
                                 throws LBException
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.

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

getHierarchyLevelNext

AssociationList getHierarchyLevelNext(java.lang.String codingScheme,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.lang.String hierarchyID,
                                      java.lang.String conceptCode,
                                      boolean resolveConcepts,
                                      NameAndValueList associationQualifiers)
                                      throws LBException
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.

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.
associationQualifiers - 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

AssociationList getHierarchyLevelPrev(java.lang.String codingScheme,
                                      CodingSchemeVersionOrTag versionOrTag,
                                      java.lang.String hierarchyID,
                                      java.lang.String conceptCode,
                                      boolean resolveConcepts,
                                      NameAndValueList associationQualifiers)
                                      throws LBException
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.

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.
associationQualifiers - 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

AssociationList getHierarchyPathToRoot(java.lang.String codingScheme,
                                       CodingSchemeVersionOrTag versionOrTag,
                                       java.lang.String hierarchyID,
                                       java.lang.String conceptCode,
                                       boolean resolveConcepts,
                                       LexBIGServiceConvenienceMethods.HierarchyPathResolveOption pathResolveOption,
                                       NameAndValueList associationQualifiers)
                                       throws LBException
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).

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.
associationQualifiers - 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

getRenderingDetail

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

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

isCodeRetired

boolean isCodeRetired(java.lang.String conceptCode,
                      java.lang.String codingScheme,
                      CodingSchemeVersionOrTag versionOrTag)
                      throws LBException
Indicates if the given code is considered retired or inactive within context of the provided scheme.

Parameters:
conceptCode - The concept code to evaluate.
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 to query.
Returns:
true if retired; false otherwise
Throws:
LBException

getCodingSchemesWithSupportedAssociation

CodingSchemeRenderingList getCodingSchemesWithSupportedAssociation(java.lang.String associationName)
                                                                   throws LBException
Return the coding schemes who supported association matching with associationName. The search is performed only for loaded coding schemes.

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

getCodingSchemeCopyright

java.lang.String getCodingSchemeCopyright(java.lang.String codingScheme,
                                          CodingSchemeVersionOrTag versionOrTag)
                                          throws LBException
Return the copyright text for the coding scheme.

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

java.lang.String[] getAssociationForwardAndReverseNames(java.lang.String codingScheme,
                                                        CodingSchemeVersionOrTag versionOrTag)
                                                        throws LBException
Return all the association forward name and reverse name for the coding scheme.

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

getAssociationForwardName

java.lang.String getAssociationForwardName(java.lang.String association,
                                           java.lang.String codingScheme,
                                           CodingSchemeVersionOrTag versionOrTag)
                                           throws LBException
Return the forward name for the identified association.

Parameters:
association - 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

getAssociationForwardNames

java.lang.String[] getAssociationForwardNames(java.lang.String codingScheme,
                                              CodingSchemeVersionOrTag versionOrTag)
                                              throws LBException
Return all the association forward name for the coding scheme.

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

java.lang.String getAssociationReverseName(java.lang.String association,
                                           java.lang.String codingScheme,
                                           CodingSchemeVersionOrTag versionOrTag)
                                           throws LBException
Return the reverse name for the identified association.

Parameters:
association - 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

java.lang.String[] getAssociationReverseNames(java.lang.String codingScheme,
                                              CodingSchemeVersionOrTag versionOrTag)
                                              throws LBException
Return all the association reverse name for the coding scheme.

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

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

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

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

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

getAssociationReverseOneLevel

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
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.

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

getAssociationForwardOneLevel

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
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.

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

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.