You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2017/10/19 13:23:54 UTC
svn commit: r1812641 -
/jena/site/trunk/content/documentation/tdb/datasets.mdtext
Author: rvesse
Date: Thu Oct 19 13:23:54 2017
New Revision: 1812641
URL: http://svn.apache.org/viewvc?rev=1812641&view=rev
Log:
Contributions from Greg Albiston
Modified:
jena/site/trunk/content/documentation/tdb/datasets.mdtext
Modified: jena/site/trunk/content/documentation/tdb/datasets.mdtext
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb/datasets.mdtext?rev=1812641&r1=1812640&r2=1812641&view=diff
==============================================================================
--- jena/site/trunk/content/documentation/tdb/datasets.mdtext (original)
+++ jena/site/trunk/content/documentation/tdb/datasets.mdtext Thu Oct 19 13:23:54 2017
@@ -65,5 +65,22 @@ The RDF merge of all named graph can be
`urn:x-arq:UnionGraph` using
`Dataset.getNamedModel("urn:x-arq:UnionGraph")` .
+## Dataset Inferencing
+Inferencing on a Model in a Dataset, using the [TDB Java API](java_api.html), follows the same pattern as an in-memory InfModel.
+The use of [TDB Transactions](tdb_transactions.html) is **strongly** recommended to avoid data corruption.
+ //Open TDB Dataset
+ String directory = ...
+ Dataset dataset = TDBFactory.createDataset(directory);
+
+ //Retrieve Named Graph from Dataset, or use Default Graph.
+ String graphURI = "http://example.org/myGraph";
+ Model model = dataset.getNamedModel(graphURI);
+
+ //Create RDFS Inference Model, or use other Reasoner e.g. OWL.
+ InfModel infModel = ModelFactory.createRDFSModel(model);
+
+ ...
+ //Perform operations on infModel.
+ ...
\ No newline at end of file