NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description:

Exports contents of Value Set as Code System in LexGrid canonical XML format.

Input:

  • java.net.URI valueSetDefinitionURI - (Mandatory) URI of the Value Set Definition to export.
  • java.lang.String valueSetDefinitionVersion - (Optional) Version of the Value Set Definition to be exported.
  • java.net.URI exportDestination - (Mandatory) Location (path to the folder withOUT the file name) to save the definition.
    org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList csVersionList - (Optional) A list of code system URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
  • java.lang.String csVersionTag - (Optional) The tag (e.g "devel", "production", ...) to be used to reconcile code system when more than one is present.
    boolean overwrite - (Optional) True means, any existing file will be overwritten.
    boolean failOnAllErrors - (Optional) True means stop if any export error is detected. False means attempt to export what can be exported if recoverable errors are encountered.

Output:

java.net.URI - URI of destination if successfully exported.

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate ValueSetExportOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.admin.export.ValueSetExportOperation vsExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getValueSetExportOperation();
    
  • Step 2: Populate the Code System Version Reference List to be used to resolve the Value Set Definition:
    Code Block
    AbsoluteCodingSchemeVersionReferenceList csVerList = new AbsoluteCodingSchemeVersionReferenceList();
    csVerList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("urn:oid:11.11.0.1", "1.0"));
    
  • Step 3: Call export method by passing URI of Value Set Definition, output destination and other parameter values:
    Code Block
    ''vsExport.exportValueSetDefinition(exportValueSetContents(new URI("SRITEST:AUTO:PropertyRefTest1-VSDONLY"), null, new File("c:\\TestVSDExport.xml").toURI(), csVerList, null, true, true);
    

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:

Code Block
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.

...

Description:

Export Association(s) in LexGrid canonical XML format.

Input:

  • java.lang.String codeSystemNameOrURI - (Mandatory) Name or URI of the Code System that contains the association.
  • java.lang.String codeSystemVersion - (Mandatory) Version of the Code System that contains the association.
  • org.LexGrid.LexBIG.LexBIGService.CodedNodeGraph cng - (Mandatory) Coded Node Graph(CNG) that contains all the filters. This CNG will be resolved and exported.
  • java.net.URI exportDestination - (Mandatory) Directory location (with out file name). The name of the file will be constructed based on the Code System Name/URI and the Version.
  • boolean overwrite - (Optional) True means, any existing file will be overwritten.
  • boolean stopOnErrors - (Optional) True means stop if any export error is detected. False means attempt to export what can be exported if recoverable errors are encountered.
  • boolean async - (Optional) Flag controlling whether export occurs in the calling thread.
    If true, the export will occur in a separate asynchronous process.
    If false, this method blocks until the export operation completes or fails. Regardless of setting, the getStatus and getLog calls are used to fetch results.

Output:

None

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate AssociationExportOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.admin.export.AssociationExportOperation assnExportOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getAssociationExportOperation();
    
  • Step 2: Populate the Coded Node Graph (CNG) and apply filters:
    Code Block
    org.LexGrid.LexBIG.LexBIGService.CodedNodeGraph cng = LexBIGServiceImpl.defaultInstance().getNodeGraph("urn:oid:cts:1.1.1",  "1.0", null);_
    org.LexGrid.LexBIG.DataModel.Core.NameAndValue nv = new org.LexGrid.LexBIG.DataModel.Core.NameAndValue();_
    nv.setName("hasSubtype");_
    org.LexGrid.LexBIG.DataModel.Collections.NameAndValueList assocNames = new org.LexGrid.LexBIG.DataModel.Collections.NameAndValueList();_
    assocNames.addNameAndValue(nv);_
    cng.restrictToAssociations(assocNames, null);_
    
  • Step 3: Call export method by passing Code System Information, Coded Node Graph, destination path and other parameter values:
    Code Block
    ''assnExport.exportAssociation("urn:oid:cts:1.1.1",  "1.0", cng, new File("c:\\exportedFiles\\").toURI(), true, true, true);
    

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.

...