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

Section
Column
width75%
Panel
titleContents of this Page
Table of Contents
minLevel2
Column
Align
alignright
Include Page
Menu LexEVS 6.0 CTS2 to Include
Menu LexEVS 6.0 CTS2 to Include

...

Description:

Loads Associations supplied with in Code System Object.

Input:

  • org.LexGrid.codingSchemes.CodingScheme codeSystem - (Mandatory) Code System Object that contains Associations to be loaded into the terminology service.
  • java.net.URI metadata - (Optional) URI of the XML file containing custom meta data of code system that contains this associations. Loads additional data to be maintained and queried as terminology meta-information within the system. All tags and values are interpreted as simple text-based key/value pairs.
  • boolean stopOnErrors - (Optional) default is false. True means stop if any load error is detected. False means attempt to load what can be loaded if recoverable errors are encountered.
  • boolean async - (Optional) Flag controlling whether load occurs in the calling thread.
    If true, the load will occur in a separate asynchronous process.
    If false, this method blocks until the load operation completes or fails. Regardless of setting, the getStatus and getLog calls are used to fetch results.
  • *boolean overwriteMetadata - (Optional) If true, existing meta data for the code system will be erased. If false, new meta data will be appended to existing meta data.
  • java.lang.String versionTag - (Optional) The tag (e.g "devel", "production", ...) to be set for the code system that contains this associations.
  • boolean activate - (Optional) True: activates the code system that contains this associations after the load.

Output:

None

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate AssociationLoadOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.admin.load.AssociationLoadOperation assnLoadOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAdminOperation().getAssociationLoadOperation(); 
    
  • Step 2: Populate Code System Object:
    Code Block
    org.LexGrid.codingSchemes.CodingScheme cs = new org.LexGrid.codingSchemes.CodingScheme();
    cs.setApproxNumConcepts(new Long(4));
    cs.setCodingSchemeName("miniautomobiles");
    cs.setFormalName("miniautomobiles");
    cs.setCodingSchemeURI("11.22.33.44");
    org.LexGrid.commonTypes.Text copyright = new org.LexGrid.commonTypes.Text();
    copyright.setContent("Copyright Mayo Clinic.");
    cs.setCopyright(copyright);
    cs.setDefaultLanguage("en");
    cs.setMappings(new org.LexGrid.naming.Mappings());
    cs.setRepresentsVersion("1.1");
    
    org.LexGrid.naming.SupportedAssociation saHasSubType = edu.mayo.informatics.lexgrid.convert.exporters.xml.lgxml.factory.SupportedAssociationFactory.createSupportedAssociationHasSubType();
    
    cs.getMappings().addSupportedAssociation(saHasSubType);
    org.LexGrid.naming.SupportedAssociation saUses = edu.mayo.informatics.lexgrid.convert.exporters.xml.lgxml.factory.SupportedAssociationFactory.createSupportedAssociationUses();
    cs.getMappings().addSupportedAssociation(saUses);
            
    org.LexGrid.relations.Relations rels = new org.LexGrid.relations.Relations();
    rels.setContainerName("asD");
            
    org.LexGrid.relations.AssociationPredicate ap = new org.LexGrid.relations.AssociationPredicate();
    ap.setAssociationName("hasSubtype");
    rels.addAssociationPredicate(ap);
    
    ap = new org.LexGrid.relations.AssociationPredicate();
    
    ap.setAssociationName("uses");
            
    rels.addAssociationPredicate(ap);
            
    cs.addRelations(rels);
    
  • Step 3: Call load method by passing the Code System Object and other parameter values:
    Code Block
    assnLoad.importAssociationVersion(cs, null, true, false, true, "DEV", true);
    

...


Scrollbar
iconsfalse