- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 29 Nov 2001 17:45:44 -0600
- To: Jeremy Carroll <jjc@hplb.hpl.hp.com>, Patrick.Stickler@nokia.com, w3c-rdfcore-wg@w3.org
I couldn't wait for the answers; I downloaded jena... Dan Connolly wrote: > > I suggest we use 'PL' to refer to this way of > handling datatypes. [...] > Jeremy Carroll wrote: > > See in particular: > > > > http://www.hpl.hp.com/semweb/javadoc/com/hp/hpl/mesa/rdf/jena/model/Resource > > .html#addProperty(com.hp.hpl.mesa.rdf.jena.model.Property,%20long) > > > > and > > > > http://www.hpl.hp.com/semweb/javadoc/com/hp/hpl/mesa/rdf/jena/model/Resource > > .html#hasProperty(com.hp.hpl.mesa.rdf.jena.model.Property,%20double) > > Interesting; what comes out if you do addProperty(shoeSize, 10) > and serialize it? is it different from addProperty(shoeSize, "10")? no, it's not different. > Conversely, if I write > <ex:shoeSize>10</ex:shoeSize> > and ask whether it hasProperty(shoeSize, 10), do I get a yes or a no > answer? you get a yes. Indeed... Jena uses the PL approach; it throws away the distinction between booleans/integers/strings etc: from LiteralImpl.java: public LiteralImpl(boolean b) {literal = String.valueOf(b);} public LiteralImpl(long l) {literal = String.valueOf(l);} public LiteralImpl(char c) {literal = String.valueOf(c);} public LiteralImpl(float f) {literal = String.valueOf(f);} public LiteralImpl(double d) {literal = String.valueOf(d);} -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 29 November 2001 18:46:50 UTC