- From: Philippe Le H?garet <Philippe.Le_Hegaret@sophia.inria.fr>
- Date: Thu, 15 Oct 1998 18:06:57 +0200
- To: www-rdf-comments@w3.org
Hello, I'm currently working to serialize Java Objects with RDF. For the moment, I have my own XML application (see KOML at http://www.inria.fr/koala/XML/serialization/) but I would like to use a "standart application". I have a problem and I would like to have an opinion. Let's define two Java classes : class A { int p; } class B extends A { String p; } Now, I use this model : <rdfs:Class rdf:ID="A"> <rdfs:subClassOf resource="http://www.types.org/Java#java.lang.Object"/> </rdfs:Class> <rdf:Predicate rdf:ID="p"> <rdfs:domain rdf:resource="#A"> <rdfs:range rdf:resource="http://www.types.org/Java#int"/> </rdf:Predicate> <rdfs:Class rdf:ID="B"> <rdfs:subClassOf rdf:resource="#A"/> </rdfs:Class> <!-- first problem appears here, I use the same Node p --> <rdf:Predicate rdf:ID="p"> <rdfs:domain rdf:resource="#B"> <rdfs:range rdf:resource="http://www.types.org/Java#java.lang.String"/> </rdf:Predicate> Then, I define an instance of B : <B rdf:resource="b1"> <!-- gloups, second problem, which java:p is it ? --> <p>1</p> <p>Hello, World!</p> </B> Here is the problem : I need to have two resources with the same ID and to reference them. I would like to have no dependance with an application as much as possible. So, how can I do a model in this case ? Thanks, Philippe. --------- Philippe Le Hegaret Philippe.Le_Hegaret@sophia.inria.fr -- http://www.inria.fr/koala/plh/ KOALA/DYADE/BULL @ INRIA - Sophia Antipolis
Received on Thursday, 15 October 1998 12:07:02 UTC