170 likes | 273 Views
caCORE Case Study: LexBIG API integration. Characteristics of caCORE. Components. Model Driven Architecture All caCORE components designed in UML and appropriate APIs generated from this information model n -tier Architecture and Open APIs
E N D
Characteristics of caCORE Components • Model Driven Architecture • All caCORE components designed in UML and appropriate APIs generated from this information model • n-tier Architecture and Open APIs • All caCORE components publish a series of well-described APIs (Java Beans, Web Services, HTTP interface (REST)) that provide open read access to data • APIs implemented in an n-tier architecture that allows for flexibility in the persistence layer and shields end users from implementation details • Registered Metadata • All caCORE components register detailed descriptions of their object APIs in a repository - this ‘data about data’ is called metadata • Controlled Terminology • All caCORE components use controlled terminology to describe metadata and (where appropriate) data
caCORE System Architecture • caCORE is based on an n-tier architecture • Provides middleware between data and presentation • Data Access Objects • Domain objects (Java Beans) • Application Service • API Interfaces (JavaAPI, Web services, XML-HTTP)
Non-ORM system • LexBIG is a Non-”Object Relational Mapping” (ORM) system • caCORE EVS domain object mapped to LexBIG objects. Mapping is Object To Object Mapping (OTOM)
Current vs LexBIG integrated System Current: Web App DTSRPC DTS caCORE Metaphrase DB LexBIG integrated System: Web App Index caCORE LexBIG DB
How was LexBIG integrated? • New LexAdapter – “wrapper” around LexBIG • Provides: • “wrapper” for OTOM (facilitate seamless integration of down-stream applications) • LexBIG API configurations • New Data Access layer -- EVSLexBigDAOImpl • DAO used by the caCORE system. Accesses data via LexAdapter
Why Incorporate LexBIG in caCORE? • Current terminology components are proprietary, Metaphrase is frozen • Requires complex architecture in caCORE • Difficult to enhance functionality • Lacks support for open data formats • Performance, lexical processing, graphs • Foreign language, DL support limitations
Demo – HTML Interface (REST) http://cabio-lexbig.nci.nih.gov/cacore32/GetHTML? query=gov.nih.nci.evs.domain.DescLogicConcept &gov.nih.nci.evs.domain.DescLogicConcept[@code=C12756]
Demo – XML Interface (REST) http://cabio-lexbig.nci.nih.gov/cacore32/GetXML? query=gov.nih.nci.evs.domain.DescLogicConcept &gov.nih.nci.evs.domain.DescLogicConcept[@code=C12756]
Demo – Java API /************* Java API Test ***********************************************/ // 1. Search a DescLogicConcept /***************************************************************************/ System.out.println("--------------------Java API Test-----------------------"); System.out.println("1. Search for DescLogicConcepts where concept name ‘blood*'"); System.out.println("------------------------------------------------------\n"); ApplicationService appService = ApplicationService.getRemoteInstance("http://cabio-lexbig.nci.nih.gov/cacore32/http/remoteService"); EVSQuery evsQuery = new EVSQueryImpl(); String vocabularyName = "NCI_Thesaurus"; String searchTerm = “blood*"; evsQuery.searchDescLogicConcepts(vocabularyName , searchTerm, 100); List resultList = appService.evsSearch(evsQuery); for(int i=0; i< resultList.size(); i++){ gov.nih.nci.evs.domain.DescLogicConcept dlc= (gov.nih.nci.evs.domain.DescLogicConcept) resultList.get(i); System.out.println("Code: "+ dlc.getCode() +"\t"+ dlc.getName()); }
Demo - CaCORE Perl #!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; use CaCORE::ApplicationService; use CaCORE::EVS; my $appsvc = CaCORE::ApplicationService->instance("http://cabio-lexbig.nci.nih.gov/cacore32/ws/caCOREService"); # Search DescLogicConcept by code # # This test searches for all DescLogicConcepts with a given code # print "Search DescLogicConcept by code.\n"; my $dlConcept = new CaCORE::EVS::DescLogicConcept; $dlConcept->setCode("C12756"); eval{ @dlcSet = $appsvc->queryObject("CaCORE::EVS::DescLogicConcept", $dlConcept); }; foreach my $dlc (@dlcSet) { print "DescLogicConcept: code=" . $dlc->getCode . ", name=" . $dlc->getName . "\n"; }
Project Resources and Communication • EVS / LexBIG install http://cabio-lexbig.nci.nih.gov/NCIBrowser/Dictionary.do http://cabio-lexbig.nci.nih.gov/cacore32/Happy.jsp • EVS Homepage: http://ncicb.nci.nih.gov/NCICB/infrastructure/cacore_overview/vocabulary • EVS 3.2 Release: • Release Notes http://ncicb.nci.nih.gov/NCICB/infrastructure/caCORE3.2_notes.txt • Java API download:http://ncicb.nci.nih.gov/download/cabiolicenseagreement.jsp • Technical Guide ftp://ftp1.nci.nih.gov/pub/cacore/caCORE3.2_Tech_Guide.pdf • EVS Users Mailing List https://list.nih.gov/archives/ncievs-l.html
Sequence Diagram • Use case: user searching for an EVS object. (Note: ApplicationService layers removed for brevity.)