Deleting data - ge-semtk/semtk GitHub Wiki

This page documents how to delete data from the triple store.

Deleting a whole dataset

To remove all data from a given dataset, use the Clear Graph feature on the SparqlGraph Import tab.

Deleting data with a given prefix from a dataset

To remove all data with a given prefix from a given dataset, use the Clear Prefix feature on the SparqlGraph Import tab.

Deleting a specific subset of data from a dataset

To delete a specific subset of data, you may create a nodegroup that specifies deletion modes for nodes, attributes, and links between nodes.
IMAGE

To indicate that information for a node should be deleted, open the filter dialog for the node and use the dropdown as in the screenshot above. Several deletion modes are supported, allowing for various degrees of removal.

  • NO_DELETE: This is the default action. Nothing will be deleted from this node.
  • TYPE_INFO_ONLY: Remove any information from the data set which indicates the type of the node. This is accomplished by deleting any triple with the "rdf:type" predicate.
  • FULL_DELETE: Remove all triples which reference this node. This includes all properties, type information and any triple in which the instance URI appears in either the subject or predicate.
  • LIMITED_TO_NODEGROUP: Not yet supported. Remove all triples related to this node in the context of the current nodegroup. This removes the node itself, all DISPLAYED outgoing or incoming connections and all properties with primitive types. This will not remove any triples where the instance URI appears in either the subject or predicate if it is not directly shown in the nodegroup.
  • LIMITED_TO_MODEL: Not yet supported. This mode is intended to allow the deletion of any triple related to a given instance URI as described by the current model. Triples which are in the data set but not in the in-scope model will be ignored during the deletion. This may be useful in the event that multiple models are used to describe a single dataset and one wants to delete triples related to only selected models.

To indicate that a given property should be deleted from a node, open the filter dialog for the property and check the "mark for delete" checkbox. This deletes instances of the specific property as matched in the rest of the query. IMAGE

To indicate that a link between nodes should be deleted, click on the link between the two nodes to open a dialog. Using the "Delete query" dropdown, select "Mark for delete". Note: the "delete this link" checkbox is unrelated - it removes the link from the nodegroup-in-progress. IMAGE

Once the nodegroup is created, with deletes specified as above, the nodegroup can be run as a "delete" query (versus, for example, the usual "select distinct" query) within SparqlGraph, which will generate and run the corresponding SPARQL DELETE query on the designated data.