|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lexgrid.valuesets.helper.VSDServiceHelper
public class VSDServiceHelper
Helper class for Value Set Definition functions.
Constructor Summary | |
---|---|
VSDServiceHelper(boolean failOnAllErrors,
LgMessageDirectorIF messages)
Constructor |
Method Summary | |
---|---|
protected CodedNodeSet |
conceptReferenceListToCodedNodeSet(ConceptReferenceList crl,
ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Convert a concept reference list into a coded node set in the context of a particular value set definition |
protected java.lang.String |
constructKey(ConceptReference cr)
Construct a (hopefully) unique key from a concept reference |
protected boolean |
equalReferences(ConceptReference r1,
ConceptReference r2)
Determine whether two concept references refer to the same thing in the context of a single coding scheme! |
AbsoluteCodingSchemeVersionReferenceList |
getAbsoluteCodingSchemeVersionReference(java.lang.String codingSchemeNameOrURI)
Return a list of all the versions of the supplied coding scheme URI or local identifier that are supported by the service |
CodedNodeSet |
getCodedNodeSetForValueSet(ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Resolves the supplied valueSetDefinition object against the list of coding scheme versions |
java.lang.String |
getCodingSchemeNameForNamespaceName(Mappings maps,
java.lang.String namespaceName)
Return the local identifier of the coding scheme name associated with the supplied namespace name in the context of the supplied mapping. |
static java.lang.String |
getCodingSchemeURIForEntityCodeNamespace(Mappings maps,
java.lang.String entityCodeNamespace)
Return the coding scheme URI that corresponds to the supplied entityCodeNamespace. |
java.util.HashSet<java.lang.String> |
getCodingSchemeURIs(ValueSetDefinition vdDef)
Return a string representation the URI's of all of the coding schemes used in the supplied value domain |
LexBIGService |
getLexBIGService()
Return a persistent link to the LexBIG service |
int |
getMaxLeafCacheSize()
Return the maximum cache size for traversing graphs looking for leaf nodes |
protected CodedNodeSet |
getNodeSetForCodingScheme(ValueSetDefinition vdd,
java.lang.String csName,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return the coded node set that represents all of the concept codes in the referenced coding scheme |
protected CodedNodeSet |
getNodeSetForEntityReference(ValueSetDefinition vdd,
EntityReference entityRef,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return a coded node set that represents the supplied entity reference |
protected CodedNodeSet |
getNodeSetForPropertyReference(ValueSetDefinition vdd,
PropertyReference propertyRef,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return a coded node set that represents the supplied property reference |
ResolvedValueSetCodedNodeSet |
getResolvedCodedNodeSetForValueSet(ValueSetDefinition vdd,
AbsoluteCodingSchemeVersionReferenceList csVersionsToUse,
java.lang.String versionTag)
Resolve a value domain definition. |
java.lang.String |
getURIForAssociationName(Mappings maps,
java.lang.String associationName)
Return the URI that corresponds to the supplied association name. |
static java.lang.String |
getURIForCodingSchemeName(Mappings maps,
java.lang.String codingSchemeName)
Return the URI that corresponds to the supplied coding scheme name. |
protected boolean |
isCodingSchemeVersionLoaded(java.lang.String codingSchemeName,
java.lang.String version)
Checks if the supplied codingScheme and version is loaded. |
CodedNodeSet |
leavesOfGraph(CodedNodeGraph cng,
boolean isTargetToSource,
ConceptReference root,
ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return the leaf nodes for the supplied graph. |
java.util.HashMap<java.lang.String,java.lang.String> |
pruneVersionList(AbsoluteCodingSchemeVersionReferenceList suppliedCsVersions)
Go over the supplied coding scheme version reference list and remove any entries that aren't supported by the service. |
protected AbsoluteCodingSchemeVersionReference |
resolveCSVersion(java.lang.String csName,
Mappings maps,
java.lang.String versionTag,
java.util.HashMap<java.lang.String,java.lang.String> refVersions)
Return the absolute reference for the supplied csName. |
void |
setLexBIGService(LexBIGService lbs)
Record a persistent link to the LexBIG service for use by this and other classes |
void |
setMaxLeafCacheSize(int newSize)
Set the maximum cache size to be used when traversing graphs looking for leaf nodes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VSDServiceHelper(boolean failOnAllErrors, LgMessageDirectorIF messages) throws LBParameterException, LBInvocationException
sqlServer
- - SQL Server URIsqlDriver
- - SQL driver namesqlUsername
- - logon user namesqlPassword
- - logon passwordtablePrefix
- - prefix to use (?)failOnAllErrors
- - true means fail on any load, false means trymessages
- - message director
LBParameterException
LBInvocationException
Method Detail |
---|
public java.lang.String getCodingSchemeNameForNamespaceName(Mappings maps, java.lang.String namespaceName)
maps
- Mappings to use for transformationnamespaceName
- name to map
public static java.lang.String getURIForCodingSchemeName(Mappings maps, java.lang.String codingSchemeName)
maps
- - Mappings that contain the name to URI mapscodingSchemeName
- - local identifier of the coding scheme
public static java.lang.String getCodingSchemeURIForEntityCodeNamespace(Mappings maps, java.lang.String entityCodeNamespace)
maps
- - Mappings that contain the name to URI mapsentityCodeNamespace
- - local identifier of the entityCodeNamespace
public java.lang.String getURIForAssociationName(Mappings maps, java.lang.String associationName)
maps
- - Mappings that contain the name to URI mapsassociationName
- - local identifier of the coding scheme
public java.util.HashSet<java.lang.String> getCodingSchemeURIs(ValueSetDefinition vdDef) throws LBException
vdDef
- supplied value domain
LBException
java.net.URISyntaxException
public AbsoluteCodingSchemeVersionReferenceList getAbsoluteCodingSchemeVersionReference(java.lang.String codingSchemeNameOrURI) throws LBException
codingSchemeNameOrURI
- - URI to return versions for or return all URI's if null
LBException
protected boolean isCodingSchemeVersionLoaded(java.lang.String codingSchemeName, java.lang.String version) throws LBException
codingSchemeName
- version
-
LBException
public ResolvedValueSetCodedNodeSet getResolvedCodedNodeSetForValueSet(ValueSetDefinition vdd, AbsoluteCodingSchemeVersionReferenceList csVersionsToUse, java.lang.String versionTag) throws LBException
vdd
- - the value domain definition to be resolvedacsvl
- - a list of coding scheme URI's and versions to be used in the resolution.versionTag
- - a tag (e.g. "production", "test", etc. used to any coding schemes not in asvl
If a coding scheme does not appear in the asvl list the resolution will be as follows:
1) If the service supports a single active version of the coding scheme it will be used.
2) If there is more than one version the one that uses the supplied versionTag will be used
3) If the versionTag isn't supplied, or if none of the versions matches it, then the one
marked "production" will be used
4) If there isn't one marked production, then the "latest" will be used
LBException
public CodedNodeSet getCodedNodeSetForValueSet(ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - the value domain to be resolvedrefVersions
- - a map from coding scheme URIs to the corresponding versionversionTag
- - a tag (e.g. "production", "test", etc. used to resolve missing coding schemes)
If a coding scheme does not appear in this list the resolution will be as follows:
1) If the service supports a single version of the coding scheme it will be used.
2) If there is more than one version the one that uses the supplied versionTag will be used
3) If the versionTag isn't supplied, or if none of the versions matches it, then the one
marked "production" will be used
4) If there isn't one marked production, then the "latest" will be used
LBException
protected CodedNodeSet getNodeSetForCodingScheme(ValueSetDefinition vdd, java.lang.String csName, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - containing value set definitioncsName
- - local name of coding scheme within the value domainrefVersions
- - map from coding scheme URI to versions. A new node will be added to this list if the coding scheme isn't already thereversionTag
- - default version or tag
LBException
protected CodedNodeSet getNodeSetForEntityReference(ValueSetDefinition vdd, EntityReference entityRef, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - containing value set definitionentityRef
- - entity reference to resolverefVersions
- - fixed versions to resolve againstversionTag
- - version tag to resolve elsewise
LBException
protected CodedNodeSet getNodeSetForPropertyReference(ValueSetDefinition vdd, PropertyReference propertyRef, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - containing value set definitionpropertyRef
- - property reference to resolverefVersions
- - fixed versions to resolve againstversionTag
- - version tag to resolve elsewise
LBException
public CodedNodeSet leavesOfGraph(CodedNodeGraph cng, boolean isTargetToSource, ConceptReference root, ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
cng
- - graph to be traversedisTargetToSource
- - direction to traverse the graphroot
- - the root node to start the traverse atvdd
- - value domain definition to resolve leaf nodes against if isLeaf is setrefVersions
- - map of coding Scheme URI to version (may be updated by this routine)versionTag
- - version tag (e.g. devel, production, etc.) to resolve new nodes
LBException
public java.util.HashMap<java.lang.String,java.lang.String> pruneVersionList(AbsoluteCodingSchemeVersionReferenceList suppliedCsVersions) throws LBException
suppliedVersions
- - a list of "suggested" versions to use
LBException
public void setMaxLeafCacheSize(int newSize)
newSize
- New max sizepublic int getMaxLeafCacheSize()
public void setLexBIGService(LexBIGService lbs)
lbs
- public LexBIGService getLexBIGService()
protected AbsoluteCodingSchemeVersionReference resolveCSVersion(java.lang.String csName, Mappings maps, java.lang.String versionTag, java.util.HashMap<java.lang.String,java.lang.String> refVersions) throws LBException
csName
- - the local identifier of the coding scheme to be resolvedmaps
- - mappings that contain local ids to URIsversionTag
- - the version tag to use if there is more than one version in the servicerefVersions
- - a list of URI/version pairs that are already resolved
LBException
protected java.lang.String constructKey(ConceptReference cr)
cr
- concept reference
protected boolean equalReferences(ConceptReference r1, ConceptReference r2)
r1
- - first concept referencer2
- - second concept reference
protected CodedNodeSet conceptReferenceListToCodedNodeSet(ConceptReferenceList crl, ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
crl
- - list to convertvdd
- - context to do the conversion inrefVersions
- - set of already resolved versions (may have new versions added)versionTag
- - the versionTag to use if more than one version of the coding scheme exists
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. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |