Return-Path: Delivered-To: apmail-incubator-jena-users-archive@minotaur.apache.org Received: (qmail 37766 invoked from network); 10 Dec 2010 14:38:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Dec 2010 14:38:02 -0000 Received: (qmail 2262 invoked by uid 500); 10 Dec 2010 14:38:02 -0000 Delivered-To: apmail-incubator-jena-users-archive@incubator.apache.org Received: (qmail 2238 invoked by uid 500); 10 Dec 2010 14:38:02 -0000 Mailing-List: contact jena-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jena-users@incubator.apache.org Delivered-To: mailing list jena-users@incubator.apache.org Received: (qmail 2230 invoked by uid 99); 10 Dec 2010 14:38:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 14:38:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.222.232.116] (HELO charlie.justhostme.co.uk) (83.222.232.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 14:37:55 +0000 Received: from 82-69-1-248.dsl.in-addr.zen.co.uk ([82.69.1.248] helo=[192.168.1.63]) by charlie.justhostme.co.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PR46H-0002Uq-Bh for jena-users@incubator.apache.org; Fri, 10 Dec 2010 14:37:33 +0000 Message-ID: <4D023B2A.1020000@epimorphics.com> Date: Fri, 10 Dec 2010 14:37:30 +0000 From: Andy Seaborne User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: jena-users@incubator.apache.org Subject: TDB References: <4D0115A3.7090700@epimorphics.com> <4D01EF97.3000600@epimorphics.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - charlie.justhostme.co.uk X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - epimorphics.com On 10/12/10 13:02, Benson Margulies wrote: > On to TDB. > > How are named graphs mapped into the Jena API? > > Does creating a named Ontology model (OntModel m = > ModelFactory.createOntologyModel(spec, maker, baseModel);) do the job? > > THis page (http://openjena.org/wiki/TDB/Datasets) comes close but does > quite answer the question. In TDB, you don't need to create a graph as such - you just need to get a handle to a model: Model m = dataset.getNamedModel("http://example/graph157") ; You can wrap that in an OntModel OntModel ontModel = ModelFactory.createOntologyModel(spec, base) ; If you update with SPARQL Update, you can just INSERT DATA { GRAPH { ...triples... } } Andy