I'm trying to implement a versioning policy our linked data, and when I see , 
located at http://id.nlm.nih.gov/mesh.   We currently load the triples each 
night, and we want to start being sensitive to which subjects no longer appear 
in the graph, updating the triples of subjects that exist in the new schema, 
and marking the subjects that do not exist in the old schema as "obsolete".

I've come up with a query that allows me to do some logic on specific subjects, 
but I need then to parameterize the copy of data.    We'd prefer to do this in 
Virtuoso/PL, but I've not yet figured out how to do something like this:

CREATE PROCEDURE test_insert(in source_graph varchar, in target_graph varchar, 
in subject_uri varchar) {
  DECLARE target_iid iri_id;
  DECLARE subject_iid iri_id;

  target_iid := rdf_make_iid_of_qname(target_graph);
  subject_iid := rdf_make_iid_of_qname(subject_uri);

  DELETE FROM RDF_QUAD WHERE g = target_iid AND s = subject_iid;
  SPARQL INSERT { GRAPH target_graph { uri ?p ?o } } USING source_graph WHERE { 
uri ?p ?o };
}

Any help would be appreciated.

Thanks,

Dan Davis, Systems/Applications Architect (Contractor),
Office of Computer and Communications Systems,
National Library of Medicine, NIH

------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to