You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Claude Warren <cl...@xenei.com> on 2012/12/26 22:26:58 UTC
TDB Assembler setup
I am working at creating an Assembler for the JenaSecurity package. I
have the assembler class working if I add
@prefix sec: <http://xenei.org/jena/security/Assembler#> .
<> ja:loadClass "org.xenei.jena.security.SecuredAssembler" .
sec:Model
rdfs:subClassOf ja:NamedModel ;
.
to the assembly TTL file. I would like to get this to work like the
TDB system does.
I looked through the TDB.init() code tracing from the
initialization1(), but I can't find where
tdb:GraphTDB rdfs:subClassOf ja:Model .
is added to the assembler graph when TDB initializes. Can anyone
point me to where this magic happens?
-- Claude
--
I like: Like Like - The likeliest place on the web
Identity: https://www.identify.nu/user.php?claude@xenei.com
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: TDB Assembler setup
Posted by Andy Seaborne <an...@apache.org>.
On 26/12/12 21:26, Claude Warren wrote:
> I am working at creating an Assembler for the JenaSecurity package. I
> have the assembler class working if I add
>
> @prefix sec: <http://xenei.org/jena/security/Assembler#> .
> <> ja:loadClass "org.xenei.jena.security.SecuredAssembler" .
> sec:Model
> rdfs:subClassOf ja:NamedModel ;
> .
>
> to the assembly TTL file. I would like to get this to work like the
> TDB system does.
>
> I looked through the TDB.init() code tracing from the
> initialization1(), but I can't find where
>
> tdb:GraphTDB rdfs:subClassOf ja:Model .
>
> is added to the assembler graph when TDB initializes. Can anyone
> point me to where this magic happens?
While most of the initialization is in TDB.init(), the triple:
> tdb:GraphTDB rdfs:subClassOf ja:Model .
isn't added that way - it's declared
e.g the Fuseki configuration file has:
--------
# TDB
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
--------
The subClassOf relationship get added by the assembler machinery itself
from the description.
The subClassOf relationships are only needed if the system is making a
compound structure (e.g. reasoner or general datatset) and needs a
ja:Model and it should, come from a TDB tdb:GraphTDB.
When making directly, e.g. the TDB assembling it's datasets from a
description, the code is looking for a tdb:DatasetTDB directly and so
subClass isn't needed.
When Fuskei is making a dataset, it wants a ja:RDFDataset so there the
subClassOf is needed.
Hope that makes sense,
Andy
>
> -- Claude
>
>