NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

Please be advised that NCI Wiki will be will be undergoing maintenance on Monday, June 24th between 1000 ET and 1100 ET.
Wiki will remain available, but users may experience screen refreshes or HTTP 502 errors during the maintenance period. If you encounter these errors, wait 1-2 minutes, then refresh your page.

If you have any questions or concerns, please contact the CBIIT Atlassian Management Team.

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

Contents of this Page

 

 

 

LexEVS Authoring Service Management Methods

Currently restricted to the support of Mapping Authoring only.

Updating an Existing Entity

    private VersionableEventEntityService service;
	private AuthoringService authoringService;


	CodingScheme scheme = new CodingScheme();
    scheme.setApproxNumConcepts(111l);
    scheme.setCodingSchemeName("testName");
    scheme.setCodingSchemeURI("uri");
    scheme.setRepresentsVersion("v1");
        
    authoringService.loadRevision(scheme, null, null);
        
    CodingScheme cs = codingSchemeservice.getCodingSchemeByUriAndVersion("uri", "v1");
    System.out.println(cs);
     
    // Create a new entity   
    Entity entity = new Entity();
    entity.setEntityCode("c1");
    entity.setEntityCodeNamespace("ns");
    entity.setIsDefined(false);
       
    EntryState entryState = new EntryState();
    entryState.setChangeType(ChangeType.MODIFY);
    entity.setEntryState(entryState);
        
    EntityDescription ed = new EntityDescription();
    ed.setContent("pre-update");
    entity.setEntityDescription(ed);
      
    // Insert the new entity
    service.insertEntity("uri", "v1", entity);
       
    // Update the entity description
    entity.getEntityDescription().setContent("post-update");
      
    try {
		// Update the entity
        service.updateEntity("uri", "v1", entity);
    } catch (Exception e) {
     
    }

    Entity modifiedEntity = service.getEntity("uri", "v1", "c1", "ns");

Insert Entity

    private VersionableEventEntityService service;
	private AuthoringService authoringService;
 
    CodingScheme scheme = new CodingScheme();
    scheme.setApproxNumConcepts(111l);
    scheme.setCodingSchemeName("testName");
    scheme.setCodingSchemeURI("uri");
    scheme.setRepresentsVersion("v1");
        
    authoringService.loadRevision(scheme, null, null);
        
    CodingScheme cs = codingSchemeservice.getCodingSchemeByUriAndVersion("uri", "v1");
    System.out.println(cs);
        
    Entity entity = new Entity();
    entity.setEntityCode("c1");
    entity.setEntityCodeNamespace("ns");
        
    service.insertEntity("uri", "v1", entity);

 

  • No labels