1

I have generated an owl file using this generator http://swat.cse.lehigh.edu/projects/lubm/

I want to transform the file in N-triples and have done it before using

$ riot -out N-TRIPLE ~/lubm20/*.owl > lubm20.nt

for some reason now I get an empty file (lubm20.nt)

and when I use

$ rdfcat -out N-TRIPLE ~/lubm20/*.owl > lubm20.nt

I get this error

Exception in thread "main" org.apache.jena.riot.RiotException: <file:///root/lubm20/classes\University0_0.owl> Code: 4/UNWISE_CHARACTER in PATH: The character matches no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
at org.apache.jena.riot.s5ystem.IRIResolver.exceptions(IRIResolver.java:371)
at org.apache.jena.riot.system.IRIResolver.resolve(IRIResolver.java:328)
at org.apache.jena.riot.system.IRIResolver$IRIResolverSync.resolve(IRIResolver.java:489)
at org.apache.jena.riot.system.IRIResolver.resolveIRI(IRIResolver.java:254)
at org.apache.jena.riot.system.IRIResolver.resolveString(IRIResolver.java:233)
at org.apache.jena.riot.SysRIOT.chooseBaseIRI(SysRIOT.java:109)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:286)
at org.apache.jena.util.FileManager.readModel(FileManager.java:341)
at jena.rdfcat.readInput(rdfcat.java:328)
at jena.rdfcat$ReadAction.run(rdfcat.java:473)
at jena.rdfcat.go(rdfcat.java:231)
at jena.rdfcat.main(rdfcat.java:206)

The generator would generate a well known semantic web benchmark dataset so how can it have

UNWISE_CHARACTER s?

edit: for the question asked I used this line to generate the *.owl files

java edu.lehigh.swat.bench.uba.Generator -onto http://swat.cse.lehigh.edu/onto/univ-bench.owl univ 20

then moved the *.owl files to lubm20 folder

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
zaranaid
  • 65
  • 1
  • 13
  • Are you sure that the folder is not empty and there are files ending with `.owl`? – UninformedUser Jul 28 '17 at 03:57
  • 1
    For the second problem, the `\` is not allowed and indeed indicates some problems in your system. How did you generate the data? I'm asking because it looks like the URI was generated relative to your filesystem, i.e. no base URI was given. And for Linux you can see at http://swat.cse.lehigh.edu/projects/lubm/ that there was a fix for the file path problem: [Linux file path fix](http://swat.cse.lehigh.edu/projects/lubm/GeneratorLinuxFix.zip) – UninformedUser Jul 28 '17 at 03:59

1 Answers1

2

I used rdf2rdf instead of jena

java -jar rdf2rdf-1.0.1-2.3.1.jar /lubmData/lubm100/*.owl lubm100.nt

worked like a charm

enter link description here

zaranaid
  • 65
  • 1
  • 13