markdown fixes


Branch: refs/heads/master
Commit: 5aa8d6cb7123da5505cd587e067ad70562938ebd
Parents: 3bbe805
Author: Stian Soiland-Reyes <>
Authored: Tue Oct 18 12:36:05 2016 +0100
Committer: Stian Soiland-Reyes <>
Committed: Tue Oct 18 12:36:05 2016 +0100

 src/site/markdown/ | 50 ++++++++++++++++++++++++++-----------
 1 file changed, 35 insertions(+), 15 deletions(-)
diff --git a/src/site/markdown/ b/src/site/markdown/
index 9901a56..a18436d 100644
--- a/src/site/markdown/
+++ b/src/site/markdown/
@@ -671,7 +671,7 @@ In Commons RDF, `BlankNodeOrIRI` instances are always one 
of `BlankNode` or
 A `Triple` is considered
-to another `Triple` if each of their subject, predicate and object are also
+to another `Triple` if each of their subject, predicate and object are
@@ -721,7 +721,7 @@ System.out.println(pred.ntriplesString());
 ### Graph name
-In addition the _graph name_ is accessible using
+The quad's _graph name_ is accessible using
@@ -743,7 +743,6 @@ if (g.isPresent()) {
 > `<>`
 To create a quad in the _default graph_, supply `null` as the graph name
 to the factory method:
@@ -762,6 +761,17 @@ Java 8 functional programming patterns like:
 String str ="");
+As the `createQuad` method does not expect an `Optional`, you might
+use this `orElse` pattern to represent the default graph as `null`:
+BlankNodeOrIRI g = quad.getGraphName().orElse(null);
+if (g == null) {
+  System.out.println("In default graph");
 Care should be taken with regards when accessing
 graph named with `BlankNode`s,
@@ -774,7 +784,7 @@ as the graph name will be compared using
 A `Quad` is considered
 to another `Quad` if each of the graph name, subject, predicate and
-object are also equal:
+object are equal:
@@ -799,6 +809,16 @@ 
 > `true`
+To create a triple from a quad, you will need to use
+providing the desired graph name:
+Triple t; // ..
+BlankNodeOrIRI g; // ..
+Quad q = factory.createQuad(g, t.getSubject(), t.getPredicate(), 
 ### TripleLike
@@ -808,7 +828,7 @@ does **not** extend the class
 as they have different equality semantics.
-Both `Triple` and `Quad` do however extend the "duck-typing" interface
+Both `Triple` and `Quad` do however share a common "duck-typing" interface
@@ -817,26 +837,26 @@ TripleLike a = quad;
 TripleLike b = quad.asTriple();
-Unlike Triple and Quad, TripleLike does not mandate any specific
+Unlike `Triple` and `Quad`, `TripleLike` does not mandate any specific
 `.equals()`, it just provides common access to
-TripleLike can also be used for
-therefore all of these are return as 
 RDFTerm s = a.getSubject();
 RDFTerm p = a.getPredicate();
 RDFTerm o = a.getObject();
-For generalized quads there is also the
-[QuadLike](apidocs/org/apache/commons/rdf/api/QuadLike.html) interface that
+TripleLike can also be used for
+therefore all of its parts are returned as 
+For generalized quads the
+[QuadLike](apidocs/org/apache/commons/rdf/api/QuadLike.html) interface extends 
`TripleLike` to
 as an `Optional<T extends RDFTerm>`.
@@ -1050,7 +1070,7 @@ graph name - matching 
 Note that the expanded pattern methods like 
 uses `null` as a wildcard pattern, and
 therefore an explicit _graph name_ parameter must be supplied as 
  (default graph)
-or wrapped using 
+or wrapped using 
 Literal foo = factory.createLiteral("Foo");
@@ -1094,7 +1114,7 @@ BlankNodeOrIRI graphName = 
 Optional<Graph> otherGraph = dataset.getGraph(graphName);
-These `Graph`s provide a `Triple` **view** onto the `Quad`s in the `Dataset`:
+These provide a `Graph` **view** of the corresponding `Triple`s in the 

Reply via email to