Monday, April 24, 2017

Modifying the shell script to create a new Sesame Repository in PowerAqua

cat createSesame2Repository.sh | sed -e 's/projects\/BTCPowerAquaNetBeans\/myLib\/sesame2\/lib//g' | sed -e 's/\/Users\/vl474\/Trabajo\/NetBeans\\ /\/var\/lib\/tomcat7\/webapps\/poweraqua\/myLib\/sesame2/g'

Following: http://stackoverflow.com/questions/8084926/including-jar-files-in-class-path

This script calls:
https://github.com/bshambaugh/PowerAqua-decompiled/blob/master/aquaplugins/Sesame2Plugin/Sesame2URLDatabaseTransformer.java

It utilizes Sesame:

import org.openrdf.model.Resource;
import org.openrdf.repository.Repository;
import org.openrdf.repository.RepositoryConnection;
import org.openrdf.repository.http.HTTPRepository;
import org.openrdf.rio.RDFFormat;

This should come from(?):
openrdf-sesame-(version)-onejar.jar.

as described in:
http://graphdb.ontotext.com/sesame/users/ch02.html

Lines 121 - 129 in Sesame2URLDatabaseTransformer.java are telling:

public static void main(String[] args)
{
String sesameServerPath = "http://kmi-web03:8080/openrdf-sesame/";
String repositoryName = "evoont-seals_10000K_final";
String path = "http://kmi.open.ac.uk/technologies/poweraqua/evoont-seals_10000K_final.owl";
String baseURI = "";
createDBFromURI(sesameServerPath, repositoryName, path, "RDF", baseURI);
}

This tells me that I need to specify where the ontology is hosted with the String path.

The sesameServerPath will be where my Sesame Server is.

The repositoryName will be the name of my repository.

Compare sesameServerPath and repositoryName with service_properties.xml in https://github.com/bshambaugh/PowerAqua-decompiled/blob/master/service_properties.xml .

Note that the sesameServerPath is like <SERVER> and sesameServerPath + repositoryName is like <REPOSITORY_NAME>.


Also change the script to replace sesame*.jar and everything else in not-needed with:



http://grepcode.com/snapshot/repo1.maven.org/maven2/org.slf4j/slf4j-jdk14/1.5.0
https://www.slf4j.org/manual.html

1 comment:

  1. http://stackoverflow.com/questions/8084926/including-jar-files-in-class-path

    ReplyDelete