NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

LexEVS provides classes to extend and interfaces to implement that help provide the framework for in memory transformations of source files into the LexGrid model. If the target source is large, batch loading may well be a better solution in which case the Loader Framework built on Spring Batch may be a better match for source loading. On the other hand, users may find the standard LexEVS loader interface a little easier to implement. 

Writing loaders requires both programming skill and content expertise. Mapping source into the LexGrid data model requires knowledge of how the source defines entities, relationships between entities and any qualifiers or properties for these elements.  However, some study of other presentations of that content, and documentation of the source files, can help most programmers make informed choices as to that mapping.  Examples of source mapped into LexGrid are documented here.

...

Cloning this repository produces a large set of eclipse friendly projects that can be imported into eclipseEclipse or Intellij. 

Interfaces and Abstract classes to Extend

Loader interfaces must extend the interface org.LexGrid.LexBIG.Extensions.Load.Loader from the lbInterfaces project and implementations of your new interface must also extend the abstract class org.LexGrid.LexBIG.Impl.loaders.BaseLoader in the lbImpl project.  Let's take as an example the Medra MedDRA loader interfaces and classes as it is a relatively simple implementation:

The extension of Loader is org.LexGrid.LexBIG.Extensions.Load.MedDRA_Loader.java and is found in the lbInterfaces project.  This defines a loader load and validation method methods and creates initialized class attributes name and description.  The name of this interface will eventually be used by the LexEVS extension function to call the loader into existence.  (Loaders are always extensions to LexEVS).  (Extension code here)

Implementation Example and Discussion

...

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.)

...