You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/10/14 12:17:48 UTC

[2/8] incubator-commonsrdf git commit: clarified a bit about Quad

clarified a bit about Quad


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/42b7c2c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/42b7c2c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/42b7c2c7

Branch: refs/heads/master
Commit: 42b7c2c74e9cd4527915a1dac59d8dd8ca303d8d
Parents: 9d5e383
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Oct 10 09:15:53 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Oct 10 09:15:53 2016 +0100

----------------------------------------------------------------------
 src/site/markdown/userguide.md | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/42b7c2c7/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index df8a277..ae452fb 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -21,7 +21,7 @@
 # User Guide
 
 This page shows some examples of a client using the Commons RDF API.
-It was last updated for version `0.2.0-incubating` of the
+It was last updated for version `0.3.0-incubating` of the
 Commons RDF [API](apidocs/).
 
 * [Introduction](#Introduction)
@@ -284,8 +284,10 @@ e.g. `http://example.com/alice` or `http://ns.example.org/vocab#term`.
 
 > IRIs in the RDF abstract syntax MUST be absolute, and MAY contain a fragment identifier.
 
-In RDF, an IRI identifies a resource that can be used as a _subject_,
-_predicate_ or _object_ of a [Triple](apidocs/org/apache/commons/rdf/api/Triple.html).
+An IRI identifies a resource that can be used as a _subject_,
+_predicate_ or _object_ of a [Triple](apidocs/org/apache/commons/rdf/api/Triple.html) or
+[Quad](apidocs/org/apache/commons/rdf/api/Quad.html),
+where it can also be used a _graph name_.
 
 To create an `IRI` instance from a `RDFTermFactory`, use [createIRI](apidocs/org/apache/commons/rdf/api/RDFTermFactory.html#createIRI-java.lang.String-):
 
@@ -301,8 +303,8 @@ System.out.println(iri.getIRIString());
 
 > `http://example.com/alice`
 
-_Note: The IRI string might contain non-ASCII characters which must be
-%-encoded for applications that expect an URI. It is currently
+_Note: The **IRI** string might contain non-ASCII characters which must be
+%-encoded for applications that expect an **URI**. It is currently
 out of scope for Commons RDF to perform such a conversion,
 however implementations might provide separate methods for that purpose._
 
@@ -342,7 +344,9 @@ System.out.println(iri.equals(factory.createLiteral("http://example.com/alice"))
 A [blank node](http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes) is a
 resource which, unlike an IRI, is not directly identified. Blank nodes can be
 used as _subject_ or _object_ of a
-[Triple](apidocs/org/apache/commons/rdf/api/Triple.html).
+[Triple](apidocs/org/apache/commons/rdf/api/Triple.html) or
+[Quad](apidocs/org/apache/commons/rdf/api/Quad.html),
+where it can also be used a _graph name_.
 
 To create a new
 [BlankNode](apidocs/org/apache/commons/rdf/api/BlankNode.html) instance from a
@@ -398,11 +402,16 @@ to the previous b1:
 
 ```java
 System.out.println(b1.equals(factory.createBlankNode("b1")));
-System.out.println(b1.equals(new SimpleRDFTermFactory().createBlankNode("b1")));
 ```
-
 > `true`
->
+
+That means that care should be taken to create a new `RDFTermFactory` if making
+"different" blank nodes (e.g. parsed from a different RDF file)
+which accidfentally might have the same name:
+
+```java
+System.out.println(b1.equals(new SimpleRDFTermFactory().createBlankNode("b1")));
+```
 > `false`