Re: typing named nodes/blank nodes/literals

​Hi Ruben, others,​

On Mon, Dec 7, 2015 at 5:31 PM, Ruben Verborgh <ruben.verborgh@ugent.be>
wrote:

> As you know, there are 4 building blocks for triples (or patterns):
> ​​
>
> – named nodes (IRIs)
>
– blank nodes
> – literals
>
​The terminology you use here deviates slightly from the W3C standards:
  * The RDF 1.1 Semantics specification
<http://www.w3.org/TR/2014/REC-rdf11-mt-20140225/> defines a *name* as "any
IRI or literal".
  * The RDF 1.1 Concepts and Abstract Syntax
<http://www.w3.org/TR/rdf11-concepts/> specification defines the *nodes* of
a graph as "the set of subjects and objects of triples in [that] graph."​

The differences are:
  * Literals are named nodes as well.
  * Not all IRIs are named nodes.  Specifically, IRIs that only appear in
the predicate position are not nodes.

BTW: Deviation from the standards is not a bad thing.  It's just something
to be aware of.

> – variables (in the case of patterns)
>
> To distinguish between these,
> we would add a property that indicates the type.
> (instanceof will not suffice for all usage.)
>
> How would you name this property?
> – .type
>
​This may be confused with `rdf:type'; the programmer may expect to
retrieve the (direct) classes of an instance.​

> – .termType
>
​This may be a​
​ good option.​

> – .nodeType
>
​This would be confusing since some of the terms are not nodes (see above).​


> – …
>
> Furthermore, what would be the values of this property?
> – "IRI", "blank node", "variable"
> – "uri", "bnode", "var"
>
​URIs have been superseded by IRIs, so I would prefer the latter over the
former.

---
Best regards,
Wouter Beek.

Email: w.g.j.beek@vu.nl
WWW: wouterbeek.com
Tel: +31647674624

Received on Tuesday, 8 December 2015 09:42:29 UTC