NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

Client configuration is represented in a client project in github:  https://github.com/lexevs/LexEVS_Distributed_Client

 

Using the distributed LexEVS API

...

Code Block
themeEclipse
languagexml
  <dependencies>

  <dependency>

  	<groupId>lexevs.dist.client</groupId>

	<artifactId>lexevs.dist.client</artifactId>

	<version>0.0.1-SNAPSHOT</version>

  </dependency>

  </dependencies>

...

 

Users should be able to access a remote service with code similar to the following (Service URL should be adjusted to a valid LexEVS API service such as the one hosted at NCI):

 

Code Block
themeEclipse
languagejava
package org.lexgrid.lexevs.remote.client;

import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList;
import org.LexGrid.LexBIG.DataModel.InterfaceElements.CodingSchemeRendering;
import org.LexGrid.LexBIG.Exceptions.LBInvocationException;
import org.LexGrid.LexBIG.caCore.interfaces.LexEVSDistributed;

import gov.nih.nci.system.client.ApplicationServiceProvider;

public class MavenBasedPrototype {

	LexEVSDistributed lbs = null;
	private static String serviceUrl = "https://localhost.daplie.com:8443/lexevsapi64";
	public void run() throws LBInvocationException{
		try {
			lbs = (LexEVSDistributed)ApplicationServiceProvider.getApplicationServiceFromUrl(serviceUrl, "EvsServiceInfo");
	}
		catch(Exception e){
			System.out.println("Starting LexEVS Remote Client fails" + e);
	}

	CodingSchemeRenderingList list = lbs.getSupportedCodingSchemes();
		for(CodingSchemeRendering rendering: list.getCodingSchemeRendering()){
			System.out.println(rendering.getCodingSchemeSummary().getFormalName());
		}
	}

	public static void main(String[] args) {
		try {
			new MavenBasedPrototype().run();
		} catch (LBInvocationException e) {
			e.printStackTrace();
		}
	}
}

...