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:

Updates Association Status

Input:

  • org.LexGrid.versions.Revision revision - create a mapping coding scheme if one does not exist
  • org.LexGrid.versions.EntryState entryState - revision data container granular to the versionable class.
  • org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference scheme - Scheme targeted for update.
  • java.lang.String relationsContainerName - relations container identifier
  • java.lang.String associationName - association identifier
  • java.lang.String sourcCode - source concept code
  • java.lang.String sourceNamespace - code system identification
  • java.lang.String targetCode - target concept code
  • java.lang.String targetNamespace - minimum code system identification
  • java.lang.String instanceId - instance identifier for the association
  • java.lang.String status - Status designation can be user defined
  • boolean isActive - flag for Active status

Output:

boolean - flag for successful update

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Create Revision Elements:
    Code Block
    Revision revision = new Revision(); - initalize Revision object
    revision.setChangeAgent("Mayo Foundation"); - Set the change agent if desired
    Text changeInstructions = new Text(); - initialize Text Object
    changeInstructions.setContent("To be applied at next source release"); - Define change instructions if desired.
    revision.setChangeInstructions(changeInstructions); - Set change instructions
    revision.setEditOrder(new Long(1)); - Set edit order
    EntityDescription entityDescription = new EntityDescription(); - Initialize EntityDescription Object
    entityDescription.setContent("TestCTS2AssociationRevision"); - Set content for this object
    revision.setEntityDescription(entityDescription); - Set revision entityDescription
    
    EntryState entryState = new EntryState(); - Initialize EntryStateObject
    entryState.setChangeType(ChangeType.MODIFY); - Association is being revised.  Set ChangeType to "MODIFY"
    entryState.setContainingRevision("FirstRevision_12_09_2010"); - Define the revision identifier 
    entryState.setRelativeOrder(new Long(1)); - Set relative order
  • Step 2: Define the scheme for the association update:
    Code Block
    AbsoluteCodingSchemeVersionReference scheme = new AbsoluteCodingSchemeVersionReference();
    scheme.setCodingSchemeURN("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#");
    scheme.setCodingSchemeVersion(10.10a);
  • Step 3: Name the unique identifier of the source concept:
    Code Block
    String sourceCode = "C27469";
  • Step 4: Define the namespace of the source concept supported for this coding scheme
    Code Block
    String sourceNamespace = "NCI Thesaurus"
  • Step 5: Name the unique identifier of the target concept:
    Code Block
    String targetCode = "C27469";
  • Step 6: Identify or name a new relations container
    Code Block
    String relationsContainerName = "relations";
  • Step 7: Define the association
    Code Block
    String associationName = "Disease_Has_Abnormal_Cell";
  • Step 8: Identify the instance of this association to be updated.
    Code Block
    String instanceID = "instance001";
  • Step 9: Define the new status
    Code Block
    String status = "PENDING_RETIREMENT";
  • Step 10: Set isActive flag if necessary
    Code Block
    boolean isActive = false;
  • Step 11: call create method to create the association:
    AssociationSource association = associationAuthoringOp.updateAssociationStatus(revision, entryState,

    scheme, relationsContainerName, associationName, sourceCode,
    namespace, targetCode, namespace, instanceId, status,
    isActive);

...

Scrollbar
iconsfalse