Skip to content
This repository has been archived by the owner on Jan 30, 2018. It is now read-only.

peetkes/BIR-rest

Repository files navigation

BIR project

This project is based upon the ROXY Framework for MarkLogic

To be able to run roxy you need the following prerequisites:

A supported version of MarkLogic
Ruby 1.9.3 or greater
Java (jdk) Only if you wish to run the mlcp, XQSync, or RecordLoader commands.
Git - Required to create a new project using "ml new".

Project makes use of jquery, jquery-ui and bootstrap and has an autocomplete combobox and a datepicker

Installation

To get you up and running fast:

git clone https://github.com/peetkes/BIR-rest.git
cd BIR-rest
ml local bootstrap
ml local deploy content
ml local deploy modules

I added some sample data loaded from RDO No. 30 Binondo and RDO No. 50 South Makati. This will be loaded at the ml local deploy content command. After this the script scripts/set-collection.xqy must be run in the query console to set the collection for all revenue data. Open up the queryconsole on the machine [localhost:8000/qconsole], copy the content of this script and run the script.

Hit localhost:8045/default.xqy to see the application in action

Convert excelsheets to CSV

The cleanup scripts run as an applescript on a Mac. There is no version for windows or Linux. To run the cleanup script:

Start the scripts/Save all sheets as CSV files.scpt
Hit the run button
Select the folder containing the excel sheets.
Select the folder for the csv result files.
Select a folder where the list of csv files will be saved. (this can be of use for the xml file with the overview)

The script will go over all excel files in the inputfolder and convert these to a csv file per worksheet. You then need to create the overview file for all generated csv files. This overview file holds the filename, start and end date, the do-number and the revision. See scripts/sample-file-overview.xml for the format

The script scripts/load-data.xqy can be used to load all data in the database. Open up the queryconsole on the machine [localhost:8000/qconsole], copy the content of this script , adjust the location and fileListName parameter and run the script. This will spawn the loading of the data to the taskserver.

A chunk of test-data is available as zip in the test-data folder