W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2000

RE: rdf for object serialization

From: Assini, Pasqualino <titto@essex.ac.uk>
Date: Wed, 1 Mar 2000 19:18:23 -0000
Message-ID: <8935BFF68E96D3119C91009027D3A56A01137BC6@sernt14.essex.ac.uk>
To: www-rdf-interest@w3.org
Hello,

I don't know if it hurts but I think that there are better alternatives.

I think there are two cases:


1 - The properties have the same meaning

Let's consider for example a property as 'length' that is certainly common
to many objects and probably has identical meaning with respect to all of
them.

If you want to express the fact that this 'length' is actually the same
thing for say a Person and a Boat you might declare that both Person and
Boat are subclasses of PhysicalObject and that PhysicalObject has a property
'length'.

This is neater than using facets as it doesn't require any extension to the
RDF Schema vocabulary.


2 - The properties do not have the same meaning

There is also the case in which the two properties are not the same, in the
sense that they do not have the same meaning in all possible contexts, but
still it would be useful to treat them as equivalent with respect to a
particular context.

This is, I believe, the case of the example you propose: 'child' property
for Person and Node.

It's clear that the child of a Person is not the same thing as the child of
a Node but if you want to print genealogical trees and node trees using the
same code it would be useful to be able to say that the two properties
should be treated as equivalent.

As this equivalence is context dependent you shouldn't express it into the
property declaration itself but rather as a relation between properties.


Best

  titto



> -----Original Message-----
> From: Stefan Decker [mailto:stefan@db.stanford.edu]
> Sent: 01 March 2000 18:44
> To: Assini, Pasqualino; www-rdf-interest@w3.org
> Subject: RE: rdf for object serialization
> 
> 
> ReHi,
> 
> At 10:46 AM 3/1/00 +0000, Assini, Pasqualino wrote:
> >Hi,
> >
> >I'm not sure I understand.
> >
> >What you have are two different properties that simply 
> happen to be both
> >called  'child'.
> 
> It is a matter of perspective:
> 
> Think of properties as roles: the child-role of Node is 
> filled with a node,
> the child-role of Person is filled with a person.
> You want to be able to describe this in a schema.
> 
> >As they are different they should have two different URIs 
> and be described
> >separatly.
> 
> They are not different as roles.
> I agree that it is also possible to introduce two different 
> properties:
> Node_child and Person_child.
> However, this means basically, that i have to encode the domain of the
> property in the property name. To reread it again i have to
> analyse the property name - seems to be a bad idea for me.
> 
> 
> >Why using 'facets'?
> 
> It resolves the properties vs. roles issue.
> 
> Vice versa: Having multiple (domain,range)-definitions is useful in
> several circumstances, several people have asked
> for this feature now and it was necessary to adapt a highly successful
> modelling tool to RDF. So there is a demand.
> 
> Although they were some obligations against it, nobody has 
> come up with
> a *concrete* example were multiple (domain,range)-definitions 
> really hurt.
> 
> So: where does it hurt? Why are multiple 
> (domain,range)-definitions for
> properties a bad idea? (*concrete example please*).
> 
> Thanks,
>          Stefan
> 
> 
> 
> Example of multiple domain-range definitions:
> 
>   <rdfs:Property rdf:ID="child">
>     <rdfutil:facets>
>      <rdfutil:facetResource>
>       <rdfutil:domain rdf:resource="#Node"/>
>       <rdfutil:range rdf:resource="#Node"/>
>      </rdfutil:facetResource>
>     </rdfutil:facets>
> 
>     <rdfutil:facets>
>      <rdfutil:facetResource>
>       <rdfutil:domain rdf:resource="#Person"/>
>       <rdfutil:range rdf:resource="#Person"/>
>      </rdfutil:facetResource>
>     </rdfutil:facets>
> 
>   </rdfs:Property>
> 
> 
> 
> 
> 
> 
> >Thanks
> >
> >   titto
> >
> > > -----Original Message-----
> > > From: Stefan Decker [mailto:stefan@db.stanford.edu]
> > > Sent: 29 February 2000 22:04
> > > To: haustein@kimo.cs.uni-dortmund.de; www-rdf-interest@w3.org
> > > Subject: Re: rdf for object serialization
> > >
> > >
> > > Hi,
> > >
> > > this was indeed already discussed a few weeks ago.
> > > See:
> > > 
> http://lists.w3.org/Archives/Public/www-rdf-interest/1999Dec/0113.html
> > > 
> http://lists.w3.org/Archives/Public/www-rdf-interest/1999Dec/0115.html
> > > 
> http://lists.w3.org/Archives/Public/www-rdf-interest/1999Dec/0147.html
> > > 
> http://lists.w3.org/Archives/Public/www-rdf-interest/2000Jan/0020.html
> > >
> > > The discussion has not lead to a useful solution,  but i 
> *needed* a
> > > solution for this problem
> > > for the Protege RDF-storage infrastructure.
> > > So my solution was to use facets for properties in a
> > > namespace "rdfutil"
> > > (which is preliminary)
> > > which allows to define multiple domains and ranges.
> > > A property can have multiple "facetResources", which 
> defines a set of
> > > facets for the property separately.
> > > In your example the property "child" would have two
> > > "facetResources", one
> > > for each domain.
> > >
> > > The documentation of the rdfutil-namespace is in preparation
> > > (it contains
> > > also cardinality-constraints etc., which
> > > were also needed for the protege-RDF serialization.
> > >
> > > So the RDF-serialization of
> > >
> > > >class Person {
> > > >   String name;
> > > >   Person child;
> > > >}
> > > >
> > > >class Node {
> > > >   Object content;
> > > >   Node child;
> > > >}
> > > is (i omitted "content" and "name")
> > >
> > >
> > >   <?xml version='1.0' encoding='ISO-8859-1'?>
> > > <!-- Version Tue Feb 29 13:45:11 PST 2000 -->
> > > <rdf:RDF
> > >   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> > >   xmlns:rdfs="http://www.w3.org/TR/1999/PR-rdf-schema-19990303#"
> > >   xmlns:rdfutil="http://www.w3.org/rdfutil#">
> > >
> > >   <rdfs:Class rdf:ID="#Node"/>
> > >
> > >   <rdfs:Class rdf:ID="#Person"/>
> > >
> > >   <rdfs:Property rdf:ID="child">
> > >     <rdfutil:facets>
> > >      <rdfutil:facetResource>
> > >       <rdfutil:domain rdf:resource="#Node"/>
> > >       <rdfutil:range rdf:resource="#Node"/>
> > >      </rdfutil:facetResource>
> > >     </rdfutil:facets>
> > >
> > >     <rdfutil:facets>
> > >      <rdfutil:facetResource>
> > >       <rdfutil:domain rdf:resource="#Person"/>
> > >       <rdfutil:range rdf:resource="#Person"/>
> > >      </rdfutil:facetResource>
> > >     </rdfutil:facets>
> > >
> > >   </rdfs:Property>
> > > <rdf:RDF>
> > >
> > > --------------------------------------------------------------
> > > -----------------
> > >
> > > Please note that the property definition can be split into
> > > two separate
> > > definitions, thus
> > > the Java-classes can be serialized interdependently (this is
> > > actually the
> > > approach used in Protege).
> > >
> > >   <rdfs:Property rdf:ID="child">
> > >     <rdfutil:facets>
> > >      <rdfutil:facetResource>
> > >       <rdfutil:domain rdf:resource="#Node"/>
> > >       <rdfutil:range rdf:resource="#Node"/>
> > >      </rdfutil:facetResource>
> > >     </rdfutil:facets>
> > >   </rdfs:Property>
> > >
> > >
> > >
> > >   <rdfs:Property rdf:ID="child">
> > >     <rdfutil:facets>
> > >      <rdfutil:facetResource>
> > >       <rdfutil:domain rdf:resource="#Person"/>
> > >       <rdfutil:range rdf:resource="#Person"/>
> > >      </rdfutil:facetResource>
> > >     </rdfutil:facets>
> > >   </rdfs:Property>
> > >
> > >
> > > Ciao,
> > >
> > >          Stefan
> > >
> > >
> > >
> > >
> > >
> > > >Where serialzed instances should look like
> > > >
> > > ><rdf xmlns:rdf="..."
> > > >      xmlns="..."
> > > >
> > > >   <Person rdf:about="....">
> > > >      <name>Harry Hacker</name>
> > > >      <child rdf:"ressurce="...."/>
> > > >   </Person>
> > > >
> > > >   <Node rdf:about="....">
> > > >      <content rdf:ressource="..."/>
> > > >      <child rdf:ressource="..."/>
> > > >   </Node>
> > > ></rdf>
> > > >
> > > >
> > > >AFAIK, that is not possible at all because in RDF the domain
> > > >of a property is not part of the property
> > > >name (in contrast to OOPL).
> > > >
> > > >So I could add the class name to the property name manually,
> > > >but renaming child to Person-child and Node-child would
> > > >look ugly in the RDF code and not meet the spirit of
> > > >OOP. I could also use the RDF syntax for object
> > > >serialization but ignore RDF schema.
> > > >
> > > >Does anybody have a good suggestions?
> > > >
> > > >Is there any special reason why the domain name is not part
> > > >of the property name in RDF schema like in standard OOP?
> > > >Or did I misread the specs? Is object serialization a
> > > >relevant application of RDF?
> > > >
> > > >Best regards
> > > >
> > > >Stefan
> > > >
> > > >
> > > >--
> > > >Stefan Haustein
> > > >University of Dortmund
> > > >Computer Science VIII
> > > >www-ai.cs.uni-dortmund.de
> > >
> > >
> 
Received on Wednesday, 1 March 2000 14:18:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:42 GMT