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.

...

Implementation Example and Discussion

Call the

...

Super Constructor

Looking at the implementation of this interface in lbImpl, org.LexGrid.LexBIG.Impl.loaders.MedDRALoaderImpl, notice that implementation is kept relatively clean thanks the fact that much of the mechanism of loading into LexEVS is taken care of under the covers by the BaseLoader class.  MedDRALoaderImpl creates a constructor that always calls the BaseLoader constructor, then prevents the use of manifests.  (If you wish you may choose to allow manifest use, since it allows load time manipulation of coding scheme metadata.  Often source files do not provide all that needs to be known about the source.  A manifest file allows values that may not be present in the source, such as copyrights, authoring information, version definition and formal coding scheme name to be added to the load.)

Define the

...

Extension

The buildExtensionDescription method provides a background method for the registration of this loader to take place within LexEVS. It should be created the same way for each loader.

Validate the Source (

...

Optional)

The validate method is not always implemented, but can and should be when a mechanism exists to insure that this is a correctly structured version of the source.  When source is XML formatted and has a schema or dtd document commonly available for validation, this is a relatively easy process.  However any free text files that do not have any associated java-based validation API, would rely on the developer to create validation functions.  The validation method is not required to create a loader for LexEVS. 

Implement the Abstract Method doLoad() (

...

and possibly override the load() method)

In order to get loading done theory the developer could at this point implement only doLoad by mapping content to a coding scheme object and persisting it before turning control over to BaseLoader which will call the doLoad method and set default load options in its load method and kick off the processes to persist a coding scheme object to the database.  The other option is to implement doLoad and override the load method which sets up end user option choices for the loader.   Most loaders implement the load method, customizing load options to provide to the end user.  In the case of the MedDRA loader, a CUI load option is provided to the end user.

...

Once done the MedDRAMapToLexGrid  can map data objects derived from the MedDRA source into a complete coding scheme object. 

Recap and

...

Pass Control Back to BaseLoader

So the tasks are to read the file into some kind of logical model or bean class object.  Organize these objects or make them available to be mapped into LexEVS objects, tie all objects together as a coding scheme, and pass this potentially large coding scheme object to LexEVS to be persisted to the database.  Back up the execution chain in MeDRALoaderImpl the doLoad method first calls the mapping method of the conversion class MedDRA2LGMain to get the reading and mapping done, then passes control of the resulting coding scheme to BaseLoader by calling this.persistCodingSchemeToDatabase method on the BaseLoader super class. 

...