Monday, April 24, 2017

The sh createSesame2Repository.sh that works....

 Modify Sesame2URLDatabaseTransformer.java in the Sesame2Plugin folder.

replace the sesameServerPath, repositoryName, and path with desired strings.

public static void main(String[] args)
  {
    String sesameServerPath = "http://localhost:8080/openrdf-sesame/";
    String repositoryName = "isp";
   
    String path = "http://data.thespaceplan.com/isp.rdf";
    String baseURI = "";
    createDBFromURI(sesameServerPath, repositoryName, path, "RDF", baseURI);
  }

Compile it into Sesame2URLDatabaseTransformer.class using the library

openrdf-sesame-(version)-onejar.jar in the path





 Copy the resulting class file to Sesame2Plugin in the poweraqua folder with all the jar files in createSesame2Repository.sh . Specify the .jar file and class file locations in createSesame2Repository.sh .

Create the target respository isp

run sh createSesame2Repository.sh :



I have file directory mylib with the used files:

createSesame2Repository.sh   sesame2  Sesame2Plugin

sesame2 contains *.jar file , Sesame2Plugin contains *.class files

createSesame2Repository.sh contains:

cd /var/lib/tomcat7/webapps/poweraqua/myLib
CLASSPATH=$CLASSPATH:/var/lib/tomcat7/webapps/poweraqua/myLib/sesame2/openrdf-sesame-2.3-pr1-onejar.jar: ... .jar

export CLASSPATH

echo $CLASSPATH
java -Xmx1200M Sesame2Plugin.Sesame2URLDatabaseTransformer



No comments:

Post a Comment