Mercurial > hg > may
changeset 70:80a2f2823f78
Merge
author | Chris Cannam |
---|---|
date | Mon, 25 Feb 2013 22:11:38 +0000 |
parents | b3ff23d6e6bc (diff) 3dad3112784a (current diff) |
children | 3a13af4bd8ba |
files | yetilab |
diffstat | 3 files changed, 60 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/vamp.yeti Wed Jan 30 09:42:00 2013 +0000 +++ b/vamp.yeti Mon Feb 25 22:11:38 2013 +0000 @@ -42,6 +42,14 @@ for kk do k: s[numberOf k] := featureList fs#get(k) done; s); +getPluginPath () = + (try + map string PluginLoader#getInstance()#getPluginPath(); + catch UnsatisfiedLinkError e: + eprintln "Warning: Unable to obtain plugin path:\n\(e)"; + []; + yrt); + listPlugins () = (try map string PluginLoader#getInstance()#listPlugins(); @@ -198,6 +206,7 @@ processFile key output filename = process key output (af.open filename); { +get pluginPath = getPluginPath, get pluginKeys = listPlugins, loadPlugin, categoryOf,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vamprdf.yeti Mon Feb 25 22:11:38 2013 +0000 @@ -0,0 +1,39 @@ + +module vamprdf; + +vamp = load vamp; + +read = load yertle.read; +store = load yertle.store; + +import java.io: File; + +listVampRdfFiles () = + concat + (map do p: + map ((p ^ File#separator ^) . (.name)) + (filter do entry: + entry.file? and + (lc = strLower entry.name; + (strEnds? lc ".ttl") or + (strEnds? lc ".n3") or + (strEnds? lc ".nt")) + done (listDirectory false p)) + done (vamp.pluginPath)); + +loadVampRdfStore () = + (st = store.newStore (); + for (listVampRdfFiles ()) do file: + case read.loadTurtleFile st ("file://" ^ file) file of + OK (): (); + Error e: eprintln + "WARNING: Failed to load Vamp plugin RDF file \"\(file)\": \(e)"; + esac + done; + st); + +{ +get vampRdfFiles = listVampRdfFiles, +loadVampRdfStore, +} +
--- a/yetilab Wed Jan 30 09:42:00 2013 +0000 +++ b/yetilab Mon Feb 25 22:11:38 2013 +0000 @@ -2,6 +2,15 @@ MYDIR=`dirname $0` YETII_DIR=../yetii YETI_LIBDIR=${YETI_LIBDIR:=../yeti} -JVAMP_DIR=../jvamp -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JVAMP_DIR -YETI_MODULE_SOURCE_PATH=$YETI_LIBDIR/modules $JAVA_HOME/bin/java -classpath $YETI_LIBDIR/yeti.jar:$YETI_LIBDIR/yeti-lib.jar:$YETII_DIR/libreadline-java.jar:$YETII_DIR/yetii.jar:$JVAMP_DIR/jvamp.jar:./jtransforms-2.4.jar yeti.lang.compiler.yeti $YETII_DIR/yetii.yeti "$@" +if [ ! -d "$YETI_LIBDIR" ]; then + YETI_LIBDIR=../other/yeti +fi +JVAMP_DIR=${JVAMP_DIR:=../jvamp} +YERTLE_DIR=${YERTLE_DIR:=../yertle} + +YETI_MODULE_SOURCE_PATH=${YETI_LIBDIR}/modules \ + LD_LIBRARY_PATH=$YETII_DIR:$JVAMP_DIR:$LD_LIBRARY_PATH \ + $JAVA_HOME/bin/java -classpath \ + $YETII_DIR/yetii.jar:$YETI_LIBDIR/yeti.jar:$YETI_LIBDIR/yeti-lib.jar:$YETII_DIR/libreadline-java.jar:$JVAMP_DIR/jvamp.jar:$YERTLE_DIR/yertle.jar:./jtransforms-2.4.jar \ + com.particularprograms.yetii "$@" +