On Thu, Mar 14, 2013 at 12:41 PM, Pascal Heus <[email protected]> wrote:
> Hi:
>
> New to Jena & RDF and trying to use schemagen to convert the SKOS schema
> available at
> http://www.w3.org/TR/skos-reference/skos.rdf
> into Java classes.
>
> But am a bit confused but the tool options....
>
> If I go to the home page at:
> http://jena.apache.org/documentation/tools/schemagen.html
> I see a long list of options and examples like Java jena.schemagen -i
> myvocab.owl --ontology --uppercase
>
> But when I run the schemagen command line tool, the options seem to be
> quite different and I can't seem to provide a rdf file as input:
> Usage: schemagen [-options ...] <java files>
> Options:
>     -d <path>         :  specify where to place processor and javac
> generated class files
>     -cp <path>        :  specify where to find user specified files
>     -classpath <path> :  specify where to find user specified files
>     -episode <file>   :  generate episode file for separate compilation
>     -version          :  display version information
>     -help             :  display this usage message
>
> Are these the same tools?
> Any help / suggestion would be appreciated.

There's a tool called schemagen that is not Jena's schemagen.  I have it too:

$ which schemagen
/usr/bin/schemagen
$ schemagen -fullversion
schemagen full version "2.2.4-2"
$ schemagen -help
Usage: schemagen [-options ...] <java files>
Options:
    -d <path>             : specify where to place processor and javac
generated class files
    -cp <path>            : specify where to find user specified files
    -classpath <path>     : specify where to find user specified files
    -encoding <encoding>  : specify encoding to be used for apt/javac
invocation
    -episode <file>       : generate episode file for separate compilation
    -version              : display version information
    -fullversion          : display full version information
    -help                 : display this usage message

What you want is Jena's schemagen.  I've got Jena 2.7.4 installed
under usr/lib/, thus:

$ /usr/local/lib/apache-jena-2.7.4/bin/schemagen
Usage:
  java jena.schemagen [options ...]

Commonly used options include:
   -i <input> the source document as a file or URL.
   -n <name> the name of the created Java class.
   -a <uri> the namespace URI of the source document.
   -o <file> the file to write the generated class into.
   -o <dir> the directory in which the generated Java class is created.
            By default, output goes to stdout.
   -e <encoding> the encoding of the input document (N3, RDF/XML, etc).
   -c <config> a filename or URL for an RDF document containing
               configuration parameters.

Many other options are available. See the schemagen HOWTO in the
Jena documentation for full details.


Hope this helps,
//JT
-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to