<?xml version="1.0" encoding="utf-8"?>
<html>
Template:Menu LexEVS 6.0 Main
LexEVS 6.0 functionality has been updated to provide many new features for terminology services. You can see on the main LexEVS 6.0 page an outline of this functionality. Changes were necessary to the existing LexEVS API and have been documented in the sections below. For help with the new APIs please see the LexEVS 6.0 Programmer's Guide. Before you go read about each change, the "What To Look For" section proposes a methodology that will help you find changes required in your code.
In the following sections you will find documentation on what may need to be changed in your code while moving from LexEVS 5 to LexEVS 6. Before you go to each section you can search your code for these strings (without the surrounding quotes). If you get a hit or hits then you will need to make some changes in that area of the code. Follow the link for the string that you got a hit on in order to determine what to do in each case. This list may not catch everything, but it is a great place to start.
"Iterators" changes according to the context of the Iterator
"new Concept" replaced by a "new Entity"
After "new Entity" now use new addEntityType() method to set the specific Entity type
"new Association" replaced by new AssociationEntity and new AssociationPredicate
"ValueDomain" renamed to "ValueSet". This affects package names, class names, method names, method's input/output type/names.
"LexEVSValueDomainServices" renamed to LexEVSValueSetServices
Method "resolveValueDomain" in LexEVSValueDomainServices, renamed to resolveValueSetDefinition and the method's arguments have changed
"LexEVSPickListServices" renamed to LexEVSPickListDefinitionServices
Method "resolvePickList" in LexEVSPickListDefinitionServices, arguments have changed
For example Iterator<ResolvedConceptReference>
Iterator<ResolvedConceptReference> |
may need to be replaced by
Iterator<? extends ResolvedConceptReference> |
In 5.0, for example, a concept can be defined as follows:
Concept concept = new Concept(); concept.setEntityCode("code"); concept.setEntityCodeNamespace("namespace"); concept.setIsDefined(true); concept.setIsAnonymous(false); concept.setIsActive(true); |
In 6.0, a concept entity is defined as follows:
Entity concept = new Entity(); concept.addEntityType(EntityTypes.CONCEPT.toString()); concept.setEntityCode("code"); concept.setEntityCodeNamespace("namespace"); concept.setIsDefined(true); concept.setIsAnonymous(false); concept.setIsActive(true); |
You may notice that we use the addEntityType method to specify the entity type of Concept. We use the same method for Instance. In 6.0 we define Instance as follows:
Entity instance = new Entity(); instance.addEntityType(EntityTypes.INSTANCE.toString()); instance.setEntityCode("code"); instance.setEntityCodeNamespace("namespace"); |
Association association = new Association(); association.setAssociationName("name"); association.addSource(source); association.setForwardName("forwardName"); association.setIsNavigable(true); |
In 6.0 it is replaced by
AssociationPredicate associationPredicate = new AssociationPredicate(); associationPredicate.setAssociationName("name"); associationPredicate.addSource(source); AssociationEntity associationEntity = new AssociationEntity(); associationEntity.setEntityCode("name"); associationEntity.setForwardName("forwardName"); associationEntity.setIsNavigable(true); |
public ResolvedValueDomainDefinition resolveValueDomain(URI valueDomainURI, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException; |
public ResolvedValueSetDefinition resolveValueSetDefinition(URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag, SortOptionList sortOptionList) throws LBException; |
AbsoluteCodingSchemeVersionReferenceList acsvList = null; Util.displayMessage("Now select Code System to use to resolve Value Set Definition"); CodingSchemeSummary css = Util.promptForCodeSystem(); if (css != null) { acsvList = new AbsoluteCodingSchemeVersionReferenceList(); acsvList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(css.getCodingSchemeURI(), css.getRepresentsVersion())); } LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance(); ResolvedValueSetDefinition rVSD = null; try { rVSD = vsdServ.resolveValueSetDefinition(new URI("myUri"), null, acsvList, null, null); } catch (URISyntaxException e) { e.printStackTrace(); } |
A new resolve value set definition method is provided. It accepts a ValueSetDefinition object instead of a URI.
public ResolvedValueSetDefinition resolveValueSetDefinition(ValueSetDefinition vsDef, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag, SortOptionList sortOptionList) throws LBException; |
public ResolvedPickListEntryList resolvePickList(String pickListId, Integer sortType) throws LBException; |
public ResolvedPickListEntryList resolvePickList(String pickListId, boolean sortByText) throws LBException; |
public ResolvedPickListEntryList resolvePickList(String pickListId, Integer sortType, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException; |
public ResolvedPickListEntryList resolvePickList(String pickListId, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException; |
An example using integer to indicate the sort type is shown as follows:
AbsoluteCodingSchemeVersionReferenceList incsvrl = new AbsoluteCodingSchemeVersionReferenceList(); incsvrl.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("urn:oid:11.11.0.1", "1.1")); ResolvedPickListEntryList pls = _pickListService.resolvePickList("SRITEST:FA:MicrobialStructureOntologyMinusMCell", 1, incsvrl, "production"); |
public ResolvedPickListEntryList resolvePickList(PickListDefinition pickList, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException; |
public ResolvedPickListEntryList resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String[] context, boolean sortByText,A bsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException; |
ResolvedPickListEntryList pickLists = getPickListService().resolvePickListForTerm("SRITEST:AUTO:AllDomesticButGM", "Jaguar", MatchAlgorithms.exactMatch.name(), "english", null, false, null, null); |
public PickListDefinition resolvePickListByRevision(String pickListId, String revisionId, Integer sortOrder) throws LBRevisionException; |
</html>