You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Cindy A McMullen <ci...@oracle.com> on 2014/05/14 22:15:00 UTC

DELETE DATA

Hi,

I'm using Jena 11.2.1. My graph has a triple that looks like this:

{s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Cindy^^http://www.w3.org/2001/XMLSchema#string}

I want to use DELETE DATA, and my update stanza looks like this:

PREFIX w: <http://www.foo.com/osn/osn.owl#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
DELETE DATA { w:User100 w:name "Cindy" . }

That triple is not removed from the graph.   So that's the first problem.

The next problem is that when I insert data into the graph, the XSD type information is lost:
PREFIX w: <http://www.foo.com/osn/osn.owl#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
INSERT DATA { w:User100 w:name "Charles" . }

{s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Charles}

When trying something like this:

// Throws parse errors
DELETE DATA { w:User100 w:name Cindy^^http://www.w3.org/2001/XMLSchema#string . }

How can I get INSERT DATA and DELETE DATA to work with literals? 

Thanks -

-- Cindy 




Re: DELETE DATA

Posted by Andy Seaborne <an...@apache.org>.
On 14/05/14 21:49, Cindy A McMullen wrote:
> Correction inline in bold below:

Not in plain text :-)

>
> On May 14, 2014, at 2:15 PM, Cindy A McMullen wrote:
>
>> Hi,
>>
>> I'm using Jena 11.2.1. My graph has a triple that looks like this:
>>
>> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Cindy^^http://www.w3.org/2001/XMLSchema#string}
>>
>> I want to use DELETE DATA, and my update stanza looks like this:
>>
>> PREFIX w: <http://www.foo.com/osn/osn.owl#>
>> PREFIX w: <http://www.oracle.com/osn/osn.owl#>
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> DELETE DATA { w:User100 w:name "Cindy" . }
>>
>> That triple is not removed from the graph.   So that's the first problem.

Because

"Cindy" != "Cindy"^^xsd:string

as RDF terms.


In RDF 1.1

"Cindy" and "Cindy"^^xsd:string are the same thing (not even equal - 
they are two ways to write the same thing).

But to make that change, every persistent database needs reloading which 
is a major change and needs careful migration.  It is not yet done so 
for this point (and the related rdf:langString) only it's RDF 1.0 semantics.

>> The next problem is that when I insert data into the graph, the XSD type information is lost:
>> PREFIX w: <http://www.foo.com/osn/osn.owl#>
>> PREFIX w: <http://www.oracle.com/osn/osn.owl#>
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> INSERT DATA { w:User100 w:name "Charles" . }
>>
>> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Charles}
>>
>> When trying something like this:
>>
>> // Throws parse errors
>> DELETE DATA { w:User100 w:name Cindy^^http://www.w3.org/2001/XMLSchema#string . }

Full syntax is:

"Cindy"^^<http://www.w3.org/2001/XMLSchema#string>


>>
>> How can I get INSERT DATA and DELETE DATA to work with literals?
>>
>> Thanks -
>>
>> -- Cindy
>>
>>
>>
>
>


Re: DELETE DATA

Posted by Cindy A McMullen <ci...@oracle.com>.
Problem solved.  The literals need to be constructed as something like "Cindy"^^xsd:string, or "10"^^xsd:int

On May 14, 2014, at 2:49 PM, Cindy A McMullen wrote:

> Correction inline in bold below:
> 
> On May 14, 2014, at 2:15 PM, Cindy A McMullen wrote:
> 
>> Hi,
>> 
>> I'm using Jena 11.2.1. My graph has a triple that looks like this:
>> 
>> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Cindy^^http://www.w3.org/2001/XMLSchema#string}
>> 
>> I want to use DELETE DATA, and my update stanza looks like this:
>> 
>> PREFIX w: <http://www.foo.com/osn/osn.owl#> 
>> PREFIX w: <http://www.oracle.com/osn/osn.owl#> 
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
>> DELETE DATA { w:User100 w:name "Cindy" . }
>> 
>> That triple is not removed from the graph.   So that's the first problem.
>> 
>> The next problem is that when I insert data into the graph, the XSD type information is lost:
>> PREFIX w: <http://www.foo.com/osn/osn.owl#> 
>> PREFIX w: <http://www.oracle.com/osn/osn.owl#> 
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
>> INSERT DATA { w:User100 w:name "Charles" . }
>> 
>> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Charles}
>> 
>> When trying something like this:
>> 
>> // Throws parse errors
>> DELETE DATA { w:User100 w:name Cindy^^http://www.w3.org/2001/XMLSchema#string . }
>> 
>> How can I get INSERT DATA and DELETE DATA to work with literals? 
>> 
>> Thanks -
>> 
>> -- Cindy 
>> 
>> 
>> 
> 


Re: DELETE DATA

Posted by Cindy A McMullen <ci...@oracle.com>.
Correction inline in bold below:

On May 14, 2014, at 2:15 PM, Cindy A McMullen wrote:

> Hi,
> 
> I'm using Jena 11.2.1. My graph has a triple that looks like this:
> 
> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Cindy^^http://www.w3.org/2001/XMLSchema#string}
> 
> I want to use DELETE DATA, and my update stanza looks like this:
> 
> PREFIX w: <http://www.foo.com/osn/osn.owl#> 
> PREFIX w: <http://www.oracle.com/osn/osn.owl#> 
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
> DELETE DATA { w:User100 w:name "Cindy" . }
> 
> That triple is not removed from the graph.   So that's the first problem.
> 
> The next problem is that when I insert data into the graph, the XSD type information is lost:
> PREFIX w: <http://www.foo.com/osn/osn.owl#> 
> PREFIX w: <http://www.oracle.com/osn/osn.owl#> 
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
> INSERT DATA { w:User100 w:name "Charles" . }
> 
> {s=http://www.oracle.com/osn/osn.owl#User100, p=http://www.oracle.com/osn/osn.owl#name, o=Charles}
> 
> When trying something like this:
> 
> // Throws parse errors
> DELETE DATA { w:User100 w:name Cindy^^http://www.w3.org/2001/XMLSchema#string . }
> 
> How can I get INSERT DATA and DELETE DATA to work with literals? 
> 
> Thanks -
> 
> -- Cindy 
> 
> 
>