You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Carina Haupt <ha...@bit.uni-bonn.de> on 2012/05/15 16:04:34 UTC
Jene Schemagen and Pav
Hi,
I am using the jena schemagen to convert my used vocabularies to Java,
but somehow I cannot convert the pav.owl file (http://purl.org/pav/)
completely. I just get the header, but none of the predicates or classes.
I run this command to create the Java files:
java -cp
lib/icu4j-3.4.4.jar:lib/jena-arq-2.9.0-incubating.jar:lib/jena-core-2.7.0-incubating.jar:lib/jena-iri-0.9.0-incubating.jar:lib/log4j-1.2.16.jar:lib/slf4j-api-1.6.4.jar:lib/slf4j-log4j12-1.6.4.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar
jena.schemagen -i pav.owl -o "./src" --package "de.test.vocabulary" --owl
Did somebody else ran into similar problems or can somebody even tell me
what I am doing wrong?
Best regards,
Carina
--
Carina Haupt
Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven
D-53754 Sankt Augustin
Tel.: +49 - 2241 - 14 - 3480
E-mail: carina.haupt@scai-extern.fraunhofer.de
Internet: http://www.scai.fraunhofer.de
and
Bonn-Aachen International Center for Information Technology (B-IT)
Dahlmannstrasse 2
D-53113 Bonn
E-mail: hauptc@informatik.uni-bonn.de
Internet: http://www.b-it-center.de
Re: Jene Schemagen and Pav
Posted by Marco Neumann <ma...@gmail.com>.
did you validate the owl file and does it come in an RDF/XML flavor or
n-triples?
On Tue, May 15, 2012 at 10:04 AM, Carina Haupt <ha...@bit.uni-bonn.de> wrote:
> Hi,
>
> I am using the jena schemagen to convert my used vocabularies to Java, but
> somehow I cannot convert the pav.owl file (http://purl.org/pav/) completely.
> I just get the header, but none of the predicates or classes.
> I run this command to create the Java files:
>
> java -cp
> lib/icu4j-3.4.4.jar:lib/jena-arq-2.9.0-incubating.jar:lib/jena-core-2.7.0-incubating.jar:lib/jena-iri-0.9.0-incubating.jar:lib/log4j-1.2.16.jar:lib/slf4j-api-1.6.4.jar:lib/slf4j-log4j12-1.6.4.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar
> jena.schemagen -i pav.owl -o "./src" --package "de.test.vocabulary" --owl
>
> Did somebody else ran into similar problems or can somebody even tell me
> what I am doing wrong?
>
> Best regards,
> Carina
>
> --
>
> Carina Haupt
>
> Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
> Schloss Birlinghoven
> D-53754 Sankt Augustin
>
> Tel.: +49 - 2241 - 14 - 3480
> E-mail: carina.haupt@scai-extern.fraunhofer.de
> Internet: http://www.scai.fraunhofer.de
>
> and
>
> Bonn-Aachen International Center for Information Technology (B-IT)
> Dahlmannstrasse 2
> D-53113 Bonn
>
> E-mail: hauptc@informatik.uni-bonn.de
> Internet: http://www.b-it-center.de
--
---
Marco Neumann
KONA
Join us at SemTech Biz in San Francisco June 3-7 2012 and save 15%
with the lotico community discount code 'STMN'
http://www.lotico.com/evt/SemTechSF2012/
Re: Jene Schemagen and Pav
Posted by Ian Dickinson <ia...@epimorphics.com>.
Hi Carina,
On 15/05/12 15:04, Carina Haupt wrote:
> I am using the jena schemagen to convert my used vocabularies to Java,
> but somehow I cannot convert the pav.owl file (http://purl.org/pav/)
> completely. I just get the header, but none of the predicates or classes.
> I run this command to create the Java files:
>
> Did somebody else ran into similar problems or can somebody even tell me
> what I am doing wrong?
schemagen is picking a namespace for your ontology, and is defaulting to
the value of the xmlns: attribute:
<rdf:RDF xmlns="&pav;2.0/"
xml:base="&pav;2.0/"
Hence http://purl.org/pav/2.0/
However, all of your declarations are actually in a non-versioned namespace:
xmlns:pav="http://purl.org/pav/"
So you need to tell schemagen to use the right namespace with -a, or
change your file so that the namespaces are consistent. I ran:
$JENA_HOME/bin/schemagen -i pav.owl -o "./src" --package
"de.test.vocabulary" --owl -a http://purl.org/pav/
.. and it did seem to generate what you are expecting.
You might also want to add --ontology to get OntProperty, OntClass, etc,
declarations generated in your output file, but that's a matter of
personal preference.
Ian
--
____________________________________________________________
Ian Dickinson Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com http://www.epimorphics.com
cell: +44-7786-850536 landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd. is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
Portishead, Bristol BS20 6PT, UK