incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür (JIRA) <>
Subject [jira] [Commented] (CLEREZZA-595) StringLiteral and PlainLiteral semantics are wrong
Date Thu, 07 Jul 2011 06:31:17 GMT


Reto Bachmann-Gmür commented on CLEREZZA-595:

Clerezza doesn't do datatype entailment yet, not even where they are sanctioned by RDF-Semantics.
Not sure if the equals method is the right place to do this. It would require changing the
identity conditions in the Literal-interface. But I think it might be more consistent to just
operate on the abstract syntax layer in rdf.core, also two Graphs are considered equals if
they are isomorphic, mutual entailment isn't enough for Graph.equals to return true.

> StringLiteral and PlainLiteral semantics are wrong
> --------------------------------------------------
>                 Key: CLEREZZA-595
>                 URL:
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Henry Story
> The "Datatype Entailment Rules" in the RDF Semantics spec (section 7.4) make it very
clear that in rules xsd 1a and xsd 1b that the "a string"^^xsd:string is semantically equivalent
to "a string".
> The following two transformations rules are made explicit there
> <quote href="">
> xsd 1a:	uuu aaa "sss".      	             -->     uuu aaa "sss"^^xsd:string .
> xsd 1b:	uuu aaa "sss"^^xsd:string .	     -->     uuu aaa "sss".
> </quote>
> But if one creates a plain literal in Scala without a language tag one does not get the
equality as expected with the xsd:TypedLiteral equivalent.
> The following test will confirm this.
> 	@Test public void plainLiteralStringEquality() {
> 		String string = "a string is a sequence of characters";
> 		UriRef xsdstring = new UriRef("");
> 		PlainLiteral plainStringLiteral = new PlainLiteralImpl(string);
> 		TypedLiteral typedStringLiteral = new TypedLiteralImpl(string, xsdstring );
> 		Assert.assertEquals("an xsd:string is the same as the string itself, so it must be
the same as the plain literal",
> 				plainStringLiteral,typedStringLiteral);
> 	}

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message