On Fri, Dec 7, 2012 at 8:42 PM, Kingsley Idehen <[email protected]>wrote:
> On 12/7/12 7:06 AM, Vishesh Handa wrote:
>
>>
>> Thanks for the link, however the proposed method of moving triples from
>> one graph to another assumes that the user wants to move all the triples
>> from one graph to another. In my case I just need to move a particular
>> subset of triples from one graph to another.
>>
>> Also, it seems to be an overkill to remove triples from the database and
>> re-insert them when I just need to be changing their graph parameter. Do
>> you think I could use the tip give over here [1] with an additional where
>> clause to specify the triples?
>>
>
> You can use SPARQL 1.1 Update syntax to source triples from one Named
> Graph IRI that are INSERTED into another.
>
>
Hey Kingsley
Thanks for the pointer. Unfortunately, it too copies those triples from one
graph to another. I need to move those triples, not copy them. Perhaps I am
missing something really obvious?
Real world example to show that the triples are being copied not moved -
SQL> sparql select ?g where {
graph ?g {
<nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980>
kext:unixFileMode "33188"^^<http://www.w3.org/2001/XMLSchema#int> . } };
g
VARCHAR
_______________________________________________________________________________
nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b
2 Rows. -- 20 msec
SQL> sparql insert {
graph <nepomuk:/ctx/e6990720-8f63-45e2-9bc7-3fe8d3a67835> {
<nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980>
kext:unixFileMode "33188"^^<http://www.w3.org/2001/XMLSchema#int> .
}
}
where {
graph <nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b>
{
<nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980>
kext:unixFileMode "33188"^^<http://www.w3.org/2001/XMLSchema#int> .
}
};
Done. -- 37 msec.
SQL> sparql select ?g where {
graph ?g {
<nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> kext:unixFileMode
"33188"^^<http://www.w3.org/2001/XMLSchema#int> .
}
};
g
VARCHAR
_______________________________________________________________________________
nepomuk:/ctx/e6990720-8f63-45e2-9bc7-3fe8d3a67835
nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b
2 Rows. -- 20 msec.
--
Vishesh Handa
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users