rhizomik/redefer-xsd2owl

Is XSD2OWL still actively maintained?

Opened this issue · 9 comments

Hello.
I am working on a project that will involve conversion of XML-schema metadata to RDF and OWL and am considering incorporating ReDeFer-XSD2OWL into the project.
It looks like there have been no new commits in two years.
Is anyone still actively maintaining the project?
Are newer versions being managed elsewhere?

Hello, not currently under development but we will try to address any issues identified

Hello again.

I have been trying to use XSD2OWL.
The version hosted at appears to work correctly, but I was not able to run the servlet cloned from your GitHub repository.
Specifically, from the directory containing the pom.xml file, I tried running

adamcraig$ mvn exec:java -Dexec.mainClass="net.rhizomik.redefer.xsd2owl.XSD2OWLServlet" -Dexec.args="/[path to XSD file]/nexusroot.xsd"
which produced the output
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for ReDeFer:redefer-services:war:0.1 [WARNING] 'dependencies.dependency.systemPath' for com.openlink.virtuoso:virtuoso-jena:jar should not point at files within the project directory, ${basedir}/src/main/resources/lib/virt_jena.jar will be unresolvable by dependent projects @ line 134, column 16 [WARNING] 'dependencies.dependency.systemPath' for com.openlink.virtuoso:virtuoso-jdbc-3:jar should not point at files within the project directory, ${basedir}/src/main/resources/lib/virtjdbc3.jar will be unresolvable by dependent projects @ line 142, column 16 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ReDeFer 0.1 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for woodstox:wstx-asl:jar:3.0.0 is missing, no dependency information available [INFO] [INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ redefer-services --- [WARNING] java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 13 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.175 s [INFO] Finished at: 2017-02-11T20:06:45+02:00 [INFO] Final Memory: 11M/114M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project redefer-services: An exception occured while executing the Java class. javax/servlet/http/HttpServlet: javax.servlet.http.HttpServlet -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Adam-Craigs-MacBook:ReDeFer adamcraig$
It continues to give this error even though I have added the correct version, 2.4, of the servlet-api JAR to src/main/java/lib/ and added it to the local Maven repository with
mvn install:install-file -Dfile="/[rest of path]/redefer/ReDeFer/src/main/java/lib/servlet-api-2.4.jar" -DgroupId=javax.servlet -DartifactId=servlet-api -Dversion=2.4 -Dpackaging=jar
I have checked that it does contain javax/servlet/http/HttpServlet.class.

Please provide instructions as to how to build and run the XSD2OWL without errors or warnings.

XSD2OWL is available as a Java Servlet and thus it cannot be directly executed like a Java Application. As detailed in the README the code should be compiled and packaged as a WAR and then deployed to a Servlet Container like Tomcat (just copy the WAR file in the "webapps" folder, then start Tomcat)

We have as future work to distribute the XSD2OWL as a microservice and provide a Docker image. However, we will need some weeks to have it available in this more usable forms

Thanks again for your help.
I was able to follow your instructions and get it to work, but I do still get some compiler warnings:
`$ mvn clean package

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective model for ReDeFer:redefer-services:war:0.1

[WARNING] 'dependencies.dependency.systemPath' for com.openlink.virtuoso:virtuoso-jena:jar should not point at files within the project directory, ${basedir}/src/main/resources/lib/virt_jena.jar will be unresolvable by dependent projects @ line 134, column 16

[WARNING] 'dependencies.dependency.systemPath' for com.openlink.virtuoso:virtuoso-jdbc-3:jar should not point at files within the project directory, ${basedir}/src/main/resources/lib/virtjdbc3.jar will be unresolvable by dependent projects @ line 142, column 16

[WARNING]

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING]

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING]

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building ReDeFer 0.1

[INFO] ------------------------------------------------------------------------

[WARNING] The POM for woodstox:wstx-asl:jar:3.0.0 is missing, no dependency information available

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ redefer-services ---

[INFO] Deleting /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ redefer-services ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 7 resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ redefer-services ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

[INFO] Compiling 74 source files to /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/target/classes
[WARNING] /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/src/main/java/lib/jaf-1.0.2/demo/CompViewer.java: Some input files use or override a deprecated API.

[WARNING] /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/src/main/java/lib/jaf-1.0.2/demo/CompViewer.java: Recompile with -Xlint:deprecation for details.
[WARNING] /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/src/main/java/net/rhizomik/redefer/xml2rdf/XSD2OWLMapper.java: Some input files use unchecked or unsafe operations.

[WARNING] /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/src/main/java/net/rhizomik/redefer/xml2rdf/XSD2OWLMapper.java: Recompile with -Xlint:unchecked for details.

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ redefer-services ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 1 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ redefer-services ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

[INFO] Compiling 3 source files to /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/target/test-classes

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ redefer-services ---

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ redefer-services ---

[INFO] Packaging webapp

[INFO] Assembling webapp [redefer-services] in [/Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/target/redefer-services-0.1]

[INFO] Processing war project

[INFO] Copying webapp resources [/Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/src/main/webapp]

[INFO] Webapp assembled in [29156 msecs]

[INFO] Building war: /Users/adamcraig/BrainHealthAllianceMaterials/XSD2RDFTest/redefer/ReDeFer/target/redefer-services-0.1.war

[INFO] WEB-INF/web.xml already added, skipping

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 02:21 min

[INFO] Finished at: 2017-02-18T00:50:23+02:00

[INFO] Final Memory: 21M/245M

[INFO] ------------------------------------------------------------------------`

Most warnings should be unharmful, they are due to old dependencies XSD2OWL depends on.

Again, thanks for your help, but I am still encountering some issues with XSD2OWL.
When I try to open the generated ontology in Protégé, it produces several errors:
`...
Level: WARN
Time: 1488131555498
Message: Cannot generate ontology catalog for ontology at http://www.semanticweb.org/adam/ontologies/2017/1/untitled-ontology-2
...
Level: WARN
Time: 1488131700871
Message: Cannot generate ontology catalog for ontology at http://www.semanticweb.org/adam/ontologies/2017/1/untitled-ontology-3
...
Level: ERROR
Time: 1489248649446
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error1 for type Class

Level: ERROR
Time: 1489248649461
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error2 for type Class

Level: ERROR
Time: 1489248649462
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error3 for type Class
...
Level: ERROR
Time: 1489248649548
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error98 for type Class

Level: ERROR
Time: 1489248649549
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error99 for type Class

Level: ERROR
Time: 1489248649549
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error100 for type Class
...
Level: ERROR
Time: 1489857261956
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error101 for type Class

Level: ERROR
Time: 1489857261969
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error102 for type Class

Level: ERROR
Time: 1489857261970
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error103 for type Class
...
Level: ERROR
Time: 1489857261999
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error198 for type Class

Level: ERROR
Time: 1489857262000
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error199 for type Class

Level: ERROR
Time: 1489857262000
Message: Entity not properly recognized, missing triples in input? http://org.semanticweb.owlapi/error#Error200 for type Class
...
Level: WARN
Time: 1489857262197
Message: OBDA model couldn't be loaded because no .obda file exists in the same location as the .owl file

Level: INFO
Time: 1489857262266
Message: Loading for ontology and imports closure successfully completed in 33080 ms

Level: INFO
Time: 1489857262269
Message:

`
Also, is there any chance you will be developing a C# implementation of XSD2OWL?

Please, would it be possible to share here or directly through email to roberto@rhizomik.net the resulting ontology? It would also be helpful to know the Protégé version and the steps followed to load the ontology into the editor. For instance, one complaint is about and OBDA file that seems just relevant when loading data from a relational database.

Finally, in relation with the XSD2OWL implementation, it is basically based on an XSLT transformation. The Java part is just to make it available as a Web service. Consequently, if the aim is to integrate it into a C# program, you just need an XSLT engine for C# and to pass it the input XSD to get the OWL ontology.