On 16/05/12 15:12, Carina Haupt wrote:
I sent the question without beeing suscribed to the list, so I did not
get any response. Could you perhaps resend his answer?
Sure:
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:[email protected] 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