<https://crosschx.slack.com/archives/D01BC93UUCS/p1606141163002200>Hi all-

I'm hoping to be able to use assembler files to maintain a library of resources that can later be indexed into TDB2, but I think there's something I'm not getting.

See the appendix below for my minimal config file.

It's my understanding that I should be able to do this:

Dataset ds = TDB2Factory.assembleDataset("path/to/mini-config.ttl") ;

Then run this query against ds:

Select * where {?s ?p ?o.}

And get the triple I encoded with a literalContent statement.

When I run this, the assembleDataset operation does indeed construct the tdb repo at the indicated location, but the query returns nothing.Is there some extra step I need to do that I'm missing?

Thanks,


# APPENDIX:mini-config.ttl

@prefix tdb: <http://jena.apache.org/2016/tdb#>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] ja:loadClass "org.apache.jena.tdb2.TDB2" .
tdb:DatasetTDB2 rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB2    rdfs:subClassOf  ja:Model .

<#MyTDBDataset> a tdb:DatasetTDB2;
    tdb:location "DB" ;
    .

<#MyGraph> a tdb:GraphTDB2;
    rdfs:comment "A graph with a single triple" ;
    tdb:dataset <#MyTDBDataset>;
    ja:content [ja:literalContent "<http://eg.com/a> <http://eg.com/b> <http://eg.com/c>."] ;
    .


Reply via email to