-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jyucsiro/master
Updating sissvoc codebase to allow vanilla packaging of the configs
- Loading branch information
Showing
89 changed files
with
240 additions
and
17,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
147 changes: 74 additions & 73 deletions
147
...onalStratigraphicChart2010-ELDAConfig.ttl → build/SISSvoc3-ELDAConfig-template.ttl
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.