NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

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

Scrollbar
iconsfalse

Page info
title
title

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

...

LexEVS provides a number of services which are retrievable through the LexBIGService interface and the LexEvsServiceLocator interface. We list here a small sample including the more commonly used interfaces.

LexBIGService
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

HistoryService
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();	

		try {

			HistoryService historSvc = lbsv.getHistoryService(codingScheme);<

		} catch (LBException e) {	

			e.printStackTrace();	

		}

LexBIGServiceManager
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
                //LexBIG Service Manager can accept credentials validation to
                //preserve service security.
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		
		try {
			
			LexBIGServiceManager svcManager = lbsv.getServiceManager(credentials);
			
		} catch (LBException e) {
			e.printStackTrace();
		}

LexEVSServiceMetaData
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
                // User safe service meta data query interface.
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		
		try {
			
			LexBIGServiceMetadata svcMetaData = lbsv.getServiceMetadata();
			
		} catch (LBException e) {
			e.printStackTrace();
		}

LexEvsServiceLocator
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

SystemResourceService
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
 // The system resource service is commonly wrapped in LexBIGServiceManager calls
 // and as such it prevents unauthorized users from removing coding schemes from the service.
 SystemResourceService systemResourceService = LexEvsServiceLocator.getInstance().getSystemResourceService();
        // must be marked as inactive or pending before delete.
        systemResourceService.removeCodingSchemeResourceFromSystem(
                codingSchemeVersionReference.getCodingSchemeURN(),
                codingSchemeVersionReference.getCodingSchemeVersion());

LexEvsIndexOperations
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Some index operations can be accomplished using the interface returned from the LexEvsServiceLocator.

...

Code Block
		boolean isSingleIndex = 
			LexEvsServiceLocator.getInstance().getSystemResourceService().getSystemVariables().getIsSingleIndex();
		
		if(! isSingleIndex) {
			throw new RuntimeException("Lucene Clean Up can only be executed in Single Index Mode.");
		}
		try {
			List<AbsoluteCodingSchemeVersionReference> expectedList = 
				new ArrayList<AbsoluteCodingSchemeVersionReference>();
			
			for(RegistryEntry entry :
				LexEvsServiceLocator.getInstance().getRegistry().getAllRegistryEntriesOfType(ResourceType.CODING_SCHEME)) {
				
				AbsoluteCodingSchemeVersionReference ref = new AbsoluteCodingSchemeVersionReference();
				ref.setCodingSchemeURN(entry.getResourceUri());
				ref.setCodingSchemeVersion(entry.getResourceVersion());
				
				expectedList.add(ref);
			}
			
			LexEvsServiceLocator.getInstance().getLexEvsIndexOperations().cleanUp(expectedList, reindexMissing);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

EntityIndexService
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Others operations require using the IndexServiceManager to retrieve a more specific index service

...

We've shown how the LexBIGService interface can retrieve other services, but it also provides some user safe administrative functions. These functions provide users with information about the service and overlap general user API functions, since they give users information about how to use the service.

Getting Filter Extensions
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
        // LexEVS has no built-in filter extensions. This method call
        // will only return filters users have created themselves.
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends ExtensionDescription> extDesc = lbsv.getFilterExtensions().enumerateExtensionDescription();
		while(extDesc.hasMoreElements()){
			System.out.println(extDesc.nextElement().getName());
		}

Getting Sort Algorithms
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends SortDescription> sortDesc = lbsv.getSortAlgorithms(null).enumerateSortDescription();
		while(sortDesc.hasMoreElements()){
			System.out.println(sortDesc.nextElement().getName());
		}

Getting Match Algorithms
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
	LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends ModuleDescription> modDesc = lbsv.getMatchAlgorithms().enumerateModuleDescription();
		while(modDesc.hasMoreElements()){
			System.out.println(modDesc.nextElement().getName());
		}

...

Code Block
 SpellingErrorTolerantSubStringSearch
 StemmedLuceneQuery
 literalContains
 startsWith
 nonLeadingWildcardLiteralSubString
 literal
 WeightedDoubleMetaphoneLuceneQuery
 literalSubString
 DoubleMetaphoneLuceneQuery
 RegExp

Getting Generic Extensions
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends ExtensionDescription> extDesc = lbsv.getGenericExtensions().enumerateExtensionDescription();
		while(extDesc.hasMoreElements()){
			System.out.println(extDesc.nextElement().getName());

		}

...

Code Block
 SupplementExtension
 LexBIGServiceConvenienceMethods
 ApproxNumOfConceptsPostProcessor
 MappingExtension
 SupportedAttributePostProcessor
 OntologyFormatAddingPostProcessor

Getting Service Information on all Schemes
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		try {
			CodingSchemeRenderingList schemes = lbsv.getSupportedCodingSchemes();
            for (CodingSchemeRendering csr : schemes.getCodingSchemeRendering()) {
                // Separator ...
                System.out.println("=============================");
                CodingSchemeSummary css = csr.getCodingSchemeSummary();
                CodingScheme cs = lbsv.resolveCodingScheme(css.getCodingSchemeURI(), Constructors
                        .createCodingSchemeVersionOrTagFromVersion(css.getRepresentsVersion()));
                System.out.println(ObjectToString.toString(cs, "", 80));}

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

...

Code Block
 CodingScheme
    Name: MDR12_1_TO_CST95
    Formal Name: MDR12_1_TO_CST95
    URI: urn:oid:CL413321.MDR.CST
    Approximate Number of Concepts: 0
    Default Language: null
    Represents Version: 200909
    Local Names:
        Array of 1 items:
            MDR12_1_TO_CST95
    Mappings:
        MappingsSupportedAssociations:
                Array of 1 items:
                    SupportedAssociation
                        Local ID: mapped_to
                        Content: mapped_to
                        AssociationEntity CodingScheme: null
                        AssociationEntity EntityCodeNamespace: null
                        AssociationEntity EntityCode: null
            SupportedCodingSchemes: ...................................................

Getting Single Coding Scheme Information
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
	public void run(){
		String codingScheme = "amino-acid.owl";	
		CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
		versionOrTag.setVersion("1.2");
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		try {
			CodingScheme cs = lbsv.resolveCodingScheme(codingScheme, versionOrTag );
            System.out.println(ObjectToString.toString(cs, "", 80));

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

Output same as preceding but for designated coding scheme only.

Getting a Coding Scheme's Copyright Content
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

Code Block
		String codingScheme = "amino-acid.owl";	
		CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
		versionOrTag.setVersion("1.2");
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		try {
			String cpywrt = lbsv.resolveCodingSchemeCopyright(codingScheme, versionOrTag);
            System.out.println(cpywrt);

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

Output is unformatted text

LexBIGService Manager Methods
Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue

...

PageWithExcerptwikicontent:Exit Disclaimer to Include

These methods are generally not end user safe or access information in the system that is administrator specific in context. In general it should not be exposed to the end user.

...

Code Block
		authoring.createMappingWithDefaultValues(sources, "NCI Thesaurus",
				"10.10a", "ICD9", "200909", "mapped_to", false);
		AbsoluteCodingSchemeVersionReference codingSchemeVersion = new
                AbsoluteCodingSchemeVersionReference();
		codingSchemeVersion
				.setCodingSchemeURN("http://default.mapping.container");
		codingSchemeVersion.setCodingSchemeVersion("1.0");
		lbsm.activateCodingSchemeVersion(codingSchemeVersion); 

Insert Entity

 

Code Block
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);

 

Updating an Existing Entity

Code Block
 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");

 

CTS2 Management Methods

No further information provided

...

No further information provided

Scrollbar
iconsfalse