NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar:icons=false}

h1. {
Scrollbar
iconsfalse
page-info

...

:title}
{section}
{column}
{panel:title=Contents of this Page}
{toc:minLevel=2}
{panel}
{column}
{column}
{align:right}{include:Menu LexEVS 6.0 Administration to Include}{align
}
Section
Code Block
Column
Panel
titleContents of this Page
Table of Contents
minLevel2
Column
Wiki Markup

Retrieving Services

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

HistoryService

}{column}
{section}

h2. Retrieving Services
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.

h3. [LexBIGService|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html]

h4. [HistoryService|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getHistoryService%28java.lang.String%29]


<source lang = java>
<nowiki>{code}
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();	

		try {

			HistoryService historSvc = lbsv.getHistoryService(codingScheme);<

		} catch (LBException e) {	

			e.printStackTrace();	

		}
</nowiki>
</source>

LexBIGServiceManager

Code Block
);	

		}
{code}
</source>

h4. [LexBIGServiceManager|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getServiceManager%28java.lang.Object%29]

<source lang = java>
<nowiki>{code}
                //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();
		}
</nowiki>{code}
</source>

LexEVSServiceMetaData

Code Block


h4. [LexEVSServiceMetaData|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getServiceMetadata%28%29]

<source lang = java>
<nowiki>{code}
                // User safe service meta data query interface.
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		
		try {
			
			LexBIGServiceMetadata svcMetaData = lbsv.getServiceMetadata();
			
		} catch (LBException e) {
			e.printStackTrace();
		}
</nowiki>
</source>

LexEvsServiceLocator

SystemResourceService

Code Block

			e.printStackTrace();
		}
{code}
</source>


h3. [LexEvsServiceLocator|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/lexevs/locator/LexEvsServiceLocator.html]

h4. [SystemResourceService|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/lexevs/locator/LexEvsServiceLocator.html#getSystemResourceService%28%29]

<source lang = java>
<nowiki>{code}
 // 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());
</nowiki>
</source>

LexEvsIndexOperations

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

Code Block
));
{code}
</source>

h4. [LexEvsIndexOperations|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/lexevs/locator/LexEvsServiceLocator.html#getLexEvsIndexOperations%28%29]
Some index operations can be accomplished using the interface returned from the LexEvsServiceLocator.

<source lang = java>
<nowiki>{code}
		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);
		}
{
			throw new RuntimeException(e);
		}
</nowiki>
</source>

EntityIndexService

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

Code Block
code}
</source>

h4. [EntityIndexService|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/lexevs/dao/index/service/entity/EntityIndexService.html]

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

<source lang = java>
<nowiki>{code}
            AbsoluteCodingSchemeVersionReference acsvr = new  AbsoluteCodingSchemeVersionReference();
           
            acsvr.setCodingSchemeURN(css.getCodingSchemeURI());
            acsvr.setCodingSchemeVersion(css.getRepresentsVersion());
           
            LexEvsServiceLocator.getInstance().
            getIndexServiceManager().
                getEntityIndexService().dropIndex(acsvr);
</nowiki>{code}
</source>

h2. LexBIGService Administration Methods

...


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:

Code Block


h3. [Getting Filter Extensions|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getFilterExtensions%28%29]:

<source lang=java>
<nowiki>{code}
        // 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());
		}
</nowiki>
</source>

Getting Sort Algorithms:

Code Block
.out.println(extDesc.nextElement().getName());
		}
{code}
</source>


h3. [Getting Sort Algorithms:|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getSortAlgorithms%28org.LexGrid.LexBIG.DataModel.InterfaceElements.types.SortContext%29]

<source lang=java>
<nowiki>{code}
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends SortDescription> sortDesc = lbsv.getSortAlgorithms(null).enumerateSortDescription();
		while(sortDesc.hasMoreElements()){
			System.out.println(sortDesc.nextElement().getName());
		}
</nowiki>
</source>

Getting Match Algorithms:

Code Block
}
{code}
</source>

h3. [Getting Match Algorithms|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getMatchAlgorithms%28%29]:

<source lang=java>
<nowiki>{code}
	LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends ModuleDescription> modDesc = lbsv.getMatchAlgorithms().enumerateModuleDescription();
		while(modDesc.hasMoreElements()){
			System.out.println(modDesc.nextElement().getName());
		}
</nowiki>{code}
</source>

Sample Output:

...


{code
}
 SpellingErrorTolerantSubStringSearch
 StemmedLuceneQuery
 literalContains
 startsWith
 nonLeadingWildcardLiteralSubString
 literal
 WeightedDoubleMetaphoneLuceneQuery
 literalSubString
 DoubleMetaphoneLuceneQuery
 RegExp
{code}

 RegExp

Getting Generic Extensions:

Code Block
h3. [Getting Generic Extensions|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getGenericExtensions%28%29]:

<source lang=java>
<nowiki>{code}
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
		Enumeration<? extends ExtensionDescription> extDesc = lbsv.getGenericExtensions().enumerateExtensionDescription();
		while(extDesc.hasMoreElements()){
			System.out.println(extDesc.nextElement().getName());

		}
</nowiki>{code}
</source>

Sample Output:

...


{code
}
 SupplementExtension
 LexBIGServiceConvenienceMethods
 ApproxNumOfConceptsPostProcessor
 MappingExtension
 SupportedAttributePostProcessor
 OntologyFormatAddingPostProcessor

Getting Service Information on all Schemes:

Code Block

{code}

h3. [Getting Service Information on all Schemes|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#getSupportedCodingSchemes%28%29]:

<source lang=java>
<nowiki>{code}
		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();
		}
</nowiki>{code}
</source>

Sample Output Excerpt

...


{code
}
 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:

Code Block

{code}

h3. [Getting Single Coding Scheme Information|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#resolveCodingScheme%28java.lang.String,%20org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag%29]:

<source lang=java>
<nowiki>{code}
	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();
		}
</nowiki>{code}
</source>

Output same as above but for designated coding scheme only

...

Getting a Coding Scheme's Copyright Content:

Code Block
.

h3. [Getting a Coding Scheme's Copyright Content|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/Impl/LexBIGServiceImpl.html#resolveCodingSchemeCopyright%28java.lang.String,%20org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag%29]:

<source lang=java>
<nowiki>{code}
		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();
		}
</nowiki>{code}
</source>

Output is unformatted

...

LexBIGService Manager Methods

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.

Setting Coding Scheme Version Tag

Setting the Coding Scheme tag allows the system administrator to provide status tags or designate a preferred version of a given coding scheme for this terminology service.

Code Block
 text

h2. [LexBIGService Manager Methods|http://informatics.mayo.edu/LexGrid/downloads/LexEVS_60_JavaDocs/runtime_javadoc/org/LexGrid/LexBIG/LexBIGService/LexBIGServiceManager.html]

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.

h3. Setting Coding Scheme Version Tag
Setting the Coding Scheme tag allows the system administrator to provide status tags or designate a preferred version of a given coding scheme for this terminology service.

<source lang=java>
<nowiki>{code}
AbsoluteCodingSchemeVersionReference codingSchemeVersion = 
     new AbsoluteCodingSchemeVersionReference();
codingSchemeVersion.setCodingSchemeURN("http://www.co-ode.org/ontologies/amino-acid/2005/10/11
/amino-acid.owl");
codingSchemeVersion.setCodingSchemeVersion("1.0");

		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();

		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
                        // PRODUCTION tagged  vocabularies are interpreted by LexEVS
                        // to be the preferred version of the vocabulary.
			lbsvm.setVersionTag(codingSchemeVersion, "PRODUCTION");

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
</nowiki>{code}
</source>

h3. Activate Coding Scheme

...


The active designation for a coding scheme is required to enable query functionality for the contained entities and their relationships and properties.

...

Code Block


<source lang=java>
<nowiki>{code}
AbsoluteCodingSchemeVersionReference codingSchemeVersion = 
    new AbsoluteCodingSchemeVersionReference();
codingSchemeVersion.setCodingSchemeURN("http://www.co-ode.org/ontologies/amino-acid/2005/10/1/amino-acid.owl");
codingSchemeVersion.setCodingSchemeVersion("1.0");
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();

		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			lbsvm.activateCodingSchemeVersion(codingSchemeVersion);

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		
</nowiki>{code}
</source>

h3. Deactivate Coding Scheme

...


Allows administrator to restrict access to coding scheme metadata only.

...

Code Block


<source lang=java>
<nowiki>{code}
AbsoluteCodingSchemeVersionReference codingSchemeVersion = 
    new AbsoluteCodingSchemeVersionReference();
codingSchemeVersion.setCodingSchemeURN("http://www.co-ode.org/ontologies/amino-acid/2005/10/1/amino-acid.owl");
codingSchemeVersion.setCodingSchemeVersion("1.0");
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
 
		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			lbsvm.deactivateCodingSchemeVersion(codingSchemeVersion, null);
 
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();

</nowiki>{code}
</source>

h3. Remove Coding Scheme

...


Removes a coding scheme and it's indexes from a terminology service.

...


{warning
:title
=Warning
}This is a slow, resource consuming activity when the service is configured for single table mode.
Code Block
{warning}

<source lang=java>
<nowiki>{code}
AbsoluteCodingSchemeVersionReference codingSchemeVersion = 
    new AbsoluteCodingSchemeVersionReference();
codingSchemeVersion.setCodingSchemeURN("http://www.co-ode.org/ontologies/amino-acid/2005/10/1
/amino-acid.owl");
codingSchemeVersion.setCodingSchemeVersion("1.0");
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();
 
		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			lbsvm.removeCodingSchemeVersion(codingSchemeVersion);
 
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
                {
</nowiki>{code}
</source>

h3. Remove History Service

...


Remove a history service from the terminology service.

...

Code Block


<source lang=java>
<nowiki>{code}
		String codingScheme = "NCI Thesaurus";
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();

		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			lbsvm.removeHistoryService(codingScheme);

		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
</nowiki>{code}
</source>

h3. Get Load Extensions

...


Allows a determination of available loaders by an administrator.

...

Code Block


<source lang=java>
<nowiki>{code}
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();

		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			 Enumeration<? extends ExtensionDescription> extDesc =
                         lbsvm.getLoadExtensions().enumerateExtensionDescription();
			 while(extDesc.hasMoreElements()){
				 System.out.println(extDesc.nextElement().getName());
			 }
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			}
{code}
</nowiki>source>
</source>
Sample Output:

...


{code
}
 NCIMetaHistoryLoader
 OBOLoader
 HL7Loader
 ClaMLLoader
 SemNetLoader
 MrMap_Loader
 MetaDataLoader
 RadLexFramesLoader
 TextLoader
 NCIThesaurusHistoryLoader
 OWLLoader
 LexGrid_Loader

Get Specific Loader

Returns a specific loader instance for use in loading the relevant source file.

Code Block

{code}

h3. Get Specific Loader
Returns a specific loader instance for use in loading the relevant source file.

<source lang=java>
<nowiki>{code}
            LexBIGService lbs = LexBIGServiceImpl.defaultInstance();
            LexBIGServiceManager lbsm = lbs.getServiceManager(null);
            LexGrid_Loader loader = (LexGrid_Loader) lbsm
                    .getLoader(org.LexGrid.LexBIG.Impl.loaders.LexGridMultiLoaderImpl.name);
                loader.setCodingSchemeManifestURI(manifest);
                loader.load(source, false, true);
</nowiki>{code}
</source>

Get Extension Registry

Returns an extension registry service for all externally registered plugins to LexEVS. This provides similar functionality to the other registry retrieval, display and use and we won't repeat method examples here.

Code Block

{code}

h3. Get Extension Registry
Returns an extension registry service for all externally registered plugins to LexEVS. This provides similar functionality to the other registry retrieval, display and use and we won't repeat method examples here.

<source lang=java>
<nowiki>{code}
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			 ExtensionRegistry registry = lbsvm.getExtensionRegistry();
</nowiki>{code}
</source>

h3. Get Export Extensions

...


Returns a list of Export extensions available as administrative functions to allow administrators to export a terminology to a specifically formatted output file.

...

Code Block


<source lang=java>
<nowiki>{code}
		LexBIGService lbsv = LexBIGServiceImpl.defaultInstance();

		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			Enumeration<? extends ExtensionDescription> extDesc =
                        lbsvm.getExportExtensions().enumerateExtensionDescription();
			while(extDesc.hasMoreElements()){
				System.out.println(extDesc.nextElement().getName());
			}
		
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
</nowiki>{code}
</source>

Sample Output

...


{code
}
 LexGridExport
 OwlRdfExporter
 OBOExport

Get Exporter

Returns an exporter for a specific output format.

Code Block

{code}

h3. Get Exporter
Returns an exporter for a specific output format.

<source lang=java>
<nowiki>{code}
            LexBIGService lbs = LexBIGServiceImpl.defaultInstance();
            LexBIGServiceManager lbsm = lbs.getServiceManager(null);

            // Find the registered extension handling this type of export ...
            OwlRdfExporterImpl exporter = (OwlRdfExporterImpl) lbsm.getExporter(OwlRdfExporterImpl.name);

            // Perform the requested action ...
            CnsCngPair cngCngPair = FilterParser.parse(lbs, css.getCodingSchemeURI(),
            css.getRepresentsVersion(), cl);
            exporter.setCng(cngCngPair.getCng());
            exporter.setCns(cngCngPair.getCns());
            exporter.export(Constructors.createAbsoluteCodingSchemeVersionReference(css),
            destination,overwrite,false, true);
</nowiki>{code}
</source>

h3. Remove Metadata

...


Remove external coding scheme metadata

...

Code Block


<source lang=java>
<nowiki>{code}
                String urn = "urn:oid:11.00.11.1";
                String ver = "1.1";
                Enumeration<? extends CodingSchemeRendering> schemes = lbs.getSupportedCodingSchemes()
                        .enumerateCodingSchemeRendering();
                while (schemes.hasMoreElements() && css == null) {
                    CodingSchemeSummary summary = schemes.nextElement().getCodingSchemeSummary();
                    if (urn.equalsIgnoreCase(summary.getCodingSchemeURI())
                            && ver.equalsIgnoreCase(summary.getRepresentsVersion()))
                        css = summary;
                }
            }

          
                lbs.getServiceManager(null).removeCodingSchemeVersionMetaData(
                        Constructors.createAbsoluteCodingSchemeVersionReference(css));
</nowiki>{code}
</source>

h3. Register Coding Scheme Supplement

...


Register a coding scheme as a supplement to another coding scheme

...

Code Block


<source lang=java>
<nowiki>{code}
		try {
			LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
			AbsoluteCodingSchemeVersionReference parentCodingScheme  = new
                        AbsoluteCodingSchemeVersionReference();
			AbsoluteCodingSchemeVersionReference supplementCodingScheme = new
                        AbsoluteCodingSchemeVersionReference();
			String codingSchemeURN = "urn:oid:11.11.0.1.1";
			String codingSchemeVersion = "1.0";
			String ExtensionCodingSchemeURN = "urn:oid:11.11.0.1.1-extension";
			String ExtensionCodingSchemeVersion = "1.0-extension";
			parentCodingScheme.setCodingSchemeURN(codingSchemeURN);
			parentCodingScheme.setCodingSchemeVersion(codingSchemeVersion);
			supplementCodingScheme.setCodingSchemeURN(ExtensionCodingSchemeURN);
			supplementCodingScheme.setCodingSchemeVersion(ExtensionCodingSchemeVersion);

			lbsvm.registerCodingSchemeAsSupplement(parentCodingScheme,supplementCodingScheme);
		
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
</nowiki>{code}
</source>

Remove a coding schemes relationship with another as a supplement.

h3.

...

 Un-Register Coding Scheme Supplement

...

Code Block


<source lang=java>
<nowiki>{code}
try {
	LexBIGServiceManager lbsvm = lbsv.getServiceManager(null);
	AbsoluteCodingSchemeVersionReference parentCodingScheme  = new
        AbsoluteCodingSchemeVersionReference();
	AbsoluteCodingSchemeVersionReference supplementCodingScheme = new
        AbsoluteCodingSchemeVersionReference();
	String codingSchemeURN = "urn:oid:11.11.0.1.1";
	String codingSchemeVersion = "1.0";
	String ExtensionCodingSchemeURN = "urn:oid:11.11.0.1.1-extension";
	String ExtensionCodingSchemeVersion = "1.0-extension";
	parentCodingScheme.setCodingSchemeURN(codingSchemeURN);
	parentCodingScheme.setCodingSchemeVersion(codingSchemeVersion);
	supplementCodingScheme.setCodingSchemeURN(ExtensionCodingSchemeURN);
	supplementCodingScheme.setCodingSchemeVersion(ExtensionCodingSchemeVersion);
 
			lbsvm.registerCodingSchemeAsSupplement(parentCodingScheme,supplementCodingScheme);
 
} catch (LBException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}

</nowiki>{code}
</source>

h2. LexEVS Authoring Service Management Methods

...


Currently restricted to the support of Mapping Authoring only

...

Create a Mapping Coding Scheme from Scratch

Code Block
.  

h3. Create a Mapping Coding Scheme from Scratch

<source lang=java>
<nowiki>{code}
     LexEVSAuthoringService authoring = new LexEVSAuthoringServiceImpl();
    
	   EntryState entryState = new EntryState();
	   entryState.setChangeType(ChangeType.NEW);
	   entryState.setContainingRevision("FirstVersionNCItToICD9_12_1_54");
	   entryState.setRelativeOrder(new Long(1));
		
		//Minimum meta data for the mapping coding scheme should be defined here
		AbsoluteCodingSchemeVersionReference mappingCodingScheme = new AbsoluteCodingSchemeVersionReference();
		mappingCodingScheme.setCodingSchemeURN("urn:oid:11.0011.1.1");
		mappingCodingScheme.setCodingSchemeVersion("1.0");
		
		AbsoluteCodingSchemeVersionReference sourceCodingScheme = new AbsoluteCodingSchemeVersionReference();
		sourceCodingScheme.setCodingSchemeURN("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#");
		sourceCodingScheme.setCodingSchemeVersion("10.10e");
		
		AbsoluteCodingSchemeVersionReference targetCodingScheme = new AbsoluteCodingSchemeVersionReference();
		targetCodingScheme.setCodingSchemeURN("urn:oid:2.16.840.1.113883.6.2");
		targetCodingScheme.setCodingSchemeVersion("200909");
		
		AssociationSource[] associationSource = new AssociationSource[2];
		
		
		String associationType = "mapped_to";
		String relationsContainerName = "relations";
		Date effectiveDate = new Date();

		Revision revision = new Revision();
		revision.setRevisionId(entryState.getContainingRevision());
		
		boolean loadEntities = false;
		try {
			authoring.createAssociationMapping(
					entryState, 
				    mappingCodingScheme,
					sourceCodingScheme, 
					targetCodingScheme,
					associationSource,
					associationType,
					relationsContainerName,
					effectiveDate,
					null,
					revision,
					false
					);
		} catch (LBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
</nowiki>{code}
</source>

h3. Create a Mapping Coding Scheme with Default Coding Scheme Values

...

Code Block


<source lang=java>
<nowiki>{code}
		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);
</nowiki>{code}
</source>

h2. [CTS2 Management

...

Pick List and Value Set Managment Methods

...

 Methods|LexEVS 6.0 CTS2 API#Administration Operation]

No further information provided

h2. [Pick List and Value Set Managment Methods|LexEVS 6.0 Value Set Service#Administration Functions]

No further information provided

{scrollbar:icons=false}