You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Kristian Rosenvold <kr...@apache.org> on 2014/08/18 16:12:49 UTC

2.12 regression on rdf:a in UpdateDataInsert ?

The following testcase passes on 2.11 but fails on 2.12:

@Test
public void rdfResolvesToAbsolutePrefix() throws MalformedURLException {
   String rdf = "<http://fido>\n" +
         "        a                               \"dog\" .";

   final Model read = ModelFactory.createDefaultModel().read(new
ByteArrayInputStream(rdf.getBytes()),
         "http://dogz", "TURTLE");

   QuadDataAcc insertData = new QuadDataAcc();
   insertData.setGraph(NodeFactory.createURI("http://testgraph"));
   insertData.addTriple(read.listStatements().nextStatement().asTriple());
   final UpdateDataInsert updateDataInsert = new UpdateDataInsert(insertData);

   final String actual = updateDataInsert.toString();
   assertTrue(actual.contains("<http://fido>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> \"dog\""));
}

On 2.12, the output is   <http://fido> rdf:type "dog" . Is this a
known/fixed issue ?

Kristian

Re: 2.12 regression on rdf:a in UpdateDataInsert ?

Posted by Andy Seaborne <an...@apache.org>.
On 18/08/14 15:12, Kristian Rosenvold wrote:
> @Test
> public void rdfResolvesToAbsolutePrefix() throws MalformedURLException {
>     String rdf = "<http://fido>\n" +
>           "        a                               \"dog\" .";
>
>     final Model read = ModelFactory.createDefaultModel().read(new
> ByteArrayInputStream(rdf.getBytes()),
>           "http://dogz", "TURTLE");
>
>     QuadDataAcc insertData = new QuadDataAcc();
>     insertData.setGraph(NodeFactory.createURI("http://testgraph"));
>     insertData.addTriple(read.listStatements().nextStatement().asTriple());
>     final UpdateDataInsert updateDataInsert = new UpdateDataInsert(insertData);
>
>     final String actual = updateDataInsert.toString();
>     assertTrue(actual.contains("<http://fido>
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>  \"dog\""));
> }

It's already fixed I think.  Please try the development build of 
2.12.1-SNAPSHOT.

	Andy