jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <andy.seabo...@epimorphics.com>
Subject Re: Multiple TDB's in one assembly?
Date Tue, 01 Feb 2011 14:55:53 GMT
yes - when you give it an assembler file on the command line, it needs 
to know which thing you are talking about and it does that via rdf:type. 
   There can be only one.

If you're calling assembler code directly, it's possible to set the 
resource root - but in --desc there isn't this choice  (e.g. Joseki)

	Andy

On 01/02/11 14:43, Benson Margulies wrote:
> Using the sparql command (and some trickery to get tdb into the classpath):
>
> @prefix tdb:<http://jena.hpl.hp.com/2008/tdb#>  .
> @prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>  .
> @prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
> @prefix ja:<http://jena.hpl.hp.com/2005/11/Assembler#>  .
>
> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
> tdb:GraphTDB    rdfs:subClassOf  ja:Model      .
>
> <#dataset>  rdf:type         tdb:DatasetTDB ;
>      tdb:location "/users/benson/data/1k_news.tdb" ;
>      .
>
> <#dataset2>  rdf:type         tdb:DatasetTDB ;
>      tdb:location "/users/benson/data/1k_news.cleaned.tdb" ;
>      .
>
>
>
> com.hp.hpl.jena.sparql.ARQException: More than one: var ?root
> 	at com.hp.hpl.jena.sparql.util.QueryExecUtils.getOne(QueryExecUtils.java:329)
> 	at com.hp.hpl.jena.sparql.util.graph.GraphUtils.findRootByType(GraphUtils.java:179)
> 	at com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:80)
> 	at arq.cmdline.ModAssembler.create(ModAssembler.java:55)
> 	at arq.cmdline.ModDatasetAssembler.createDataset(ModDatasetAssembler.java:31)
> 	at arq.cmdline.ModDatasetGeneralAssembler.createDataset(ModDatasetGeneralAssembler.java:21)
> 	at arq.cmdline.ModDataset.getDataset(ModDataset.java:22)
> 	at arq.query.getDataset(query.java:100)
> 	at arq.query.queryExec(query.java:114)
> 	at arq.query.exec(query.java:91)
> 	at arq.cmdline.CmdMain.mainMethod(CmdMain.java:85)
> 	at arq.cmdline.CmdMain.mainRun(CmdMain.java:47)
> 	at arq.cmdline.CmdMain.mainRun(CmdMain.java:34)
> 	at arq.query.main(query.java:49)
> 	at arq.sparql.main(sparql.java:15)

Mime
View raw message