NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{scrollbar:icons=false}
h1. {
Scrollbar
iconsfalse
page-info

...

Panel
titleContents of this Page
Table of Contents
minLevel2

Introduction

This document is a section of the Migration Guide.

Purpose of this Document

The transition from EVS API to LexEVS API will require the use of different methods to accomplish the same function as was previously provided in EVS API. This document will identify each deprecated class and provide the alternative LexEVS API.

Classes no longer Available

As a result of the deprecation of the EVS API, the following classes are no longer available:

  • EVSQuery and EVSQueryImpl
  • EVSQueryDAOImpl - Not a public API.
  • EVSWSDAOImpl - Not a public API.
  • EVSWSQuery - Not a public API.
  • DLBAdapter - Not a public API.
  • DLBWrapper (DLBWrapper is extended by DLBAdapter and it is not been used anywhere else) - Not a public API.
  • EVSApplicationService and EVSApplicationServiceImpl

EVSApplicationService - evsSearch and search - and LexEVS Counterparts

These methods are replaced either by the LexEVS API or the LexEVS caCORE SDK Data Service 'search' method. This uses the standard caCORE SDK API. More information about the caCORE SDK can be obtained on the caCORE SDK site.

EVSQuery Methods and LexEVS Counterparts

getTree

All 'getTree' functionality is replaced by the LexEVS CodedNodeGraph API. For example:

Code Block
:title}
{panel:title=Contents of this Page}
{toc:minLevel=2}
{panel}

h2. Introduction
This document is a section of the [Migration Guide|LexEVS 5.x Migration Guide]. 

h2. Purpose of this Document
The transition from EVS API to LexEVS API will require the use of different methods to accomplish the same function as was previously provided in EVS API. This document will identify each deprecated class and provide the alternative LexEVS API. 

h2. Classes no longer Available
As a result of the deprecation of the EVS API, the following classes are no longer available:
* EVSQuery and EVSQueryImpl
* EVSQueryDAOImpl - Not a public API.
* EVSWSDAOImpl  - Not a public API.
* EVSWSQuery - Not a public API.
* DLBAdapter - Not a public API.
* DLBWrapper (DLBWrapper is extended by DLBAdapter and it is not been used anywhere else) - Not a public API.
* EVSApplicationService and EVSApplicationServiceImpl

h2. EVSApplicationService - evsSearch and search - and LexEVS Counterparts

These methods are replaced either by the LexEVS API or the LexEVS caCORE SDK Data Service 'search' method. This uses the standard caCORE SDK API. More information about the caCORE SDK can be obtained on the [caCORE SDK site|http://ncicb.nci.nih.gov/infrastructure/cacoresdk].

h2. EVSQuery Methods  and LexEVS Counterparts

h3. getTree

All 'getTree' functionality is replaced by the LexEVS *CodedNodeGraph* API. For example:

{code}
 public void getTree(String vocabularyName, String rootCode, boolean 
direction, boolean isaFlag, int attributes, int levels, Vector roles);
{code}

is replaced by:

...



{code
}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag, versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, 
                                                     boolean 
resolveBackward, int resolveCodedEntryDepth, int 
resolveAssociationDepth, 
                                                     LocalNameList 
propertyNames, PropertyType[] propertyTypes, SortOptionList 
sortOptions, 
                                                     int 
maxToReturn).getResolvedConceptReference();
{code}

Also, various methods in *LexBIGServiceConvenienceMethods* can be used to show hierarchies. See the following

...

  • getHierarchyRoots
  • getHierarchyRootSet
  • getHierarchyLevelNext
  • getHierarchyLevelPrev
  • getHierarchyPathToRoot

For examples, see the following LexEVS Example classes:

 methods: 
* getHierarchyRoots
* getHierarchyRootSet
* getHierarchyLevelNext
* getHierarchyLevelPrev
* getHierarchyPathToRoot

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.BuildTreeForCode

...


* org.LexGrid.LexBIG.example.ListHierarchy

...


* org.LexGrid.LexBIG.example.ListHierarchyByCode

...


* org.LexGrid.LexBIG.example.ListHierarchyPathToRoot

...

searchDescLogicConcepts

LexEVS provides many ways to restrict the result of a query. The method 'searchDescLogicConcepts' searches for matches based on a text String. To conduct similar queries using LexEVS, use the CodedNodeSet API.

Obtain a CodedNodeSet from LexEVS:

Code Block


h3. searchDescLogicConcepts
LexEVS provides many ways to restrict the result of a query. The method 'searchDescLogicConcepts' searches for matches based on a text String. To conduct similar queries using LexEVS, use the *CodedNodeSet* API.

Obtain a CodedNodeSet from LexEVS:

{code}
 CodedNodeSet nodes = lexevsService.getNodeSet(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, LocalNameList entityTypes);
{code}

Once established, the CodedNodeSet can be further restricted using the various 'restrict' methods in the *CodedNodeSet* API.

...



For examples, see the following LexEVS Example classes:

...


* org.LexGrid.LexBIG.example.SoundsLike

...


* org.LexGrid.LexBIG.example.FindCodesForDescription

...

getConceptWithPropertyMatching

...




h3. getConceptWithPropertyMatching
See example above. For Property-specific matching, see the following method in the *CodedNodeSet* API

...

  • restrictToProperties

This will ensure that each of the results will have at least one Property that matches the supplied criteria.

isSubConcept

In LexEVS, use the CodedNodeGraph API to find the immediate relations of a Concept.
For instance:

Code Block

* restrictToProperties

This will ensure that each of the results will have at least one Property that matches the supplied criteria.

h3. isSubConcept
In LexEVS, use the *CodedNodeGraph* API to find the immediate relations of a Concept.
For instance:
{code}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                                    int 
resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList 
propertyNames, 
                                                    PropertyType[] 
propertyTypes, SortOptionList sortOptions, int 
maxToReturn).getResolvedConceptReference();
{code}

Set the *ConceptReference graphFocus* to the desired code, this will focus the Graph. Then check the relationships.

...



Alternatively, use the *CodedNodeGraph* API method 'areCodesRelated'

...


{code
}
 Boolean areCodesRelated(NameAndValue association, ConceptReference 
sourceCode, ConceptReference targetCode, boolean directOnly) 

isRetired

...

{code}

h3. isRetired
Use the *LexBIGServiceConvenienceMethods* API method 'isCodeRetired' method.

...

getDescendants

Use the LexEVS HistoryService API

Obtain a the HistoryService API as follows:

Code Block


h3. getDescendants
Use the LexEVS *HistoryService* API

Obtain a the HistoryService API as follows:

{code}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

To get the decendents of a given code, use the 'getDecendants' method:

...


{code
}
 NCIChangeEventList changeEventList = historySvc.getDescendants
(ConceptReference conceptReference);

getPropertyValues

...

{code}

h3. getPropertyValues
Through the _Entity_ class, all Properties (Presentations, Definitions, etc) are available.

...

 

* Entity - To find the 'Presentations' of a given Entity:

...


{code

...

}
    Entity entity = ....;
    Presentation[] presentations = entity.getPresentation();

...


{code}

* To find the 'Definitions' of a given Entity:

...


{code

...

}
    Entity entity = ....;
    Definition[] definitions = entity.getDefinition();

...


{code}

* To find the 'Comments' of a given Entity:

...


{code

...

}
    Entity entity = ....;
    Comment[] comments= entity.getComment();
  {code}
* 

...

To find the non-classified Properties of a given Entity:

...


{code

...

}
    Entity entity = ....;
    Property[] properties = entity.getProperties();
  

...

getAncestors

Use the LexEVS HistoryService API

Obtain a the HistoryService API as follows:

Code Block
{code}

h3. getAncestors
Use the LexEVS *HistoryService* API

Obtain a the HistoryService API as follows:

{code}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

To get the ancestors of a given code, use the 'getDecendants' method:

...


{code
}
 NCIChangeEventList changeEventList = historySvc.getAncestors
(ConceptReference conceptReference);

getSubConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept.
For instance:

Code Block

{code}

h3. getSubConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.
For instance:
{code}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                                    int 
resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList 
propertyNames, 
                                                    PropertyType[] 
propertyTypes, SortOptionList sortOptions, int 
maxToReturn).getResolvedConceptReference();
{code}

Focus the 'graphFocus' on the desired Concept to see relationships from a given Concept.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getSuperConcepts

...



h3. getSuperConcepts
See above 'getSubConcepts'

...

 -- setting your resolve direction (boolean resolveForward, boolean resolveBackward) will determine if sub-concepts or super-concepts are resolved.

h3.

...

 getPropertiesByConceptCode

...


To find the Properties of a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
     
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...


{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

To view the Properties, see 'getPropertyValues' above.

...



For examples, see the following LexEVS Example classes:

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getVocabularyNames

...



h3. getVocabularyNames
Use the 'LexBIGService' API method 'getSupportedCodingSchemes' - and extract the Names (local name, registered name, etc...) as needed.

h3.

...

 getAllVocabularies

...


Use the 'LexBIGService' API method 'getSupportedCodingSchemes'.

...

getVocabularyByName

...



h3. getVocabularyByName
Use 'LexBIGService' API method 'resolveCodingScheme'.

h3.

...

 getVocabularyVersion

...


Use 'LexBIGService' API method 'resolveCodingScheme' and extract the 'representsVersion' attribute from the Resulting CodingScheme.

...

getConceptEditAction

Use the LexEVS HistoryService API

Obtain a the HistoryService API as follows:

Code Block


h3. getConceptEditAction
Use the LexEVS *HistoryService* API

Obtain a the HistoryService API as follows:

{code}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);

...


(StringcodingSchemeName);
{code}

To get the 'EditActionList' of a given code, use the 'getEditActionList' method:

...


{code
}
 NCIChangeEventList changeEventList = historySvc.getEditActionList(ConceptReference conceptReference, 
CodingSchemeVersion codingSchemeVersion);

getRootConcepts

...


{code}

h3. getRootConcepts
Use 'LexBIGServiceConvenienceMethods' API method 'getHierarchyRoots' or 'getHierarchyRootSet'

...

searchSourceByCode

...



h3. searchSourceByCode
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = ConvenienceMethods.createConceptReferenceList
(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);

searchSourceByAtomCode

...


{code}

h3. searchSourceByAtomCode
In the NCI MetaThesaurus, fidning the 'source' of an 'Atom' is equivalent to finding the 'source' of a given Property of an Entity. Each CUI (which is equivalent to an Entity in LexEVS) may contain several Presentation Properties (Atoms or AUI's of that CUI). Each of these Presentation Properties is Qualified by a 'source-code' Qualifier, which reflects the code of this Atom in its original source, and a 'source' qualifier, which states the source itself that this Atom came from.

...

getMetaConceptNameByCode

To find the Properties of a given code, for example, code 'C1234567' in the 'NCI MetaThesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI MetaThesaurus' ontology:

Code Block


h3. getMetaConceptNameByCode
To find the Properties of a given code, for example, code 'C1234567' in the 'NCI MetaThesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI MetaThesaurus' ontology:

{code}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
MetaThesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234567' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234567"}, "NCI MetaThesaurus");
  
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

To see the name of the code, use 'getEntityDescription' on the resulting ResolvedConceptReference. The 'EntityDescription' will always be equal to the Preferred Presentation in the Default Language.

h3.

...

 getMetaSources

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Association Qualifiers using the 'getSupportedSource' method.

...


{info
:title
=Note
}This can be applied to any Coding Scheme, not just the NCI MetaThesaurus
.

getChildren

...

.{info}

h3. getChildren
Use the 'CodedNodeGraph' API.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.

...

FindRelatedCodes
* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getParent

...



h3. getParent
Use the 'CodedNodeGraph' API.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getBroaderConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept. Resolve forward or backwards based on the hierarchy structure of the ontology.

For examples, see the following LexEVS Example classes:



h3. getBroaderConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept. Resolve forward or backwards based on the hierarchy structure of the ontology.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getNarrowerConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept. Resolve forward or backwards based on the hierarchy structure of the ontology.

For examples, see the following LexEVS Example classes:



h3. getNarrowerConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept. Resolve forward or backwards based on the hierarchy structure of the ontology.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getRelatedConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. getRelatedConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

containsInverseRole

...



h3. containsInverseRole
Use the *LexBIGServiceConvenienceMethods* API method 'isReverseName' method.

h3.

...

 containsRole

...


Use the *LexBIGServiceConvenienceMethods* API method 'isForwardName' method.

h3.

...

 getAllAssociationTypes

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Associations using the 'getSupportedAssociation' method.

h3.

...

 getAllConceptAssociationQualifierTypes

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Association Qualifiers using the 'getSupportedAssociationQualifier' method.

h3.

...

 getAllConceptAssociationTypes

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Associations using the 'getSupportedAssociation' method.

...

getAllConceptPropertyQualifierTypes

...



h3. getAllConceptPropertyQualifierTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Property Qualifiers using the 'getSupportedPropertyQualifier' method.

...

getAllConceptPropertyTypes

...



h3. getAllConceptPropertyTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Properties using the 'getSupportedProperty' method.

...

getAllLicenses

...



h3. getAllLicenses
Use the 'LexBIGService' API method 'resolveCodingSchemeCopyright'. To get the Copyright for every loaded ontology, do this for each one.

...

getAllPropertyTypes

...



h3. getAllPropertyTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Properties using the 'getSupportedProperty' method.

...

getAllQualifierTypes

...



h3. getAllQualifierTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Property Qualifiers using the 'getSupportedPropertyQualifier' method.

...

getAllRoleNames

...



h3. getAllRoleNames
Use the 'LexBIGService' API method 'resolveCodingScheme'.

...


Once the CodingScheme Object is obtained, use the method 'getRelations'.

...

getAllSubConceptCodes

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. getAllSubConceptCodes
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getAllSynonymTypes

...



h3. getAllSynonymTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Associations using the 'getSupportedAssociation' method.

...


{info
:title
=Note
} Different ontologies may describe their 'Synonym' relations differently.

getAllTermAssociationQualifierTypes

...

{info}

h3. getAllTermAssociationQualifierTypes
Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Association Qualifiers using the 'getSupportedAssociationQualifier' method.

h3.

...

 getAllTermPropertyQualifierTypes

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Property Qualifiers using the 'getSupportedPropertyQualifier' method.

h3.

...

 getAllTermPropertyTypes

...


Use the 'LexBIGService' API method 'getMappings'.

...


Extract for this the Supported Property using the 'getSupportedProperty' method.

...

getParentConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. getParentConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getChildConcepts

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. getChildConcepts
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

hasParents

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. hasParents
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

hasChildren

Use the CodedNodeGraph API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes:



h3. hasChildren
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

For examples, see the following LexEVS Example classes: 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getDescLogicConcept

...



h3. getDescLogicConcept
A 'DescLogicConcept' can be thought of as an 'Entity' in LexEVS. To obtain an Entity, use the *CodedNodeSet* API, restricting the query as necessary.

...



For instance, a 'DescLogicConcept' with a code of 'C1234' can be queried for by the example below. The example will return a ResolvedConceptReference and ultimately an Entity, but is functionally the same as searching for a DescLogicConcept.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, null, 1);

getHistoryRecords

...


{code}

h3. getHistoryRecords
Use the *HistoryService* API 'getBaselines' and specify the required Data range.

...



Obtain a the HistoryService API as follows:

...



{code
}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

Use the 'getBaselines' method:

...


{code
}
 SystemReleaseList systemReleaseList = historySvc.getBaselines(Date 
releasedAfter, Date releasedBefore);

getHistoryStartDate

...


{code}

h3. getHistoryStartDate
Use the *HistoryService* API method 'getEarliestBaseline';

...



Obtain a the HistoryService API as follows:

...



{code
}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

Use the 'getEarliestBaseline' method:

...


{code
}
 SystemRelease systemRelease = historySvc.getEarliestBaseline();

getHistoryEndDate

...


{code}

h3. getHistoryEndDate
Use the *HistoryService* API method 'getLatestBaseline';

...



Obtain a the HistoryService API as follows:

...



{code
}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

Use the 'getLatestBaseline' method:

...


{code
}
 SystemRelease systemRelease = historySvc.getLatestBaseline();

getCodeActionChildren

...


{code}

h3. getCodeActionChildren
Use the *HistoryService* API method 'getDescendants';

...


Obtain a the HistoryService API as follows:

...



{code
}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

Use the 'getDescendants' method:

...


{code
}
 NCIChangeEventList changeEventList = historySvc.getDescendants
(ConceptReference conceptReference);

getCodeActionParents

...

{code}

h3. getCodeActionParents
Use the *HistoryService* API method 'getAncestors';

...



Obtain a the HistoryService API as follows:

...



{code
}
 HistoryService historySvc = lexevsService.getHistoryService
(StringcodingSchemeName);
{code}

Use the 'getDescendants' method:

...


{code
}
 NCIChangeEventList changeEventList = historySvc.getAncestors
(ConceptReference conceptReference);

getAssociationCollectionbyCode

Use the CodedNodeGraph API to find the immediate relations of a Concept.
For instance:

Code Block

{code}

h3. getAssociationCollectionbyCode
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.
For instance:
{code}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                                    int 
resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList 
propertyNames, 
                                                    PropertyType[] 
propertyTypes, SortOptionList sortOptions, int 
maxToReturn).getResolvedConceptReference();
{code}

Focus the 'graphFocus' on the desired Concept to see relationships from a given Concept.

...



Once focused and resolved, use the 'getSourceOf' or 'getTargetOf' methods on the ResolvedConceptReference to find the Associations of a given Code.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getSemanticTypeCollectionbyCui

...



h3. getSemanticTypeCollectionbyCui
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



Note that a CUI is simply a reference to a Code in the NCI MetaThesaurus ontology.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, null, 1);
{code}

Once the ResolvedConceptReference has been obtained, extract the desired Properties and inspect the Qualifiers for the Semantic Type.

...

getQualifierCollectionbyName

...



h3. getQualifierCollectionbyName
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



Note that a CUI is simply a reference to a Code in the NCI MetaThesaurus ontology.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

Once the ResolvedConceptReference has been obtained, extract the desired Properties and inspect the Qualifiers.

...



{info
:title
=Note
}Associations between codes may also have Qualifiers
.

getAtomCollectionbyCui

...

.{info}

h3. getAtomCollectionbyCui
In LexEVS, a NCI MetaThesaurus CUI is represented by an Entity (with the CUI being the code for that Entity).

...


Atoms of that CUI are represented by 'Presentation'(s) of the Entity.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getSynonymCollectionbyCui

...



h3. getSynonymCollectionbyCui
Use 'CodedNodeGraph' API - restricting to Synonym Associations. Note: Each ontology may describe their Synonym Associations differently.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getSourceCollectionbyCui

...



h3. getSourceCollectionbyCui
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



Note that a CUI is simply a reference to a Code in the NCI MetaThesaurus ontology.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

Once the ResolvedConceptReference has been obtained, extract the desired Properties and inspect Source using 'getSource'.

...

getSemanticTypeCollectionbyCui

...



h3. getSemanticTypeCollectionbyCui
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



Note that a CUI is simply a reference to a Code in the NCI MetaThesaurus ontology.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

Once the ResolvedConceptReference has been obtained, extract the desired Properties and inspect the Semantic Types. Semantic Types are held as Qualifiers to the Properties of an Entity.

h3.

...

 getSourcebyDefinition

...


Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



To find a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts("NCI 
Thesaurus", null);
;
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to 
search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = 
ConvenienceMethods.createConceptReferenceList(new String[] 
{ "C1234"}, "NCI Thesaurus");
   
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

Once the ResolvedConceptReference has been obtained, using 'getDefinition', extract the Definition Collection from the Entity. Then extract the source using 'getSource'

...

getDefinitionCollectionbyCui

...



h3. getDefinitionCollectionbyCui
Use 'CodedNodeSet' API - adding a 'restrictToCodes' restriction.

...



To find the a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts
("NCI Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = ConvenienceMethods.createConceptReferenceList
(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

Once the ResolvedConceptReference has been obtained, use the 'getReferencedEntry' method to obtain the actual Entity. Using the 'getDefinition', extract the Definition Collection from the Entity.

h3.

...

 getPropertyCollectionbyName

...


To find the Properties of a given code, for example, a code with a name of 'Heart' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

...



{code
}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts
("NCI Thesaurus", null);
{code}

Next, restrict that to the desired Code Name ('Heart' in this example):

...


{info
:title
=Note
} To match the String 'Heart' exactly, use the search algorithm 'exactMatch'.
Code Block
{info}

{code}
 //Next, restrice the CodedNodeSet.
   cns = cns.restrictToMatchingDesignations("Heart", null, "exactMatch", null);
{code}

Lastly, resolve the match.

...


{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, null, 1);
{code}

To view the Properties, see 'getPropertyValues' above.

...



For examples, see the following LexEVS Example classes:

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getPropertyCollectionbyCode

To find the Properties of a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

Code Block


h3. getPropertyCollectionbyCode
To find the Properties of a given code, for example, code 'C1234' in the 'NCI Thesaurus' ontology - first obtain a 'CodedNodeSet' from the 'NCI Thesaurus' ontology:

{code}
 ResolvedConceptReferenceList cns = lbSvc.getCodingSchemeConcepts
("NCI Thesaurus", null);
{code}

Next, restrict that to the desired Code ('C1234' in this example):

...



{code
}
 //First create a ConceptReferenceList to describe the Concept to search for. 
 //In this example we use the helper class 'ConvenienceMethods'.
 ConceptReferenceList crefs = ConvenienceMethods.createConceptReferenceList
(new String[] 
{ "C1234"}, "NCI Thesaurus");
    
 //Next, restrice the CodedNodeSet.
 cns.restrictToCodes(crefs);
{code}

Lastly, resolve the match.

...



{code
}
 ResolvedConceptReferenceList matches = cns.resolveToList(null, null, 
null, 1);
{code}

To view the Properties, see 'getPropertyValues' above.

...



For examples, see the LexEVS Example classes

...

 
* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

fetchPropertyCollectionByCodes

...



h3. fetchPropertyCollectionByCodes
See 'getPropertyCollectionbyCode;

...

getRoleCollectionbyCode

Use the CodedNodeGraph API to find the immediate relations of a Concept.

...



h3. getRoleCollectionbyCode
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

If a desired Relations Collection is requested (for example, 'roles'), the 'relationContainerName' may be restricted.

...


For instance:

...


{code
}
 //Restrict the 'relationContainerName' to the desired container. NOTE: These containers are
 //ontology specific--each ontology defines its own relation container names.
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                           int resolveCodedEntryDepth, int 
resolveAssociationDepth, LocalNameList propertyNames, 
                                          PropertyType[] propertyTypes, 
SortOptionList sortOptions, int maxToReturn).getResolvedConceptReference();
{code}

Focus the 'graphFocus' on the desired Concept to see relationships from a given Concept.

...



Once focused and resolved, use the 'getSourceOf' or 'getTargetOf' methods on the ResolvedConceptReference to find the Associations of a given Code.

...



For examples, see the LexEVS Example classes

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getInverseRoleCollectionbyCode

Use the CodedNodeGraph API to find the immediate relations of a Concept.

To find the Inverse Roles, restricting the Relations Container may be necessary (see getRoleCollectionbyCode above).
Depending on how the onotology defines an 'inverse' role or association, these can be restricted as well.

For instance:

Code Block


h3. getInverseRoleCollectionbyCode
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

To find the Inverse Roles, restricting the Relations Container may be necessary (see getRoleCollectionbyCode above).
Depending on how the onotology defines an 'inverse' role or association, these can be restricted as well.

For instance:
{code}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                         int resolveCodedEntryDepth, int 
resolveAssociationDepth, LocalNameList propertyNames, 
                                         PropertyType[] propertyTypes, 
SortOptionList sortOptions, int maxToReturn).getResolvedConceptReference();
{code}

Focus the 'graphFocus' on the desired Concept to see relationships from a given Concept.

...



Once focused and resolved, use the 'getSourceOf' or 'getTargetOf' methods on the ResolvedConceptReference to find the Associations of a given Code.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getInverseAssociationCollectionbyCode

Use the CodedNodeGraph API to find the immediate relations of a Concept.

To find the Inverse Collections, restricting the Relations Container may be necessary (see getInverseRoleCollectionbyCode above).
Depending on how the onotology defines an 'inverse' role or association, these can be restricted as well.

For instance:

Code Block


h3. getInverseAssociationCollectionbyCode
Use the *CodedNodeGraph* API to find the immediate relations of a Concept.

To find the Inverse Collections, restricting the Relations Container may be necessary (see getInverseRoleCollectionbyCode above).
Depending on how the onotology defines an 'inverse' role or association, these can be restricted as well.

For instance:
{code}
 CodedNodeGraph cng = lexevsService.getNodeGraph(String codingScheme, 
CodingSchemeVersionOrTag versionOrTag, String relationContainerName);
 ResolvedConceptReference[] rcr = cng.resolveAsList(ConceptReference 
graphFocus, boolean resolveForward, boolean resolveBackward, 
                                       int resolveCodedEntryDepth, int 
resolveAssociationDepth, LocalNameList propertyNames, 
                                       PropertyType[] propertyTypes, 
SortOptionList sortOptions, int maxToReturn).getResolvedConceptReference();
{code}

Focus the 'graphFocus' on the desired Concept to see relationships from a given Concept.

...



Once focused and resolved, use the 'getSourceOf' or 'getTargetOf' methods on the ResolvedConceptReference to find the Associations of a given Code.

...



For examples, see the following LexEVS Example classes:

...

 
* org.LexGrid.LexBIG.example.FindRelatedCodes

...


* org.LexGrid.LexBIG.example.FindPropsAndAssocForCode

...

getHasParentsbyCode



h3. getHasParentsbyCode
Either:

...


* Use the 'LexBIGServiceConvenienceMethods' API method 'getHierarchyLevelPrev'

...


* Use the CodedNodeGraph API to resolve the immediate Associations of a given code, and check if they exist.

h3.

...

 getHasChildrenbyCode

...


Either:

...


* Use the 'LexBIGServiceConvenienceMethods' API method 'getHierarchyLevelNext'

...


* Use the CodedNodeGraph API to resolve the immediate Associations of a given code, and check if they exist.

...

getIsRetiredbyCode

...



h3. getIsRetiredbyCode
Use the 'LexBIGServiceConvenienceMethods' API method 'isCodeRetired'

...

getLocalNames

...



h3. getLocalNames
Use the 'LexBIGService' API method 'getSupportedCodingSchemes' - and extract the Names (local name, registered name, etc...) as needed.

...




{scrollbar:icons=false}