You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2021/09/26 08:44:40 UTC

[jena-site] branch propfunc created (now 95dcb28)

This is an automated email from the ASF dual-hosted git repository.

andy pushed a change to branch propfunc
in repository https://gitbox.apache.org/repos/asf/jena-site.git.


      at 95dcb28  Remove text about writing to other graphs

This branch includes the following new commits:

     new 95dcb28  Remove text about writing to other graphs

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[jena-site] 01/01: Remove text about writing to other graphs

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch propfunc
in repository https://gitbox.apache.org/repos/asf/jena-site.git

commit 95dcb2818b5b5a99ba7ff1d8b7b228de77b429b8
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Sun Sep 26 09:44:29 2021 +0100

    Remove text about writing to other graphs
---
 source/documentation/query/writing_propfuncs.md | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/source/documentation/query/writing_propfuncs.md b/source/documentation/query/writing_propfuncs.md
index 006b06f..ecf0051 100644
--- a/source/documentation/query/writing_propfuncs.md
+++ b/source/documentation/query/writing_propfuncs.md
@@ -134,22 +134,21 @@ Note that it can make a lot of sense to generate the `Iterator<Binding>` for `Qu
 
 Additional operations on the current, or another, Graph can be achieved through the Execution Context.
 Once retrieved the Graph can be operated upon directly, queried or wrapped in a Model, if preferred.
-New Triples or Graphs can therefore be created as part of the Property Function. 
 
-      //Retrieve current Graph.
+      // Retrieve current Graph.
       Graph graph = execCxt.getActiveGraph();
       
-      //Wrap Graph in a Model.
+      // Wrap Graph in a Model.
       Model model = ModelFactory.createModelForGraph(graph);
 
-      //Retrieve DatasetGraph of current Graph.
+Access another graph:
+
+      // Retrieve DatasetGraph of current Graph.
       DatasetGraph datasetGraph = execCxt.getDataset();
 
-      //Retrieve a different Graph in the Dataset.
+      // Retrieve a different Graph in the Dataset.
       Node otherGraphNode = NodeFactory.createURI("http://example.org/otherGraph");
       Graph otherGraph = datasetGraph.getNamedGraph(otherGraphNode);
 
-      //Create a new Graph in the Dataset, or overwrite an existing Named Graph.
-      Graph newGraph = ...
-      //Add data to the newGraph as retaining empty Graphs is implementation dependent.
-      datasetGraph.addGraph(otherGraphNode, newGraph);
+      // Access the other graph
+      ExtendedIterator<Triple> iter = otherGraph.find(...);