Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

The eXist-db XML database is a third party NoSQL database written in Java. A good overview is available on Wikipedia

The software is available for download here and we have an instance running in the lab on 192.168.1.180:8081 for the console (admin/cdsreflab)

The main documentation page is here

I particular I recommend reading the development and quick start pages.

Health E-Decision

New Application named as HeD is created in instance running in the lab : http://192.168.1.180:8081/exist/apps/HeD/index.html which can also be found in the Exist DB Dashboard. This application contains schema and data folders for keeping Schema and Instance Data files respectively under the root directory : /db/apps/HeD/modules/schema/ and /db/apps/HeD/modules/data/

Order Service Exist DB Implementation

For Integrating Exist DB into our existing codebase following steps are followed : 

  • Downloaded required JARs (Unmanaged third party JARs) and created In-Project repository into vacds-order-service/order-service-engine-ri/repo/ and added repository in vacds-order-service/order-service-engine-ri/pom.xml

    In Project Repo
    	<repositories>
    		<!-- In-Project Repostiry -->
    	    <repository>
    			<id>in-project</id>
    			<name>In Project Repo</name>
    			<url>file://${project.basedir}\repo</url>
    		</repository>
    	</repositories>
  • Included following dependencies into vacds-order-service/order-service-engine-ri/pom.xml

    Exist DB Dependencies
    		<!-- Exist DB Dependencies -->
    		<dependency>
    			<groupId>exist</groupId>
    			<artifactId>exist</artifactId>
    			<version>1.1.1</version>
    		</dependency>
    		<dependency>
    			<groupId>exist</groupId>
    			<artifactId>exist-xmldb</artifactId>
    			<version>1.0</version>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.ws.xmlrpc</groupId>
    			<artifactId>xmlrpc</artifactId>
    			<version>2.0.1</version>
    			<exclusions>
    				<exclusion>
    					<groupId>commons-logging</groupId>
    					<artifactId>commons-logging</artifactId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.xmlrpc</groupId>
    			<artifactId>xmlrpc-client</artifactId>
    			<version>3.1.3</version>
    		</dependency>
  • Created ExistDatabaseManager class in package org.socraticgrid.hl7.services.orders.functional of vacds-order-service/order-service-engine-ri/ project which will be used to initialize the database connection and returns org.xmldb.api.base.Collection. Any class in which Exist DB Query or Update functionality is required this class can be autowired to that class and can be used for performing Exist DB operation.
  • A property file named as exist-db.properties is created under src/main/resources of vacds-order-service/order-service-engine-ri/ project which contains following important properties and used by ExistDatabaseManager class to create database connection.

    exist-db.properties
    url=xmldb:exist://192.168.1.180:8081/exist/xmlrpc
    collection=/db/apps/HeD/modules/data/
    username=admin
    password=cdsreflab

    The property collection contains absolute path of the folder which contains our XML Instance data files. As of now for data we created /db/apps/HeD/modules/data/ collection.



  • No labels