Chesnokov XML Parser Setup and Use

From CVRG Wiki

Jump to: navigation, search

This page will demonstrate how to create and use the Chesnokov XML Parser Java library.

Contents

Chesnokov Parser Description

The Chesnokov XML Parser is a tool designed to take XML output from the Chesnokov Algorithm and turn them into ECG annotations.

These annotations will then be stored in a database for later use by other applications. This tool will also make RESTful calls to BioPortal in order to get the URLs for each type of annotation. Once this is done, the tool can also calculate other statistics using the values from those annotations.

Technologies Required

Development Environment

JAR Dependencies

Tool Version Download Location
Apache Commons Codec 1.3 http://commons.apache.org/proper/commons-codec/
Apache Commons FileUpload 1.2.1 http://commons.apache.org/proper/commons-fileupload/
Apache Commons HttpClient 3.1 – There is a new library named HttpComponents which replaces this, but the parser has not been tested on it yet. http://hc.apache.org/downloads.cgi
Apache Commons IO 2.4 http://commons.apache.org/proper/commons-io/download_io.cgi
Apache Commons Logging 1.1.1 http://commons.apache.org/proper/commons-logging/download_logging.cgi
Apache Commons Net 1.4.1 http://commons.apache.org/proper/commons-net/download_net.cgi
eXist Note: The version of this library used by the parser is no longer available online. Use a local repository (Dropbox, Maven, etc.) instead N/A
JDOM 1.1 – It should also be compatible with version 1.1.3. It has not been tested on version 2.0.5. http://www.jdom.org/downloads/index.html
Apache Log4j 1.2.17 – This is the only version that differs from Waveform. Waveform uses version 1.2.15, but the Parser should work on either one. http://logging.apache.org/log4j/1.2/download.html
WS-Commons-Util 1.0.2 http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.ws.commons.util/ws-commons-util/1.0.2
Apache Xerces 1.4.3 http://archive.apache.org/dist/xml/xerces-j/old_xerces1/
XMLDB 1.0 http://archive.apache.org/dist/xml/xerces-j/old_xerces1/
XMLDB-common Note: The version of this library used by the parser is no longer available online. Use a local repository (Dropbox, Maven, etc.) instead N/A
XMLDB-xupdate Note: The version of this library used by the parser is no longer available online. Use a local repository (Dropbox, Maven, etc.) instead N/A
xmlpull 1.1.3.1 http://www.jarfinder.com/index.php/jars/versionInfo/60717
Xmlrpc-common 3.1.3 http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.xmlrpc/xmlrpc-common/3.1.3
Apache XmlSchema 1.4.2 http://ws.apache.org/commons/XmlSchema/download.html
Xpp3_min 1.1.4c http://grepcode.com/snapshot/repo1.maven.org/maven2/xpp3/xpp3_min/1.1.4c
XStream 1.4.2 http://xstream.codehaus.org/download.html

Creating the Library

Pull down the library from source control. Currently it is found on the NCBO SVN section of Gforge. The project is named ChesnokovXMLParser. If this is done within an IDE (such as Eclipse) follow the process for exporting the project to a JAR file, otherwise use the javac on the command line. Currently, there is no ant script for compiling the library.

Note: Do not place the dependencies inside of the JAR since the Parser will not find them there.

Using the library

  • If using in Eclipse, you may simply add the location of the JAR file into the build path of the existing project. If it is part of a web application, make sure it is also part of the deployment assembly.
  • Otherwise, place the JAR file in the desired location and set the local version of your project's classpath to it.

Be sure to include the dependencies as well in the same way.

Invoking the Parser

Creating Annotations for Each Lead

Adding Bioportal Reference URLs into Existing Annotations

Taking Averages of Chesnokov Annotations

Personal tools
Project Infrastructures