Skip to content

Commit

Permalink
Merge pull request #1 from jyucsiro/master
Browse files Browse the repository at this point in the history
Updating sissvoc codebase to allow vanilla packaging of the configs
  • Loading branch information
jyucsiro committed Mar 6, 2015
2 parents 3c1c0af + b7ef75a commit 8113041
Show file tree
Hide file tree
Showing 89 changed files with 240 additions and 17,345 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
sissvoc
=======
Spatial Information Services Stack Vocabulary Service (SISSVoc)
===============================================================

Updated: 25 Feb 2015

Contact: Jonathan Yu (jonathan.yu [ at ] csiro.au)

About
-----
A minimal config package for setting up sissvoc.

What's new?
* cleanup of the (xslt) code in resources/default/transform to make local references work
* added build script (gen_sissvoc3_config.py) - allows users to generate a sissvoc elda configuration based on properties file and sissvoc-v3-template. See README in the build dir.

FAQ
---
Q. How do I get a package of sissvoc?
A. Refer to https://github.com/CSIRO-enviro-informatics/sissvoc-package

22 changes: 22 additions & 0 deletions build/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
This directory contains some build utilities.

I. To generate a SISSVoc ELDA config
====================================

0. Pre-requisites
- python 2+ with ConfigParser

1. Edit the config.properties file
- add specific details about your SISSVoc endpoint configuration e.g. name, sparql endpoint, etc.

2. Run the generate config script
- this will generate a file based on the values entered into config.properties
- usage: python gen_sissvoc3_config.py <output file>
- e.g: $ python gen_sissvoc3_config.py generated.ttl

- else if you want to point to a different config prop file use this:
$ python gen_sissvoc3_config.py --config=pizza-config.properties pizza.ttl

3. Put this config file in the /resources dir of the sissvoc package

4. Point the SISSVoc/ELDA deployment to this config script

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions build/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[settings]
DEPLOYPATH=/sissvoc
SERVICE_TITLE=SISSVoc Test
SERVICE_AUTHOR=Bot
SERVICE_AUTHOR_EMAIL=email@none.org
SERVICE_HOMEPAGE=http://sissvoc.info
SERVICE_LABEL=SISSVoc Test service
SPARQL_ENDPOINT=http://www.sissvoc.info/services/pizza-skos/sparql
SVC_ID=test
SVC_PREFIX=/test
NAMESPACES=

41 changes: 41 additions & 0 deletions build/gen_sissvoc3_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import ConfigParser,os,sys
Config = ConfigParser.ConfigParser()

import argparse

parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--config', help='config file (default is config.properties)', type=str, default='config.properties')
parser.add_argument('outputfile', help='output file', type=str)

args = parser.parse_args()



print "Initialising..."

if args.config:
configfile = args.config
else:
configfile = 'config.properties'


Config.read(configfile)
filename='SISSvoc3-ELDAConfig-template.ttl'
infile = open(filename)

outfilename = args.outputfile
outfile = open(outfilename, 'w')

print "Emitting to file: ", outfilename

for line in infile:
for key in Config.options('settings'):
textToSearch = '%' + key.upper() + '%'
textToReplace = Config.get('settings',key)
line = line.replace(textToSearch, textToReplace)

outfile.write(line)

infile.close()
outfile.close()
print "Done!"
15 changes: 15 additions & 0 deletions build/package-with-elda-core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -x #echo on
git clone https://github.com/epimorphics/elda.git
cd elda
git checkout tags/elda-1.2.35
mvn package
cd ..
mkdir sissvoc-pkg
cd sissvoc-pkg
cp -rf ../elda/elda-common/target/elda-common/* .
cp -rf ../elda/elda-assets/target/elda-assets/xslt .
cp -rf ../../resources/ ../../default-landing/ .
sed -i "s/<param-value>\/etc\/elda\/conf.d\/{APP}\/\*.ttl<\/param-value>/<param-value>resources\/{APP}\/config\/\*.ttl<\/param-value>/g" WEB-INF/web.xml
jar -cvf sissvoc.war *
mv sissvoc.war ..
5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2004.jsp

This file was deleted.

5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2005.jsp

This file was deleted.

5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2006.jsp

This file was deleted.

5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2008.jsp

This file was deleted.

5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2009.jsp

This file was deleted.

5 changes: 0 additions & 5 deletions default-landing/LandingPage-isc2010.jsp

This file was deleted.

Loading

0 comments on commit 8113041

Please sign in to comment.