You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Holger Knublauch <ho...@knublauch.com> on 2014/12/20 05:11:24 UTC
Naming of the class Resource
According to the official W3C spec [1] the term "Resource" is used for
things in the universe of discourse (or real world). In W3C lingo, such
resources are denoted by IRIs, literals and blank nodes. This is
reflected by the RDF Schema spec, which has root classes
rdfs:Resource
rdfs:Literal
rdfs:Class
rdf:Property
Now looking at the Jena (and Sesame) Model API, the term "Resource" is
used for "URI or blank node":
RDFNode
Literal (have label, datatype)
Resource (have URI or bnode ID)
Property
basically assuming that we have an RDF schema such as
rdfs:Node
rdfs:Literal
rdfs:Resource
rdf:Property
which makes sense to me (from a programmer's point of view). Yet, in the
RDF Shapes group this topic is currently widely discussed, and some
people state that the Jena developer made a "stupid" [2] mistake. Do any
of you remember why the current interfaces were named like this so that
we now have this mismatch?
Thanks
Holger
[1] http://www.w3.org/TR/rdf11-concepts/
[2]
http://lists.w3.org/Archives/Public/public-data-shapes-wg/2014Dec/0185.html
Re: Naming of the class Resource
Posted by Andy Seaborne <an...@apache.org>.
>> Do any
>> of you remember why the current interfaces were named like this so that
>> we now have this mismatch?
One other datum:
In RDF/XML, there is: [1],[2]
for URIs
rdf:resource="http://....."
for blank nodes:
rdf:parseType="Resource"
and text language like:
"a resource has multiple property elements"
so usage of 'resource' not as in 'resource identifier' but referring to
syntax used to exist but this has changed over time. RDF/XML still has
hints of older usage.
Andy
[1]
http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-empty-property-elements
[2]
http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-parsetype-resource
Re: Naming of the class Resource
Posted by Holger Knublauch <ho...@knublauch.com>.
On 12/21/2014 7:21, Arthur Ryman wrote:
> Andy/Holger,
>
> As both a Jena user and a member of the Shapes WG, I feel compelled to
> comment. Please, let's not inflate one person's negative opinion to
> "some people". IMHO Jena is a fabulous project and my company has
> gotten tremendous benefit from it. I hope that when the Shapes
> standard firms up the Jena project will be interesting in implementing
> it.
+1
and thanks to Andy for explaining the (historical) background.
Terminology is never easy to get right, especially if it is overloaded
from so many directions (e.g. "REST resource") and then changes over
time. Yet we do have a situation in which the majority of people using
RDF seems to have a different understanding than what the spec writers
have. E.g.
"There are two kinds of nodes: resources and literals" (Hebeler et al
"Semantic Web Programming", p69).
and similar statements everywhere. Sesame API uses the same names too.
Thanks,
Holger
Re: Naming of the class Resource
Posted by Arthur Ryman <ar...@gmail.com>.
Andy/Holger,
As both a Jena user and a member of the Shapes WG, I feel compelled to
comment. Please, let's not inflate one person's negative opinion to
"some people". IMHO Jena is a fabulous project and my company has
gotten tremendous benefit from it. I hope that when the Shapes
standard firms up the Jena project will be interesting in implementing
it.
-- Arthur Ryman
On Sat, Dec 20, 2014 at 7:12 AM, Andy Seaborne <an...@apache.org> wrote:
> Hi Holger,
>
> Yep. Peter is, as ever concise, in his expression of the situation, but he
> does not have users and existing code to worry about! :-)
>
> "Resource" isn't quite right though "resource" in web arch is used various
> different ways by different groups anyway.
>
> RDF was originally describing things on the web. Literals aren't on the
> web. (Shock, horror!) RDF then become describing the real world. We can
> discuss whether "numbers" are part of the real world. Well, "we" can; I'll
> skip that bit.
>
> "RDF term" is the union of IRIs, bnodes and literals (I x B x L). "RDF
> term" was invented in the SPARQL 1.0 WG because RDF did not have the
> terminology to for I x B x L.
>
> This is now in the RDF 1.1 spec. It's been imported into RDF 1.1 Ditto
> "Dataset".
>
> In Jena, there is RDFNode.
>
> Actually, the API layer is different - the Graph layer is closer, but
> generalises, the RDF abstract data model. The generalization is necessary:
> inference and query can get literals in property locations for example. And
> then there are variables.
>
> A relative recent effect is:
> https://github.com/commons-rdf/commons-rdf
>
> and that does not have a nice name for I x B. "BlankNodeOrIRI". RDF 1.1
> should have defined a good word, if there is one.
> "TheThingsThatCanBeSubjects" really is no good.
>
> The Jena RDF API Resource also has differences from like IRI x BNodes
> because there are concepts like "get property of" so a Resource is a pair of
> (graph, rdf term) else you can't find triples with that subject.
>
> commons-rdf can't express that - it could be another API on top of Jena
> core (Graph/Triple/Node). This can't be a replacement for the existing
> API. It is going to be a bit laborious to code against if you have to pass
> graph and term around all the time. (I've mocked up an implementation -
> it's pretty easy ; using it is yukky to my Jena eye.)
>
> There simply aren't enough different words for every nuance, and meanings
> change. Library code is harder to change.
>
> Andy
>
>
> On 20/12/14 04:11, Holger Knublauch wrote:
>>
>> According to the official W3C spec [1] the term "Resource" is used for
>> things in the universe of discourse (or real world). In W3C lingo, such
>> resources are denoted by IRIs, literals and blank nodes. This is
>> reflected by the RDF Schema spec, which has root classes
>>
>> rdfs:Resource
>> rdfs:Literal
>> rdfs:Class
>> rdf:Property
>>
>> Now looking at the Jena (and Sesame) Model API, the term "Resource" is
>> used for "URI or blank node":
>>
>> RDFNode
>> Literal (have label, datatype)
>> Resource (have URI or bnode ID)
>> Property
>>
>> basically assuming that we have an RDF schema such as
>>
>> rdfs:Node
>> rdfs:Literal
>> rdfs:Resource
>> rdf:Property
>>
>> which makes sense to me (from a programmer's point of view). Yet, in the
>> RDF Shapes group this topic is currently widely discussed, and some
>> people state that the Jena developer made a "stupid" [2] mistake. Do any
>> of you remember why the current interfaces were named like this so that
>> we now have this mismatch?
>>
>> Thanks
>> Holger
>>
>>
>> [1] http://www.w3.org/TR/rdf11-concepts/
>> [2]
>>
>> http://lists.w3.org/Archives/Public/public-data-shapes-wg/2014Dec/0185.html
>>
>
Re: Naming of the class Resource
Posted by Andy Seaborne <an...@apache.org>.
Hi Holger,
Yep. Peter is, as ever concise, in his expression of the situation, but
he does not have users and existing code to worry about! :-)
"Resource" isn't quite right though "resource" in web arch is used
various different ways by different groups anyway.
RDF was originally describing things on the web. Literals aren't on the
web. (Shock, horror!) RDF then become describing the real world. We
can discuss whether "numbers" are part of the real world. Well, "we"
can; I'll skip that bit.
"RDF term" is the union of IRIs, bnodes and literals (I x B x L). "RDF
term" was invented in the SPARQL 1.0 WG because RDF did not have the
terminology to for I x B x L.
This is now in the RDF 1.1 spec. It's been imported into RDF 1.1 Ditto
"Dataset".
In Jena, there is RDFNode.
Actually, the API layer is different - the Graph layer is closer, but
generalises, the RDF abstract data model. The generalization is
necessary: inference and query can get literals in property locations
for example. And then there are variables.
A relative recent effect is:
https://github.com/commons-rdf/commons-rdf
and that does not have a nice name for I x B. "BlankNodeOrIRI". RDF 1.1
should have defined a good word, if there is one.
"TheThingsThatCanBeSubjects" really is no good.
The Jena RDF API Resource also has differences from like IRI x BNodes
because there are concepts like "get property of" so a Resource is a
pair of (graph, rdf term) else you can't find triples with that subject.
commons-rdf can't express that - it could be another API on top of Jena
core (Graph/Triple/Node). This can't be a replacement for the existing
API. It is going to be a bit laborious to code against if you have to
pass graph and term around all the time. (I've mocked up an
implementation - it's pretty easy ; using it is yukky to my Jena eye.)
There simply aren't enough different words for every nuance, and
meanings change. Library code is harder to change.
Andy
On 20/12/14 04:11, Holger Knublauch wrote:
> According to the official W3C spec [1] the term "Resource" is used for
> things in the universe of discourse (or real world). In W3C lingo, such
> resources are denoted by IRIs, literals and blank nodes. This is
> reflected by the RDF Schema spec, which has root classes
>
> rdfs:Resource
> rdfs:Literal
> rdfs:Class
> rdf:Property
>
> Now looking at the Jena (and Sesame) Model API, the term "Resource" is
> used for "URI or blank node":
>
> RDFNode
> Literal (have label, datatype)
> Resource (have URI or bnode ID)
> Property
>
> basically assuming that we have an RDF schema such as
>
> rdfs:Node
> rdfs:Literal
> rdfs:Resource
> rdf:Property
>
> which makes sense to me (from a programmer's point of view). Yet, in the
> RDF Shapes group this topic is currently widely discussed, and some
> people state that the Jena developer made a "stupid" [2] mistake. Do any
> of you remember why the current interfaces were named like this so that
> we now have this mismatch?
>
> Thanks
> Holger
>
>
> [1] http://www.w3.org/TR/rdf11-concepts/
> [2]
> http://lists.w3.org/Archives/Public/public-data-shapes-wg/2014Dec/0185.html
>