connectionUtils/src/main/java/com/ge/research/semtk/sparqlX/SparqlToXUtils.java
public static String generateDeleteURIObjectQuery(SparqlEndpointInterface sei, String uri) throws IOException{

    // avoid catastrophic delete by checking that URI does not start with ?   
    if(uri.startsWith("?")){
      LocalLogger.logToStdOut("URI to delete may not start with '?'...not deleting");
      throw new IOException("URI to delete may not start with '?'");
    }else if(uri.trim().equals("")){
      LocalLogger.logToStdOut("URI to delete may not be empty...not deleting");
      throw new IOException("URI to delete may not be empty");
    }
    
    String query = generateWithDeleteWhereClause(sei, "") + " ?x2 ?y2 <" + uri + "> . } ";  // uri is object
    return query;

  }
/**
   * Generate a DELETE query where the object is a specific URI.
   * @throws IOException
   */
Generate a DELETE query where the object is a specific URI.
Generate a DELETE query where the object is a specific URI .
public static String generateDeleteURIObjectQuery(SparqlEndpointInterface sei, String uri) throws IOException{
    if(uri.startsWith("?")){
      LocalLogger.logToStdOut("URI to delete may not start with '?'...not deleting");
      throw new IOException("URI to delete may not start with '?'");
    }else if(uri.trim().equals("")){
      LocalLogger.logToStdOut("URI to delete may not be empty...not deleting");
      throw new IOException("URI to delete may not be empty");
    }
    String query = generateWithDeleteWhereClause(sei, "") + " ?x2 ?y2 <" + uri + "> . } ";  
    return query;
  }
public static String generateDeleteURIObjectQuery ( SparqlEndpointInterface sei , String uri ) throws IOException { if ( uri . startsWith ( "?" ) ) { LocalLogger . logToStdOut ( "URI to delete may not start with '?'...not deleting" ) ; throw new IOException ( "URI to delete may not start with '?'" ) ; } else if ( uri . trim ( ) . equals ( "" ) ) { LocalLogger . logToStdOut ( "URI to delete may not be empty...not deleting" ) ; throw new IOException ( "URI to delete may not be empty" ) ; } String query = generateWithDeleteWhereClause ( sei , "" ) + " ?x2 ?y2 <" + uri + "> . } " ; return query ; }
Generate a DELETE query where the object is a specific URI.
Generate a DELETE query where the object is a specific URI .
// avoid catastrophic delete by checking that URI does not start with ?    // uri is object