Re: Jena infer example

Hi Andy,


I thought about the jena list, but since someone recently posted inquiring about a command-line tools for inferring, I'm hoping this is relevant to other subscribers.


Your response doesn't my question just yet.  I know what RDFS is, :-), but I don't know what are valid values for VOCAB,


E.g.,


C:\Programs\apache-jena-3.1.0>infer
Required argument missing: --rdfs

C:\Programs\apache-jena-3.1.0>infer --rdfs
java.lang.IllegalArgumentException: No value for argument: rdfs
        at jena.cmd.CmdLineArgs.addArgWorker(CmdLineArgs.java:133)
        at jena.cmd.CmdLineArgs.addArg(CmdLineArgs.java:122)
        at jena.cmd.CmdLineArgs$ArgProcessor.arg(CmdLineArgs.java:407)
        at jena.cmd.CommandLineBase.lambda$apply$0(CommandLineBase.java:54)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
        at java.util.stream.IntPipeline$Head.forEach(IntPipeline.java:557)
        at jena.cmd.CommandLineBase.apply(CommandLineBase.java:54)
        at jena.cmd.CmdLineArgs.process(CmdLineArgs.java:52)
        at jena.cmd.CmdArgModule.process(CmdArgModule.java:44)
        at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
        at riotcmd.infer.main(infer.java:92)

C:\Programs\apache-jena-3.1.0>infer --rdfs x
org.apache.jena.riot.RiotNotFoundException: Not found: x
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:836)
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:820)
        at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:664)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:212)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:145)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:134)
        at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:282)
        at org.apache.jena.util.FileManager.loadModelWorker(FileManager.java:305)
        at org.apache.jena.util.FileManager.loadModel(FileManager.java:258)
        at riotcmd.infer.processModulesAndArgs(infer.java:121)
        at jena.cmd.CmdArgModule.process(CmdArgModule.java:52)
        at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
        at riotcmd.infer.main(infer.java:92)

C:\Programs\apache-jena-3.1.0>infer --rdfs OWLmicro
org.apache.jena.riot.RiotNotFoundException: Not found: OWLmicro
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:836)
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:820)
        at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:664)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:212)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:145)
        at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:134)
        at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:282)
        at org.apache.jena.util.FileManager.loadModelWorker(FileManager.java:305)
        at org.apache.jena.util.FileManager.loadModel(FileManager.java:258)
        at riotcmd.infer.processModulesAndArgs(infer.java:121)
        at jena.cmd.CmdArgModule.process(CmdArgModule.java:52)
        at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
        at riotcmd.infer.main(infer.java:92)

C:\Programs\apache-jena-3.1.0>



What values can I put in for VOCAB?


 -Mark



________________________________
From: Andy Seaborne <andy@apache.org>
Sent: Sunday, October 2, 2016 5:58:13 PM
To: semantic-web@w3.org
Subject: Re: Jena infer example



On 02/10/16 21:35, Mark Wallace wrote:
> Can someone provide a sample invocation of Jena's infer command?

Probably better on the users@jena.apache.org mailing list.

>  Documentation [1] says this:
>
>
> riotcmd.infer --rdfs VOCAB FILE FILE ...
>
>
> but doesn't give example examples of what VOCAB is.

The RDFS schema - subclass, subproperty range and domain declarations.

It is applied to FILEs to produce a stream of output of ground and
inferred data.

        Andy

Received on Monday, 3 October 2016 13:16:14 UTC