NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Scrollbar
iconsfalse

...

Page info

...

title
title

Panel
titleContents of this Page
Table of Contents
minLevel2

Introduction

This document is a section of the LexEVS 5.x Programmer's Guide. It is new for LexEVS v5.1.

The Value Domain services are integrated parts of the LexEVS core API. They provide the ability to:

  • load Value Domaindefinitions programmatically into the LexGrid repository using the domain objects that are available via the LexGrid logical model
  • apply user restrictions (ex: valueDomain URI) and dynamically resolve the definitions at run time

The LexEVS Value Domain Services expose the API particularly for the Value Domain elements of the LexGrid Logical Model. For more information on LexGrid model see http://informatics.mayo.edu/

...

Value Domain Class Diagram

These classes implement the LexEVS Value Domain API.

Class Name

Description

VDSServices

Class to handle list of Value Domain Definitions Object to and fro database

VDServices

Class to handle individual Value Domain Definition objects to and fro database.

VDEntryServices

Class to handle Value Domain Entry objects to and fro database.

LexEVSValueDomainServices

Primary interface for LexEVS Value Domain API

LexEVSValueDomainServicesImpl

Implementation of LexEVSValueDomainServices which is primary interface for LexEVS Value Domain API.

LoadValueDomain

Imports the value Domain Definitions in the source file, provided in LexGrid canonical format, to the LexBIG repository.

ResolvedValueDomainCodedNodeSet

Contains coding scheme version reference list that was used to resolve the value domain and the coded node set.

ResolvedValueDomainDefinition

A resolved Value Domain definition containing the coding scheme version reference list that was used to resolve the value domain and an iterator for resolved concepts.

This graphic displays each of the classes listed above.Image Added

LexEVS Value Domain Service API

Administration Functions

LexEVS Value Domain Services provide administration functions to load and remove value domain definitions.

Loading Value Domain Definitions

There are three methods that could be used to load Value Domain Definitions:

  • loadValueDomain(ValueDomainDefinition vddef, String systemReleaseURI)
  • loadValueDomain(InputStream inputStream,boolean failOnAllErrors)
  • loadValueDomain(String xmlFileLocation, boolean failOnAllErrors)
loadValueDomain(ValueDomainDefinition vddef, String systemReleaseURI)

loadValueDomain(ValueDomainDefinition vddef, String systemReleaseURI)

Description:

Loads supplied valueDomainDefinition object.

Input:

org.LexGrid.emf.valueDomains.ValueDomainDefinition

...


string

Output:

none

Exception:

LBException

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to load a Value Domain Definition object and the System Release URI this definition belongs to.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    org.lexgrid.valuedomain.LexEVSValueDomainServices

...

  • vds

...

  • =

...

  • new

...

  • org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();

...

  • Step

...

  • 2:

...

  • Create

...

  • and

...

  • populate

...

  • the

...

  • ValueDomainDefinition

...

  • object.

...


  • ValueDomainDefinition

...

  • can

...

  • be

...

  • created

...

  • using:

...

  • Code Block

...

  • 
    org.LexGrid.emf.valueDomains.ValueDomainDefinition valueDomain = org.LexGrid.emf.valueDomains.ValuedomainsFactory.eINSTANCE.createValueDomainDefinition();
    

...

  • Data

...

  • for

...

  • valueDomain

...

  • object

...

  • can

...

  • be

...

  • populated

...

  • by

...

  • using

...

  • set

...

  • methods:

...

  • Code Block

...

  • 
    valueDomain.setValueDomainURI(uri);
    valueDomain.setValueDomainName(name);
    valueDomain.setDefaultCodingScheme(cs);
    valueDomain.setEntityDescription(ed);
    

...

  • Similarly,

...

  • DefinitionEntry,

...

  • Property,

...

  • and

...

  • Mapping

...

  • objects

...

  • can

...

  • be

...

  • created

...

  • and

...

  • assigned

...

  • to

...

  • the

...

  • valueDomain

...

  • object:

...

  • Code Block

...

  • 
    valueDomain.getDefinitionEntry.add(vdEntry);
    valueDomain.setProperties(propertisObject);
    valueDomain.setMappings(mappingsObject);
    

...

  • Step 3:

...

  • Call

...

  • the

...

  • load

...

  • method

...

  • by

...

  • passing

...

  • the

...

  • Value

...

  • Domain

...

  • Definition

...

  • object

...

  • and

...

  • the

...

  • System

...

  • Release

...

  • URI:

...

  • Code Block

...

  • 
    vds.loadvalueDomain(valueDomain,"Release 2009");
    

...

loadValueDomain(InputStream

...

inputStream,boolean

...

failOnAllErrors)

...

loadValueDomain(InputStream

...

inputStream,boolean

...

failOnAllErrors)

...

Description:

...

Loads

...

valueDomainDefinitions

...

Found

...

in

...

inputStream

Input:

java.io.InputStream

...


boolean

Output:

none

Exception:

Exception

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to load all Value Domain Definitions from the inputstream.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet:
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • load

...

  • method

...

  • by

...

  • passing

...

  • the

...

  • inputSteam

...

  • and

...

  • boolean

...

  • flag

...

  • whether

...

  • to

...

  • stop

...

  • on

...

  • load

...

  • errors:

...

  • Code Block

...

  • 
    vds.loadvalueDomain(inputStream, true);
    

...

loadValueDomain(String

...

xmlFileLocation,

...

boolean

...

failOnAllErrors)

...

loadValueDomain(String

...

xmlFileLocation,

...

boolean

...

failOnAllErrors)

...

Description:

...

Loads

...

valueDomainDefinitions

...

found

...

in

...

input

...

xml

...

file.

...

Input:

...

java.lang.String

...


boolean

Output:

none

Exception:

Exception

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to load all Value Domain Definitions found in an XML file that is in LexGrid format.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • load

...

  • method

...

  • by

...

  • passing

...

  • the

...

  • inputfile

...

  • location

...

  • and

...

  • boolean

...

  • flag

...

  • whether

...

  • to

...

  • stop

...

  • on

...

  • load

...

  • errors:

...

  • Code Block

...

  • 
    vds.loadvalueDomain(inputXMLFile, true);
    

...

Remove Value Domain Definition

Below are the functions to remove value domain definitions from the system.

removeValueDomain(URI valueDomainURI)

removeValueDomain(URI valueDomainURI)

Description:

Removes supplied value domain definition from the system.

Input:

java.net.URI

Output:

none

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

,

...


org.LexGrid.managedobj.RemoveException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to remove the Value Domain Definition from the system that matches the supplied URI.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl()

...

  • ;
    
  • Step 2:
    Code Block
    
    Call removeValueDomain method _vds.removeValueDomain (new URI("AUTO:AllDomesticANDGM"));
    

...

removeAllValueDomains()

...

removeAllValueDomains()

...

Description:

...

Removes

...

all

...

value

...

domain

...

definitions

...

from

...

the

...

system.

...

Input:

...

none

Output:

none

Exception:

org.LexGrid.LexBIG.Exceptions.LBException,

...


org.LexGrid.managedobj.RemoveException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to remove all the Value Domain Definitions that are loaded in the system.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • removeAllValueDomains

...

  • method

...

  • _vds.removeAllValueDomains();

...

Drop Value Domain Tables

Administration function to delete value domain and pick list tables. Tables will be deleted only if there are no contents in value domain and pick list tables.

dropValueDomainTables()

Description:

Drops value domain tables only if there are no value domain and pick list entries.

Input:

none

Output:

none

Exception:

org.LexGrid.LexBIG.Exceptions.LBException,

...


org.LexGrid.managedobj.RemoveException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to drop both Value Domain and Pick List tables. The tables will be dropped only if there are no entries in both Value Domain and Pick List tables.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • dropValueDomainTables

...

  • method

...

  • vds.dropValueDomainTables();

...

Validate XML Resources

Function to perform validation of source XML file without loading.

validate(URI uri, int valicationLevel)

Description:

Performs validation of the candidate resource without loading data.

Input:

java.net.URI

...


int

Output:

none

Exception:

Org.LexGrid.LexBIG.Exceptions.LBParameterException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to validate the XML file that is in LexGrid format. This call will not load the data in XML file.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • validate

...

  • method

...

  • for

...

  • validation

...

  • by

...

  • supplying

...

  • URI

...

  • of

...

  • the

...

  • XML

...

  • file

...

  • and

...

  • validation

...

  • level.

...


  • Supported

...

  • validationLevels

...

  • includes:

...

  • Code Block

...

  • 
    0 = Verify document is well-formed
    1 = Verify document is valid
    vds.validaten(uriOfXMLFile, true);
    

...

Query Functions

Here are some of the query functions that can be run against value domain definitions using the LexEVS Value Domain Services.

isConceptInDomain

There are two methods to check if supplied concept code is part of supplied value domain definition.

isConceptInDomain(String entityCode, URI valueDomainURI)

isConceptInDomain(String entityCode, URI valueDomainURI)

Description:

Determines if the supplied entity code is a valid result for the supplied value domain and, if it is, returns the particular codingSchemeVersion that was used.

Input:

java.lang.String,
java.net.URI

Output:

org.LexGrid.LexBIG.DataModel.Core.

...


AbsoluteCodingSchemeVersionReference

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to determine if the supplied entity code is a valid in the supplied Value Domain URI. If it is, returns Coding Scheme URI and the Version that was used to resolve; otherwise, returns null.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • isConceptInComdin

...

  • method:

...

  • Code Block

...

  • 
    AbsoluteCodingSchemeVersionReference acsvr = vds.isConceptInDomain("conceptA","valueDomainURI");
    

...

isConceptInDomain(String

...

entityCode,

...

URI

...

entityCodeNamespace,

...

CodingSchemeVersionOrTag

...

csvt,

...

URI

...

valueDomainURI)

...

isConceptInDomain(String

...

entityCode,

...

URI

...

entityCodeNamespace,

...

CodingSchemeVersionOrTag

...

csvt,

...

URI

...

valueDomainURI)

...

Description:

...

Similar

...

to

...

the

...

previous

...

method,

...

this

...

method

...

determines

...

if

...

the

...

supplied

...

entity

...

code

...

and

...

entity

...

namespace

...

is

...

a

...

valid

...

result

...

for

...

the

...

supplied

...

value

...

domain

...

when

...

resolved

...

against

...

the

...

supplied

...

Coding

...

Scheme

...

Version

...

or

...

Tag.

...

Input:

...

java.lang.String,

...


java.net.URI,

...


org.LexGrid.LexBIG.DataModel.Core.

...

CodingSchemeVersionOrTag

...


java.net.URI

...

Output:

...

org.LexGrid.LexBIG.DataModel.Core.

...

AbsoluteCodingSchemeVersionReference

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to determine if the supplied entity code and its entity namespace is valid in the supplied Value Domain URI when resolved against supplied Coding Scheme Version or Tag. If it is, return Coding Scheme URI and the Version that was used to resolve; otherwise, returns null.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • isConceptInDomain

...

  • method:

...

  • Code Block

...

  • 
    AbsoluteCodingSchemeVersionReference acsvr = vds.isConceptInDomain("conceptA","conceptAEntityNamespace","codingSchemeVersion","valueDomainURI");
    

...

resolveValueDomain

This method resolves supplied value domain definition and returns set of valied concept codes plus the code systems and its versions that were used.

resolveValueDomain(URI valueDomainURI, AbsoluteCodingSchemeVersionReferenceList csVersionList)

Description:

Resolves a value domain using the supplied set of coding scheme versions.

Input:

java.net.URI

...

,

...


org.LexGrid.LexBIG.DataModel.Core.

...

AbsoluteCodingSchemeVersionReferenceList

Output:

org.lexgrid.valuedomain.dto.ResolvedValueDomainDefinition

...

Exception:

...

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to resolve supplied value domain against list of Coding Scheme versions if supplied. If Coding Scheme Versions list is not supplied, API will resolve against any version of the loaded Coding Scheme that is referenced by the Value Domain. Returns object ResolvedValueDomainDefinition, which contains AbsoluteCodingSchemeVersionReferenceList, which tells the Coding Scheme and the versions that were used for this resolve, plus the ResolvedConceptReferencesIterator, which is an iterator for all the valid concepts that belong to the Value Domain and Value Domain Definition itself.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Create

...

  • AbsoluteCodingSchemeVersionReferenceList:

...

  • Code Block

...

  • 
    AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
    csvList.addAbsoluteCodingSchemeVersionReference(Constructors.
    createAbsoluteCodingSchemeVersionReference("Automobiles", "2.0"));
    csvList.addAbsoluteCodingSchemeVersionReference(Constructors)
    createAbsoluteCodingSchemeVersionReference("AutomobilesParts", "2.0"));

...

  • 
    
  • Step 3:

...

  • Call

...

  • resolveValueDomain

...

  • method:

...

  • Code Block

...

  • 
    ResolvedValueDomainDefinition rvdDef = vds.resolveValueDomain ("valueDomainURI",csvList);
    

...

isSubDomain

This method checks if childValueDomain is a child of parentValueDomain.

isSubDomain(URI childValueDomainURI, URI parentValueDomainURI

Description:

Checks whether childValueDomainURI is a child of parentValueDomainURI.

Input:

java.net.URI,_java.net.URI

...

Output:

boolean

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to determine if all the concepts that get resolved from the supplied Child Value Domain URI are children of concepts that get resolved from the Parent Value Domain URI. Returns true if they all are; otherwise, returns false.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • isSubDomain

...

  • method:

...

  • Code Block

...

  • 
    boolean isSubDomain =  vds.isSubDomain (childValueDomainURI, parentValueDomainURI);
    

...

getValueDomainDefinition

Utility method that returns value domain definition for the supplied value domain URI.

getValueDomainDefinition(URI valueDomainURI)

Description:

Returns value domain definition for the supplied value domain URI.

Input:

java.net.URI

Output:

org.LexGrid.emf.valueDomains.ValueDomainDefinition

...

Exception:

...

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the Value Domain Definition of the supplied Value Domain URI.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • getValueDomainDefinition

...

  • method:

...

  • Code Block

...

  • 
    ValueDomainDefinition vdDef = vds.getValueDomainDefinition (valueDomainURI);
    

...

listValueDomains

Utility method that lists all the value domain(s)

...

that

...

matches

...

supplied

...

name.

...

listValueDomains(String

...

valueDomainName)

...

Description:

...

Returns

...

the

...

URI's

...

for

...

the

...

value

...

domain

...

definition(s)

...

for

...

the

...

supplied

...

domain

...

name.

...

If

...

the

...

name

...

is

...

null,

...

returns

...

everything.

...

If

...

the

...

name

...

is

...

not

...

null,

...

returns

...

the

...

value

...

domain(s)

...

that

...

have

...

the

...

assigned

...

name.

...

Info

...

title

...

Note

...

Plural

...

because

...

there

...

is

...

no

...

guarantee

...

of

...

valueDomain

...

uniqueness.

...

If

...

the

...

name

...

is

...

the

...

empty

...

string

...

"",

...

returns

...

all

...

unnamed

...

valueDomains.

...

Input:

...

java.lang.String

...

Output:

...

java.net.URI

...

Exception:

...

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the list of Value Domain URIs that matches the supplied name.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • listValueDomains

...

  • method:

...

  • Code Block

...

  • 
    URI[] uris = vds.listValueDomains("someValueDomainName");

...

  • 
    

getAllValueDomainsWithNoNames

This method returns all the value domain definition URI's

...

that

...

contains

...

no

...

names.

...

getAllValueDomainsWithNoNames()

...

Description:

...

Returns

...

the

...

URI's

...

of

...

all

...

unnamed

...

value

...

domain

...

definition(s).

...

Input:

...

none

Output:

java.net.URI

...

Exception:

...

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the list of Value Domain URI that have no names.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • getAllValueDomainsWithNoNames

...

  • method:

...

  • Code Block

...

  • 
    URI[] uris = vds.getAllValueDomainsWithNoNames();
    

...

getValueDomainEntitiesForTerm

This method resolves the supplied value domain and returns only those concept codes that matches the supplied term.

getValueDomainEntitiesForTerm(String term, URI valueDomainURI, String matchAlgorithm)

Description:

Resolves the value domain supplied and restricts it to the term and matchAlgorith supplied. The returned object ResolvedValueDomainCodedNodeSet contains the codingScheme URI and Version that was used to resolve and the CodedNodeSet.

Info
titleNote

The CodedNodeSet is unresolved.

Input:

java.lang.String,
java.net.URI,
java.lang.String

Output:

org.lexgrid.valuedomain.dto.ResolvedValueDomainCodedNodeSet

...

Exception:

...

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the resolved Value Domain Entries as CodedNodeSet that is restricted to the supplied term and the match algorithm. The returned CodedNodeSet is not resolved.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • getValueDomainEntriesForTerm

...

  • method:

...

  • Code Block

...

  • 
    ResolvedValueDomainCodedNodeSet vdvns = vds.getValueDomainEntriesForTerm ("General Motors", new URI("AUTO:AllDomesticANDGM"), MatchAlgorithms.exactMatch.name();
    

...

getCodingSchemesInValueDomain

This method returns all the coding scheme referenced by supplied value domain.

getCodingSchemesInValueDomain(URI valueDomainURI)

Description:

Returns list of coding scheme summary that is referenced by the supplied value domain.

Input:

java.net.URI

Output:

org.LexGrid.LexBIG.DataModel.Collections.

...

AbsoluteCodingSchemeVersionReferenceList

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get List of all Coding Scheme URIs and the Versions that the supplied Value Domain URI references.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • getCodingSchemesInValueDomain

...

  • method:

...

  • Code Block

...

  • 
    AbsoluteCodingSchemeVersionReferenceList csvList = vds.getCodingSchemesInValueDomain(new URI("AUTO:AllDomesticANDGM"));
    

...

isDomain

This method checks if the supplied entityCode is of type 'valueDomain' in supplued coding scheme and version.

isDomain(String entityCode, String codingSchemeName, CodingSchemeVersionOrTag csvt)

Description:

Determines if the supplied entity code is of type valueDomain in the supplied coding scheme and, if it is, returns true; otherwise returns false.

Input:

java.lang.String,
java.lang.String
org.LexGrid.LexBIG.DataModel.Core.

...

CodingSchemeVersionOrTag

Output:

...

boolean

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to check if the supplied entity code is of type valueDomain in the supplied Coding Scheme.
Sample Call:

  • Step 1: Instantiate LexEVSValueDomainServices if it is not done yet :
    Code Block
    
    org.lexgrid.valuedomain.LexEVSValueDomainServices vds = new org.lexgrid.valuedomain.impl.LexEVSValueDomainServicesImpl();
    

...

  • Step 2:

...

  • Call

...

  • isDomain

...

  • method:

...

  • Code Block

...

  • 
    boolean isDomain = vds.isDomain ("VD005", "Automobiles", Constructors.createCodingSchemeVersionOrTag(null, "2.0"));
    

...

Resolved Value Domain Objects

ResolvedValueDomainCodedNodeSet

Contains Coding Scheme Version reference list that was used to resolve the Value Domain and the CodedNodeSet.
The CodedNodeSet is not resolved.

ResolvedValueDomainDefinition

A resolved Value Domain Definition containing the Coding Scheme Version reference list that was used to resolve the Value Domain and an iterator for resolved concepts.

Error Handling

LexEVS Value Domain services uses org.LexGrid.LexBIG.Impl.loaders.MessageDirector

...

to

...

direct

...

all

...

fatal,

...

error,

...

warning,

...

info

...

messages

...

with

...

appropriate

...

messages

...

to

...

the

...

LexBIG

...

log

...

files

...

in

...

the

...

'log'

...

folder

...

of

...

LexEVS

...

install

...

directory.

...

Along

...

with

...

MessageDirector,

...

the

...

services

...

will

...

also

...

make

...

use

...

of

...

org.LexGrid.LexBIG.exception.LBException

...

to

...

throw

...

any

...

fatal

...

and

...

error

...

messages

...

to

...

the

...

log

...

file

...

as

...

well

...

as

...

to

...

console.

...

Load

...

Scripts

...

Following

...

are

...

the

...

scripts

...

that

...

can

...

be

...

used

...

to

...

load

...

value

...

domain

...

definition

...

that

...

are

...

in

...

LexGrid

...

XML

...

format

...

into

...

the

...

system

...

:

...

  • LoadValueDomain.bat

...

  • for

...

  • Windows

...

  • environment

...

  • and

...

  • LoadValueDomain.sh

...

  • for

...

  • Unix

...

  • environment

...

The

...

above

...

scripts

...

can

...

be

...

found

...

under

...

'Admin'

...

folder

...

of

...

LexEVS

...

install

...

directory.

...

Both

...

scripts

...

take

...

in

...

the

...

following

...

parameters:

{
Code Block
}
-in 
Input <uri> 
URI or path specifying location of the source file.
-v 
Validate <int> 
Perform validation of the candidate resource without loading data. Supported levels of validation include:
0 = Verify document is well-formed 
1 = Verify document is valid
{code}

Example:

{
Code Block
}
 sh LoadValueDomain.sh -in "file:///path/to/file.xml"

Sample Value Domain Definition XML File

Below is a sample XML file containing Value Domain Definitions in LexGrid format that can be loaded using LexEVS Value Domain Service.

Code Block
{code}

h2. Sample Value Domain Definition XML File

Below is a sample XML file containing Value Domain Definitions in LexGrid format that can be loaded using LexEVS Value Domain Service.

{code}
<source>
<?xml version="1.0" encoding="UTF-8"?>
<systemRelease xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
{panel}
    xsi:schemaLocation="http://LexGrid.org/schema/2009/01/LexGrid/versions http://LexGrid.org/schema/2009/01/LexGrid/versions.xsd"
    xmlns="http://LexGrid.org/schema/2009/01/LexGrid/versions" xmlns:lgVer="http://LexGrid.org/schema/2009/01/LexGrid/versions"
    xmlns:lgCommon="http://LexGrid.org/schema/2009/01/LexGrid/commonTypes" xmlns:data="data"
    xmlns:lgVD="http://LexGrid.org/schema/2009/01/LexGrid/valueDomains" xmlns:lgNaming="http://LexGrid.org/schema/2009/01/LexGrid/naming"
    releaseURI="http://testRelease/04" releaseDate="2008-11-07T14:55:51.615-06:00">
    <lgCommon:entityDescription>Sample value domains</lgCommon:entityDescription>
    <lgVer:valueDomains>
        <lgVD:mappings>
            <lgNaming:supportedAssociation localId="hasSubtype" uri="urn:oid:1.3.6.1.4.1.2114.108.1.8.1">hasSubtype</lgNaming:supportedAssociation>
            <lgNaming:supportedCodingScheme localId="Automobiles" uri="urn:oid:11.11.0.1">Automobiles</lgNaming:supportedCodingScheme>
            <lgNaming:supportedDataType localId="testhtml">test/html</lgNaming:supportedDataType>
            <lgNaming:supportedDataType localId="textplain">text/plain</lgNaming:supportedDataType>
            <lgNaming:supportedHierarchy localId="is_a" associationNames="hasSubtype" isForwardNavigable="true" rootCode="@">hasSubtype</lgNaming:supportedHierarchy>
            <lgNaming:supportedLanguage localId="en" uri="www.en.org/orsomething">en</lgNaming:supportedLanguage>
            <lgNaming:supportedNamespace localId="Automobiles" uri="urn:oid:11.11.0.1" equivalentCodingScheme="Automobiles">Automobiles</lgNaming:supportedNamespace>
            <lgNaming:supportedProperty localId="textualPresentation">textualPresentation</lgNaming:supportedProperty>
            <lgNaming:supportedSource localId="lexgrid.org">lexgrid.org</lgNaming:supportedSource>
            <lgNaming:supportedSource localId="_111101">11.11.0.1</lgNaming:supportedSource>
        </lgVD:mappings>
       <lgVD:valueDomainDefinition valueDomainURI="SRITEST:AUTO:DomesticAutoMakers" valueDomainName="Domestic Auto Makers" defaultCodingScheme="Automobiles" effectiveDate="2009-01-01T11:00:00Z" isActive="true" status="ACTIVE">
            <lgVD:properties>
                <lgCommon:property propertyName="textualPresentation">
                    <lgCommon:value> Domestic Auto Makers</lgCommon:value>
                </lgCommon:property>
            </lgVD:properties>
            <lgVD:definitionEntry ruleOrder="1" operator="OR">
                <lgVD:entityReference entityCode="005" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="false"/>
            </lgVD:definitionEntry>
        </lgVD:valueDomainDefinition>
       <lgVD:valueDomainDefinition valueDomainURI="SRITEST:AUTO:AllDomesticButGM" valueDomainName="All Domestic Autos But GM" defaultCodingScheme="Automobiles" effectiveDate="2009-01-01T11:00:00Z" isActive="true" status="ACTIVE">
            <lgVD:properties>
                <lgCommon:property propertyName="textualPresentation">
                    <lgCommon:value> Domestic Auto Makers</lgCommon:value>
                </lgCommon:property>
            </lgVD:properties>
            <lgVD:definitionEntry ruleOrder="1" operator="OR">
                <lgVD:entityReference entityCode="005" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="false"/>
            </lgVD:definitionEntry>
            <lgVD:definitionEntry ruleOrder="2" operator="SUBTRACT">
                <lgVD:entityReference entityCode="GM" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="false"/>
            </lgVD:definitionEntry>
        </lgVD:valueDomainDefinition>
        <lgVD:valueDomainDefinition valueDomainURI="SRITEST:AUTO:AllDomesticANDGM" valueDomainName="All Domestic Autos AND GM" defaultCodingScheme="Automobiles" effectiveDate="2009-01-01T11:00:00Z" isActive="true" status="ACTIVE">
            <lgVD:properties>
                <lgCommon:property propertyName="textualPresentation">
                    <lgCommon:value> Domestic Auto Makers AND GM</lgCommon:value>
                </lgCommon:property>
            </lgVD:properties>
            <lgVD:definitionEntry ruleOrder="1" operator="OR">
                <lgVD:entityReference entityCode="005" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="false"/>
            </lgVD:definitionEntry>
            <lgVD:definitionEntry ruleOrder="2" operator="AND">
                <lgVD:entityReference entityCode="GM" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="false"/>
            </lgVD:definitionEntry>
        </lgVD:valueDomainDefinition>
         <lgVD:valueDomainDefinition valueDomainURI="SRITEST:AUTO:DomasticLeafOnly" valueDomainName="Domestic Leaf Only" defaultCodingScheme="Automobiles" effectiveDate="2009-01-01T11:00:00Z" isActive="true" status="ACTIVE">
            <lgVD:properties>
                <lgCommon:property propertyName="textualPresentation">
                    <lgCommon:value>Domestic Leaf Only</lgCommon:value>
                </lgCommon:property>
            </lgVD:properties>
            <lgVD:definitionEntry ruleOrder="1" operator="OR">
                <lgVD:entityReference entityCode="005" referenceAssociation="hasSubtype" transitiveClosure="true"  targetToSource="false" leafOnly="true"/>
            </lgVD:definitionEntry>
        </lgVD:valueDomainDefinition>
        </lgVer:valueDomains>
{panel}
</systemRelease>
</source>
{code}

h2. System Testing

The System test case for the LexEVS Value Domain service is performed using the JUnit test suite:

{code}
</source>

System Testing

The System test case for the LexEVS Value Domain service is performed using the JUnit test suite:

Code Block
org.LexGrid.LexBIG.Impl.testUtility.VDAllTests
{code}

This

...

test

...

suite

...

will

...

be

...

run

...

as

...

part

...

of

...

regular

...

LexEVS

...

test

...

suites

...

AllTestsAllConfigs

...

and

...

AllTestsNormalConfigs.

...

Installation

...

/

...

Packaging

...

Value

...

Domain

...

Services

...

are

...

integrated

...

parts

...

of

...

core

...

LexEVS

...

API

...

and

...

are

...

packaged

...

and

...

installed

...

with

...

other

...

LexEVS

...

services.

...

Scrollbar

...

icons

...

false

...