org.lexgrid.valuesets
Interface LexEVSValueSetDefinitionServices

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
LexEVSValueSetDefinitionServicesImpl

public interface LexEVSValueSetDefinitionServices
extends java.io.Serializable

Value Set Definition Services.

Author:
Sridhar Dwarkanath

Method Summary
 void exportValueSetDefinition(java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, java.lang.String xmlFullPathName, boolean overwrite, boolean failOnAllErrors)
          Export value set definition to LexGrid canonical XML format.
 java.net.URI exportValueSetResolution(java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, java.net.URI exportDestination, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String csVersionTag, boolean overwrite, boolean failOnAllErrors)
          Exports contents of Value Set Definition as Coding Scheme in LexGrid canonical XML format.
 java.util.List<java.lang.String> getAllValueSetDefinitionsWithNoName()
          Return the URI's of all unnamed value set definition(s).
 ResolvedValueSetCodedNodeSet getCodedNodeSetForValueSetDefinition(java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String csVersionTag)
          Returns unresolved CodedNodeSet populated using definition entries in the value set definition.
 AbsoluteCodingSchemeVersionReferenceList getCodingSchemesInValueSetDefinition(java.net.URI valueSetDefinitionURI)
          Returns list of coding scheme summary that is referenced by the supplied value set definition.
 LogEntry[] getLogEntries()
           
 ValueSetDefinition getValueSetDefinition(java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId)
          Returns value set definition for supplied value set definition URI.
 ResolvedValueSetCodedNodeSet getValueSetDefinitionEntitiesForTerm(java.lang.String term, java.lang.String matchAlgorithm, java.net.URI valueSetDefinitionURI, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Resolve the value set definition, restricting the matching values to entities the match the supplied term and match algorithm.
 java.util.List<java.lang.String> getValueSetDefinitionURIsForSupportedTagAndValue(java.lang.String supportedTag, java.lang.String value, java.lang.String uri)
          Returns list of Value Set Definition URIs that contain supplied SupportedAttribute Tag and Value.
 java.util.List<java.lang.String> getValueSetDefinitionURIsWithCodingScheme(java.lang.String codingSchemename, java.lang.String codingSchemeURI)
          Returns list of Value Set Definition URIs that references supplied coding scheme.
 java.util.List<java.lang.String> getValueSetDefinitionURIsWithConceptDomain(java.lang.String conceptDomain, java.lang.String codingSchemeURI)
          Returns list of Value Set Definition URIs that are bound to supplied concept domain.
 java.util.List<java.lang.String> getValueSetDefinitionURIsWithConceptDomainAndUsageContext(java.lang.String conceptDomain, java.util.List<java.lang.String> usageContexts, java.lang.String codingSchemeURI)
          Returns list of Value Set Definition URIs that are bound to supplied concept domain and in supplied usage context.
 java.util.List<java.lang.String> getValueSetDefinitionURIsWithUsageContext(java.util.List<java.lang.String> usageContexts, java.lang.String codingSchemeURI)
          Returns list of Value Set Definition URIs that can be used with in the supplied list of usage context.
 AbsoluteCodingSchemeVersionReference isEntityInValueSet(java.lang.String entityCode, java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, java.lang.String versionTag)
          Determine whether the supplied entity code is a valid entity code somewhere in the supplied value set definition.
 AbsoluteCodingSchemeVersionReference isEntityInValueSet(java.lang.String entityCode, java.net.URI entityCodeNamespace, java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Determine whether the supplied entity code is valid in the suppled value set definition, when reconciled against the supplied set of coding scheme versions and/or version tags
 boolean isSubSet(java.net.URI childValueSetDefinitionURI, java.net.URI parentValueSetDefinitionURI, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Check whether childValueDSetDefinitionURI is a child of parentValueSetDefinitionURI.
 boolean isValueSetDefinition(java.lang.String entityCode, java.lang.String codingSchemeName, CodingSchemeVersionOrTag csvt)
          Determine if the supplied entity code is of type valueSetDefinition in supplied coding scheme and, if it is, return the true, otherwise return false.
 java.util.List<java.lang.String> listValueSetDefinitions(java.lang.String valueSetDefinitionName)
          Return the URI's for the value set definition(s) for the supplied value set definition name.
 java.util.List<java.lang.String> listValueSetDefinitionURIs()
          Lists all the value set definition URIs that are loaded in the system.
 java.util.List<java.lang.String> listValueSetsWithEntityCode(java.lang.String entityCode, java.net.URI entityCodeNamespace, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Returns all the value set definition uris that contains supplied entity code.
 void loadValueSetDefinition(java.lang.String xmlFileLocation, boolean failOnAllErrors)
          Loads value set definition by reading XML file location supplied
 void loadValueSetDefinition(ValueSetDefinition vsdef, java.lang.String systemReleaseURI, Mappings mappings)
          Loads supplied valueSetDefinition object
 void removeValueSetDefinition(java.net.URI valueSetDefinitionURI)
          Removes supplied value set definition from the system.
 ResolvedValueSetDefinition resolveValueSetDefinition(java.net.URI valueSetDefinitionURI, java.lang.String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag, SortOptionList sortOptionList)
          Resolve a value set definition using the supplied set of coding scheme versions.
 ResolvedValueSetDefinition resolveValueSetDefinition(ValueSetDefinition vsDef, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag, SortOptionList sortOptionList)
          Resolve a value set definition provided using the supplied set of coding scheme versions.
 void validate(java.net.URI uri, int validationLevel)
          Perform validation of the candidate resource without loading data.
 

Method Detail

loadValueSetDefinition

void loadValueSetDefinition(ValueSetDefinition vsdef,
                            java.lang.String systemReleaseURI,
                            Mappings mappings)
                            throws LBException
Loads supplied valueSetDefinition object

Parameters:
vsdef - value set definition to load
systemReleaseURI -
mappings - - additional mappings passed from the value set definition container
Throws:
LBException

loadValueSetDefinition

void loadValueSetDefinition(java.lang.String xmlFileLocation,
                            boolean failOnAllErrors)
                            throws LBException
Loads value set definition by reading XML file location supplied

Parameters:
xmlFileLocation - XML file containing value set definitions
failOnAllErrors -
Throws:
java.lang.Exception
LBException

validate

void validate(java.net.URI uri,
              int validationLevel)
              throws LBException
Perform validation of the candidate resource without loading data.

Parameters:
uri - XML file containing value set definitions
validationLevel - validate <int> Supported levels of validation include: 0 = Verify document is well-formed 1 = Verify document is valid
Throws:
LBParameterException
LBException

isEntityInValueSet

AbsoluteCodingSchemeVersionReference isEntityInValueSet(java.lang.String entityCode,
                                                        java.net.URI valueSetDefinitionURI,
                                                        java.lang.String valueSetDefinitionRevisionId,
                                                        java.lang.String versionTag)
                                                        throws LBException
Determine whether the supplied entity code is a valid entity code somewhere in the supplied value set definition. This function is intended for use with simple value set definition that are drawn from a single coding scheme where most parameters can be defaulted

Parameters:
entityCode - - the entity code to search for. If the value set definition has a default coding scheme, this will become the namespace for the entity code. If not, any matching entity code will pass.
valueSetDefinitionURI - - the URI of the value set definition to search
valueSetDefintionRevisionId - - the version of the value set definition
versionTag - - the version or tag (e.g. "devel", "production", etc.) to be used for all of the coding schemes searched.
Returns:
coding scheme and version if the entityCode is valid, null otherwise
Throws:
LBException

isEntityInValueSet

AbsoluteCodingSchemeVersionReference isEntityInValueSet(java.lang.String entityCode,
                                                        java.net.URI entityCodeNamespace,
                                                        java.net.URI valueSetDefinitionURI,
                                                        java.lang.String valueSetDefinitionRevisionId,
                                                        AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                        java.lang.String versionTag)
                                                        throws LBException
Determine whether the supplied entity code is valid in the suppled value set definition, when reconciled against the supplied set of coding scheme versions and/or version tags

Parameters:
entityCode - - the entity code to validate.
entityCodeNamespace - - the URI of the entity code namespace. If omitted, the default coding scheme namespace for the value domain will be used, if it is present. Otherwise the first matching entity code, if any, will pass
valueSetDefinitionURI - - the URI of the value set definitionn
valueSetDefintionRevisionId - - the version of the value set definition
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
The codingScheme URI and version of that asserts that the code is in the domain
Throws:
LBException

listValueSetsWithEntityCode

java.util.List<java.lang.String> listValueSetsWithEntityCode(java.lang.String entityCode,
                                                             java.net.URI entityCodeNamespace,
                                                             AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                             java.lang.String versionTag)
                                                             throws LBException
Returns all the value set definition uris that contains supplied entity code.

Parameters:
entityCode - - the entity code to validate.
entityCodeNamespace - - the URI of the entity code namespace. If omitted, the default coding scheme namespace for the value domain will be used, if it is present. Otherwise the first matching entity code, if any, will pass
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
The value set definition URIs
Throws:
LBException

getCodedNodeSetForValueSetDefinition

ResolvedValueSetCodedNodeSet getCodedNodeSetForValueSetDefinition(java.net.URI valueSetDefinitionURI,
                                                                  java.lang.String valueSetDefinitionRevisionId,
                                                                  AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                                  java.lang.String csVersionTag)
                                                                  throws LBException
Returns unresolved CodedNodeSet populated using definition entries in the value set definition.

Parameters:
valueSetDefinitionURI - - the URI of the value set definition
valueSetDefintionRevisionId - - the version of the value set definition
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
csVersionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
Throws:
LBException

resolveValueSetDefinition

ResolvedValueSetDefinition resolveValueSetDefinition(java.net.URI valueSetDefinitionURI,
                                                     java.lang.String valueSetDefinitionRevisionId,
                                                     AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                     java.lang.String versionTag,
                                                     SortOptionList sortOptionList)
                                                     throws LBException
Resolve a value set definition using the supplied set of coding scheme versions.

Parameters:
valueSetDefinitionURI - value set definition URI
valueSetDefintionRevisionId - - the version of the value set definition
csVersionList - list of coding scheme versions to use in resolution. IF the value set definition uses a version that isn't mentioned in this list, the resolve function will return the codingScheme and version that was used as a default for the resolution.
versionTag - the tag (e.g. "devel", "production", ...) to be used to determine which coding scheme to be used
sortOptionList - List of sort options to apply during resolution. If supplied, the sort algorithms will be applied in the order provided. Any algorithms not valid to be applied in context of node set iteration, as specified in the sort extension description, will result in a parameter exception. Available algorithms can be retrieved through the LexBIGService getSortExtensions() method after being defined to the LexBIGServiceManager extension registry.
Returns:
Resolved Value Set Definition
Throws:
LBException

resolveValueSetDefinition

ResolvedValueSetDefinition resolveValueSetDefinition(ValueSetDefinition vsDef,
                                                     AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                     java.lang.String versionTag,
                                                     SortOptionList sortOptionList)
                                                     throws LBException
Resolve a value set definition provided using the supplied set of coding scheme versions.

Parameters:
valueSetDefinition - value set definition object
csVersionList - list of coding scheme versions to use in resolution. IF the value set definition uses a version that isn't mentioned in this list, the resolve function will return the codingScheme and version that was used as a default for the resolution.
versionTag - the tag (e.g. "devel", "production", ...) to be used to determine which coding scheme to be used
sortOptionList - List of sort options to apply during resolution. If supplied, the sort algorithms will be applied in the order provided. Any algorithms not valid to be applied in context of node set iteration, as specified in the sort extension description, will result in a parameter exception. Available algorithms can be retrieved through the LexBIGService getSortExtensions() method after being defined to the LexBIGServiceManager extension registry.
Returns:
Resolved Value Domain Definition
Throws:
LBException

isSubSet

boolean isSubSet(java.net.URI childValueSetDefinitionURI,
                 java.net.URI parentValueSetDefinitionURI,
                 AbsoluteCodingSchemeVersionReferenceList csVersionList,
                 java.lang.String versionTag)
                 throws LBException
Check whether childValueDSetDefinitionURI is a child of parentValueSetDefinitionURI.

Parameters:
childValueSetDefinitionURI - child value set definition URI
parentValueSetDefinitionURI - parent value set definition URI
csVersionList - list of coding scheme versions to use in resolution. IF the value set definition uses a version that isn't mentioned in this list, the resolve function will return the codingScheme and version that was used as a default for the resolution.
versionTag - the tag (e.g. "devel", "production", ...) to be used to determine which coding scheme to be used
Returns:
YES, if all the elements of the child domain are in the parent domain NO otherwise.
Throws:
LBException

getValueSetDefinition

ValueSetDefinition getValueSetDefinition(java.net.URI valueSetDefinitionURI,
                                         java.lang.String valueSetDefinitionRevisionId)
                                         throws LBException
Returns value set definition for supplied value set definition URI.

Parameters:
valueSetDefinitionURI - value set definition URI
valueSetDefintionRevisionId - the version of the value set definition
Returns:
value set definition
Throws:
LBException

exportValueSetDefinition

void exportValueSetDefinition(java.net.URI valueSetDefinitionURI,
                              java.lang.String valueSetDefinitionRevisionId,
                              java.lang.String xmlFullPathName,
                              boolean overwrite,
                              boolean failOnAllErrors)
                              throws LBException
Export value set definition to LexGrid canonical XML format.

Parameters:
valueSetDefinitionURI - value set definition URI
valueSetDefinitionRevisionId - revision id of the value set definition to export
xmlFullPathName - Location to save the definition
overwrite - True: to override the existing file.
failOnAllErrors - True: stops exporting if any error.
Throws:
LBException

exportValueSetResolution

java.net.URI exportValueSetResolution(java.net.URI valueSetDefinitionURI,
                                      java.lang.String valueSetDefinitionRevisionId,
                                      java.net.URI exportDestination,
                                      AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                      java.lang.String csVersionTag,
                                      boolean overwrite,
                                      boolean failOnAllErrors)
                                      throws LBException
Exports contents of Value Set Definition as Coding Scheme in LexGrid canonical XML format.

Parameters:
valueSetDefinitionURI - value set definition URI
valueSetDefinitionRevisionId - value set definition revision id
exportDestination - Location to save the definition
csVersionList - A list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
csVersionTag - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present.
overwrite - True: to override the existing file.
failOnAllErrors - True: stops exporting if any error.
Returns:
URI of destination if successfully exported.
Throws:
LBException

listValueSetDefinitions

java.util.List<java.lang.String> listValueSetDefinitions(java.lang.String valueSetDefinitionName)
                                                         throws LBException
Return the URI's for the value set definition(s) for the supplied value set definition name. If the name is null, returns everything. If the name is not null, returns the value set definition(s) that have the assigned name. Note: plural because there is no guarantee of valueSetDefinition uniqueness. If the name is the empty string "", returns all unnamed valueSetDefinitions.

Parameters:
valueSetDefinitionName -
Returns:
value domain URI's
Throws:
LBException

listValueSetDefinitionURIs

java.util.List<java.lang.String> listValueSetDefinitionURIs()
Lists all the value set definition URIs that are loaded in the system.

Returns:
list of value set definition URIs

getAllValueSetDefinitionsWithNoName

java.util.List<java.lang.String> getAllValueSetDefinitionsWithNoName()
                                                                     throws LBException
Return the URI's of all unnamed value set definition(s).

Returns:
value set definition URI's
Throws:
LBException

getValueSetDefinitionEntitiesForTerm

ResolvedValueSetCodedNodeSet getValueSetDefinitionEntitiesForTerm(java.lang.String term,
                                                                  java.lang.String matchAlgorithm,
                                                                  java.net.URI valueSetDefinitionURI,
                                                                  AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                                  java.lang.String versionTag)
                                                                  throws LBException
Resolve the value set definition, restricting the matching values to entities the match the supplied term and match algorithm. Behavior is the same as resolveValueSetDefinition with the exception that a restricted set is returned

Parameters:
term - - text to match. Format is specific to the match algorithm
matchAlgorithm - - match algorithm to use. Must be the name of a supported match algorithm
valueSetDefinitionURI - - value set definition to resolve
csVersionList - - list of coding schemes and versions to resolve against
versionTag - - version tag to use for resolving coding schemes
Returns:
Resolution
Throws:
LBException

getCodingSchemesInValueSetDefinition

AbsoluteCodingSchemeVersionReferenceList getCodingSchemesInValueSetDefinition(java.net.URI valueSetDefinitionURI)
                                                                              throws LBException
Returns list of coding scheme summary that is referenced by the supplied value set definition.

Parameters:
valueSetDefinitionURI -
Returns:
coding scheme version reference list
Throws:
LBException

isValueSetDefinition

boolean isValueSetDefinition(java.lang.String entityCode,
                             java.lang.String codingSchemeName,
                             CodingSchemeVersionOrTag csvt)
                             throws LBException
Determine if the supplied entity code is of type valueSetDefinition in supplied coding scheme and, if it is, return the true, otherwise return false.

Parameters:
entityCode -
codingSchemeName -
csvt -
Returns:
TRUE : If entityCode is of type valueSetDefinition in supplied coding scheme, FALSE : otherwise
Throws:
LBException

removeValueSetDefinition

void removeValueSetDefinition(java.net.URI valueSetDefinitionURI)
                              throws LBException
Removes supplied value set definition from the system.

Parameters:
valueSetDefinitionURI - URI of value set definition to remove
Throws:
LBException

getLogEntries

LogEntry[] getLogEntries()

getValueSetDefinitionURIsForSupportedTagAndValue

java.util.List<java.lang.String> getValueSetDefinitionURIsForSupportedTagAndValue(java.lang.String supportedTag,
                                                                                  java.lang.String value,
                                                                                  java.lang.String uri)
Returns list of Value Set Definition URIs that contain supplied SupportedAttribute Tag and Value.

Parameters:
supportedTag - SupportedAttribute tag like SupportedCodingScheme, SupportedConceptDomain etc.
value - value of the supportedAttribute
uri -
Returns:
list of URIs

getValueSetDefinitionURIsWithCodingScheme

java.util.List<java.lang.String> getValueSetDefinitionURIsWithCodingScheme(java.lang.String codingSchemename,
                                                                           java.lang.String codingSchemeURI)
Returns list of Value Set Definition URIs that references supplied coding scheme.

Parameters:
codingSchemename - name of the coding scheme
Returns:
list of URIs

getValueSetDefinitionURIsWithConceptDomain

java.util.List<java.lang.String> getValueSetDefinitionURIsWithConceptDomain(java.lang.String conceptDomain,
                                                                            java.lang.String codingSchemeURI)
Returns list of Value Set Definition URIs that are bound to supplied concept domain.

Parameters:
conceptDomain - name/id of the conceptDomain
codingSchemeURI - coding scheme URI to which the concept domain belongs to
Returns:
list of URIs

getValueSetDefinitionURIsWithUsageContext

java.util.List<java.lang.String> getValueSetDefinitionURIsWithUsageContext(java.util.List<java.lang.String> usageContexts,
                                                                           java.lang.String codingSchemeURI)
Returns list of Value Set Definition URIs that can be used with in the supplied list of usage context.

Parameters:
usageContexts - list of usage context
codingSchemeURI - coding scheme URI to which the concept domain belongs to
Returns:
list of URIs

getValueSetDefinitionURIsWithConceptDomainAndUsageContext

java.util.List<java.lang.String> getValueSetDefinitionURIsWithConceptDomainAndUsageContext(java.lang.String conceptDomain,
                                                                                           java.util.List<java.lang.String> usageContexts,
                                                                                           java.lang.String codingSchemeURI)
Returns list of Value Set Definition URIs that are bound to supplied concept domain and in supplied usage context.

Parameters:
conceptDomain - name/id of the conceptDomain
usageContexts - list of usage context names/IDs
codingSchemeURI - coding scheme URI to which the concept domain belongs to
Returns:
list of URIs

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.