CTS2 Links for LexEVS 6.0 |
---|
Introduction
LexEVS CTS2 Export API provides capability to export complete or partial contents of Code System, Value Sets and Association.
Export Interfaces
There are three major export interfaces proved:
- Code System exporter - Provides capability to export complete or partial contents of Code System.
- Value Sets exporter - Provides capability to export Value Set Definition or Value Set Resolution (Expanded Value Set).
- Association exporter - Provides capability to export Associations.
Each of these interfaces can be accessed using:
org.lexevs.cts2.admin.export.CodeSystemExportOperation csExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getCodeSystemExportOperation(); org.lexevs.cts2.admin.export.ValueSetExportOperation vsExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getValueSetExportOperation(); org.lexevs.cts2.admin.export.AssociationExportOperation assnExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getAssociationExportOperation();
Code System Exporter
org.lexevs.cts2.admin.export.CodeSystemExportOperation
is the main interface which can be used to export complete or partial Code System contents. This interface can be accessed using main LexEVSCTS2 interface, like:
org.lexevs.cts2.admin.export.CodeSystemExportOperation csExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getCodeSystemExportOperation();
There are three different methods available to export Code System:
- Export complete Code System - This method provides capability to export Code System contents using the exporter specified.
- Export Coded Node Set - This method provides capability to export entities that matches certain restrictions (like matching designation, concept code, property etc).
- Export Coded Node Graph - This method provides capability to export entities that are part of selected graph (like association, source code, target code etc).
Export Complete Code System
This function exports contents of the code system using the exporter specified. By default, LexEVS comes with following exporters:
- LexGrid Exporter - exports contents in LexGrid XML format
- OBO Exporter - exports contents in OBO format
- OWL Exporter - exports contents in OWL/RDF format
exportCodeSystemContent(String codeSystemNameOrURI, String codeSystemVersion, URI exportDestination, Exporter exporter)
Description: |
Exports contents of the code system using the exporter specified. |
---|---|
Input: |
|
Output: |
java.net.URI - URI of destination if successfully exported |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Export Coded Node Set
This function resolves the given CodedNodeSet(CNS) and exports the contents in LexGrid XML format. There is a helper method getCodeSystemCodedNodeSet(String codeSystemNameOrURI, String codeSystemVersion) that could be used to get the Coded Node Set object for given Code System Version, and could apply further restrictions (ex: matchingDesignation, Status, Properties, Codes etc). And this Coded Node Set object could be supplied to this export method which resolves it and exports the contents in LexGrid XML format.
exportCodedNodeSet(String codeSystemNameOrURI, String codeSystemVersion, CodedNodeSet cns, URI exportDestination, boolean overwrite, boolean stopOnErrors, boolean async)
Description: |
Resolves the given CodedNodeSet(CNS) and exports the contents. |
---|---|
Input: |
|
Output: |
java.net.URI - URI of destination if successfully exported |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Export Coded Node Graph
This function resolves the given CodedNodeGraph(CNG) and exports the contents in LexGrid XML format. There is a helper method getCodeSystemCodedNodeGraph(String codeSystemNameOrURI, String codeSystemVersion) that could be used to get the Coded Node Graph object for given Code System Version, and could apply further restrictions (ex: associations, SourceCodes, TargetCodes, etc). And this Coded Node Graph object could be supplied to this export method which resolves it and exports the contents in LexGrid XML format.
exportCodedNodeGraph(String codeSystemNameOrURI, String codeSystemVersion, CodedNodeGraph cng, URI exportDestination, boolean overwrite, boolean stopOnErrors, boolean async)
Description: |
Resolves the given CodedNodeGraph(CNG) and exports the contents. |
---|---|
Input: |
|
Output: |
java.net.URI - URI of destination if successfully exported |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Value Set Exporter
org.lexevs.cts2.admin.export.ValueSetExportOperation is the main interface which can be used to export Value Set Definition or Value Set Resolution (Expanded Value Set). This interface can be accessed using main LexEVSCTS2 interface, like:
org.lexevs.cts2.admin.export.ValueSetExportOperation vsExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getValueSetExportOperation();
There are three different methods available to export Value Set:
- Export Value Set Definition - This method provides capability to export Value Set Definition in LexGrid XML format. This will be helpful if there is a need to import this exported Value Set Definition in different instance of LexEVS.
- Export Expanded Value Set using custom exporter - This method provides capability to export contents of Value Set using custom exporter. This will be helpful, if you want the contents exported in format other than LexGrid XML.
- Export Expanded Value Set in LexGrid XML format - This method provides capability to export contents of Value Set using default LexGrid Exporter which exports in LexGrid XML format.
Export Value Set Definition
This method provides capability to export Value Set Definition in LexGrid XML format. This will be helpful if there is a need to import this exported Value Set Definition in different instance of LexEVS.
exportValueSetDefinition(URI valueSetDefinitionURI, String valueSetDefinitionVersion, String xmlFullPathName, boolean overwrite, boolean failOnAllErrors)
Description: |
Export Value Set Definition to LexGrid canonical XML format. |
---|---|
Input: |
|
Output: |
None |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Export Expanded Value Set Using Custom Exporter
This method provides capability to export contents of Value Set using custom exporter. This will be helpful when there is a requirement to export value set contents in format other than LexGrid XML. There is a helper method getSupportedExporterNames() that could be used to get all the exporters loaded and supported by current LexEVS instance. So, if you have your custom exporter deployed as an extension to LexEVS Exporter, it will be in the list of exporters returned by method getSupportedExporterNames().
exportValueSetContents(URI valueSetDefinitionURI, String valueSetDefinitionVersion, URI exportDestination, String exporter)
Description: |
Exports contents of the Value Set Definition using the exporter specified. |
---|---|
Input: |
|
Output: |
java.net.URI - URI of destination if successfully exported |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Export Expanded Value Set in LexGrid XML Format
This method provides capability to export contents of Value Set as a Code System using LexGrid Exporter which exports in LexGrid XML format.
exportValueSetContents(URI valueSetDefinitionURI, String valueSetDefinitionVersion, URI exportDestination, AbsoluteCodingSchemeVersionReferenceList csVersionList, String csVersionTag, boolean overwrite, boolean failOnAllErrors)
Description: |
Exports contents of Value Set as Code System in LexGrid canonical XML format. |
---|---|
Input: |
|
Output: |
java.net.URI - URI of destination if successfully exported. |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Association Exporter - Export Association
org.lexevs.cts2.admin.export.AssociationExportOperation
is the main interface which can be used to export Association(s). This interface can be accessed using main LexEVSCTS2 interface, like:
org.lexevs.cts2.admin.export.AssociationExportOperation assnExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getAssociationExportOperation();
Method exportAssociation provides capability to apply filters and export association(s) in LexGrid XML format.
exportAssociation(String codeSystemNameOrURI, String codeSystemVersion, CodedNodeGraph cng, URI exportDestination, boolean overwrite, boolean stopOnErrors, boolean async)
Description: |
Export Association(s) in LexGrid canonical XML format. |
---|---|
Input: |
|
Output: |
None |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Exporter Mappings - OwlRdf Exporter Mapping
OwlRdf exporter is based on Jena 2.6.3. It use SDB to build up triple store. The triple store tables are under the same database of LexEvs. LexEvs retrieval api does not support to fetch AssociatedData. It cannot retrieve the association that is from an entity
to a data/value. The owl/rdf exporter, based on LexEVS has the limiation of handling the owl:hasValue, owl:maxCardinality, owl:minCardinality, owl:cardinality constraints as well.
LexGrid |
Owl/Rdf |
Comment |
---|---|---|
CodingScheme |
|
|
codingScheme |
owl:Ontology |
|
codingScheme.source |
dc:source |
a property of owl:ontology |
codingScheme.copyright |
dc:right |
a property of owl:ontology |
codingScheme.Name |
rdfs:label |
a property of owl:ontology |
codingScheme.URI |
xmlns |
a property of owl:ontology |
codingScheme.representVersion |
owl:versionInfo |
a property of owl:ontology |
codingScheme.formalName |
dc:title |
a property of owl:ontology |
codingScheme.defaultLanguage |
dc:language |
a property of owl:ontology |
codingScheme.approxNumConcpts |
not mapped |
|
Entity |
|
|
entity |
skos:Concept |
|
concept |
owl:Class |
|
instance entity |
owl:Thing |
|
associationEntity |
owl:property |
owl:objectProperty or owl:datatypeProperty |
entityCode |
rdf:ID |
local name |
entityCodeNamespace |
xmlns |
|
isDefined |
LexRDF:isDefined |
LexRDF is a namespace generated by Mayo |
Property |
|
Use reification statement for the property's property |
property |
owl:AnnotationProperty when no type specified |
|
language |
dc:language |
|
source |
dc:source |
|
comment |
skos:note |
|
presentation |
skos:altLabel, skos:prefLabel |
According to lg isPrefered |
definition |
skos:definition |
|
isPreferred |
LexRDF:isPreferred |
|
degreeOfFidelity |
LexRDF:degreeOfFidelity |
|
matchIfNoContext |
LexRDF:matchIfNoContext |
|
representationForm |
LexRDF:presentationForm |
|
propertyLink |
LexRDF:propertyLink |
|
Association |
|
|
associationPredicate.associationName |
rdf:id |
|
associationEntity |
owl:property |
owl:objectProperty or owl:datatypeProperty |
associationEntity.forwardName |
rdf:id |
if not null |
associationEntity.isTransitive |
owl:TransitiveProperty |
|