Getting Started with RVL ...
Scripts for doing most of the tasks below can be found in the scripts folder.
- Java 1.7 (code generation will currently fail with Java 1.8)
- A webserver for the D3-based GUI (rvl-d3vis module)
- (Tomcat or another web container if you don't want to use the embedded server)
- Check out (or fork and checkout) the RVL repository.
- Check out the VISO repository (try this fork if the latest changes necessary for RVL are not yet in the main repository)
- Install the viso-ontology to your maven repository:
export MAVEN_OPTS="-Xmx2048M" cd /path/to/your/viso-ontology/ mvn clean install -DskipTest
- Install the vocabulary and the RVL/VISO API
export MAVEN_OPTS="-Xmx2048M" cd /path/to/your/rvl/main/folder/ cd rvl-vocabulary mvn clean install -DskipTests cd ../rvl-codegen mvn clean install -DskipTests cd ../rvl-gen-api mvn clean install -DskipTests
- Install the tooling
export MAVEN_OPTS="-Xmx2048M" cd /path/to/your/rvl/main/folder/ mvn clean install -DskipTests
- Run the tests ...
- ... all tests in the package org.purl.rvl.example.basic (rvl-process module); this will test the basic features of RVL:
export MAVEN_OPTS="-Xmx2048M" cd rvl-process mvn test
- ... additional tests in the package org.purl.rvl.example (rvl-example module); this will run a set of additional example visualisations:
export MAVEN_OPTS="-Xmx2048M" cd rvl-example mvn test
- Save a "semvis.properties" file to the root of your file system (/semvis.properties) by copying "semvis.properties.template" from the "commons" projects and make it readable.
Deploy and Start
- Deploy the rvl-server to, e.g., Tomcat (assuming Tomcat is located at
export MAVEN_OPTS="-Xmx2048M" cd rvl-server mvn war:war -DskipTests rm /Library/Tomcat/webapps/semvis.war rm -R /Library/Tomcat/webapps/semvis cd target cp -pr semvis.war /Library/Tomcat/webapps
- Alternatively, to start the backend with the embedded server:
export MAVEN_OPTS="-Xmx2048M" cd rvl-server mvn exec:java
- Open the d3.js frontend via a webserver e.g., by creating a symlink:
ln -s /<your-path-to-rvl>/rvl-d3vis/src/main/resources semvis
- Also for local testing the frontend must be accessed from a web server due to access restrictions to local files (e.g. in Firefox), just opening the html files won't work!
Only required, when changing RVL/VISO or the code generator:
Generate JAVA classes from RVL and VISO by running VISOapiGenerator and RVLapiGenerator:
New API-source code will be be generated at "src/main/java/org/purl/rvl/java/gen" in the rvl-gen-api module and overwrite the existing code that is under version control
Refresh the views of your IDE to show the generated code if necessary
- Temporary files are written to the default Java temporary directory (System property "java.io.tmpdir"), which usually should be "$TOMCAT_HOME/temp".
- Check again if you installed VISO to your maven repository
- Make sure the semvis.properties file is readable by Tomcat (if you use this file)
On errors after generating the RVL/VISO code:
- On errors (e.g. Collection instead of List parameter generated in RVL code )
- Make sure to update your maven repository in order to have the correct RDF-Generator (5.0.1 is out now on maven central, but use 4.8.3 for now, 5.0.1 creates slightly different code)
- If this doesn't help remove "org/semweb4j" from your local maven repository (USER_HOME/".m2" directory) and try deleting the generated RVL code.
- Make sure you are NOT using the Oracle Java 1.8 JDK, the velocity templating used by RDF-Generator seems to have trouble with this (concurrent modification exception). Use the JDK for 1.7 instead (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html). Make sure maven is using the correct JAVA (JAVA_HOME needs to be set correctly for all maven calls, the best is to define it in $HOME/.mavenrc (not .m2/...!)
- Using JDK 1.6 errors like unsupported major minor version may occur --> make sure the run-configuration is using JDK 1.7. Maven-update-projects will set the project settings to the settings from the POM! JDK 1.6 may also generate the wrong list class (Imac, lion), though this seems to happen as well for JDK 1.7 sometimes. Manually fixing (see next step and regenerating the RVL code helps somehow)
- The generated code needed to be fixed manually in older versions, check if similar problems reoccur:
- The generated class org.purl.rvl.java.gen.rvl.PropertyMapping had to changed to extend org.purl.rvl.java.gen.rvl.Mapping
- When using (customized) file logging, make sure the folder for the log files exists (currently "log/")
After adding new Symbols to symbols.svg
- Make sure your browser does not cache an older version of
symbols.svgby opening the file separately with your browser