- From: Stefan Decker <stefan@db.stanford.edu>
- Date: Wed, 01 Mar 2000 10:43:31 -0800
- To: "Assini, Pasqualino" <titto@essex.ac.uk>, www-rdf-interest@w3.org
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 13:52:03 UTC