Home
Categories
Dictionary
Download
Project Details
Changes Log
FAQ
License

INSERT and DELETE content


Adding an INSERT, INSERT DATA, or DELETE form can be performed through the following methods: The resulting form can be used to add expressions. For example:
   SparqlRequest request = new SparqlRequest("people");
   request.addAdditionalVariable("person");
   request.addType("person", "Person");
      
   DeleteForm delete = request.addDelete();
   request.addAdditionalVariable("friend");
   delete.addPropertyRef("person", "hasFriend", "friend");
      
   InsertForm insert = request.addInsert();
   insert.addPropertyValue("person", "hasFriend", "Paul");
      
   String sparql = request.getSPARQL();
Will have the following result:
   DELETE {
      ?person people:hasFriend ?friend .
   }
   INSERT {
      ?person people:hasFriend "Paul" .
   }
   WHERE {
      ?person rdf:type people:Person .
   }

See also


Categories: Requestcreation

Copyright 2025 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help