WebVOWL
WebVOWL copied to clipboard
How to change the default ontology in the server
The instructions for using the docker image here tell us to point the docker container's /data directory to our own directory of OWL files, and then indicates that WebVOWL will automatically run and OWL to JSON translator.
However, when I start up as instructed:
$ docker run --name container-webvowl -v `pwd`:/data -p 8080:8080 -d rpgoldman/webvowl
2f7d04f213a9f7784dd25f6702e6fefcd4ab1eda471a9801d0cef59421c9081a
I see the FOAF ontology when I open localhost:8080. When I connect to the docker container and list the contents of /data, I see this:
# ls /data
BBN Containers.xlsx container-ontology.omn query_types.py
Makefile container-ontology.ttl robot.out
Strateos containers.xlsx examples sbolowl3.rdf
absolute-om-symbols.txt om-2.0.omn server-files
all-catalogs.ttl om-subset.omn server.log
bbn-plate-catalog.ttl om-subset.ttl strateos-catalog.ttl
capabilities.owl om-symbols.txt strateos_containers_with_ids.csv
catalog-v001.m4 owlery-catalog.xml test
catalog-v001.xml owlery-conf uml.ttl
container-ontology-hierarchy.graph paml.ttl
As you can see, no JSON files have been created (I suppose they could have been created and put somewhere else).
I looked around for JSON files and found the following:
/usr/local/tomcat # find . -name '*.json'
./webapps/ROOT/WEB-INF/classes/static/data/new_ontology.json
./webapps/ROOT/WEB-INF/classes/static/data/foaf.json
./webapps/ROOT/WEB-INF/classes/static/data/template.json
./webapps/ROOT/WEB-INF/classes/static/data/ontovibe.json
./webapps/ROOT/WEB-INF/classes/static/data/sioc.json
./webapps/ROOT/WEB-INF/classes/static/data/muto.json
./webapps/ROOT/WEB-INF/classes/static/data/personasonto.json
./webapps/ROOT/WEB-INF/classes/static/data/goodrelations.json
Further checking at the root of the container's filesystem shows that these are the only .json files in the container.
At least part of what's wrong seems to be that the start.sh file contains:
JAR_CMD=/usr/local/lib/OWL2VOWL.jar
but in the container:
/usr/local/tomcat # ls /usr/local/lib
/usr/local/tomcat #
so this jar file is not installed:
/usr/local/tomcat # find / -name OWL2VOWL.jar
/usr/local/tomcat #
Another confusion is that there are two Dockerfiles, one at the root and one located at doc/Docker/Dockerfile. I tried building the docker image with this file instead, but when I do that, I just get the Tomcat page: it looks like the application has not properly initialized. Connecting to the container I see that OWL2VOWL.jar is present in /usr/local/lib, but still there are no .json files in /data. There's nothing in the Docker logs, either:
Tomcat started.
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
Any suggestions? Happy to submit a PR to make the documentation more clear, if that's of interest. I suspect there's some configuration file that I should be modifying, but I have no idea what that would be.
Thanks!
Here's at least part of the problem:
$ cat webvowl.war
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://web1.java-webspace.net:4443webvowl_1.1.7.war">here</a>.</p>
<hr>
<address>Apache Server at downloads.visualdataweb.de Port 80</address>
</body></html>
So this line in doc/Docker/Dockerfile is too permissive:
curl -O http://downloads.visualdataweb.de/webvowl_${version}.war
It should be modified to error out if it does not get a 200, or possibly to follow the forwarding, but definitely not accept a redirect page as the warfile...
OK, when I downloaded this myself and changed the Dockerfile to COPY the warfile to /usr/local/tomcat/webapps/, it almost works, but:
- I have to open
localhost:8080/webvowlnot justlocalhost:8080, which just gives me the Tomcat main screen. - I still get the page opening with the FOAF ontology instead of my ontology
- There are still no json files created in
/data.
So any help you could offer would be much appreciated.
So actually, it looks to me as if the set of ontologies in the server is hardcoded in WEB-INF/classes/static/index.html, rather than appearing in any configuration file. Is that correct?