Tabnine Logo
UpdateDataDelete.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.jena.sparql.modify.request.UpdateDataDelete
constructor

Best Java code snippets using org.apache.jena.sparql.modify.request.UpdateDataDelete.<init> (Showing top 9 results out of 315)

origin: apache/jena

  @Override
  public QuadDataAccSink createDeleteDataSink()
  {
    QuadDataAcc quads = new QuadDataAcc();
    send(new UpdateDataDelete(quads));
    
    return quads;
  }
}
origin: SmartDataAnalytics/jena-sparql-api

public static UpdateDataDelete clone(UpdateDataDelete update) {
  UpdateDataDelete result = new UpdateDataDelete(new QuadDataAcc(update.getQuads()));
  return result;
}
origin: SmartDataAnalytics/jena-sparql-api

public static UpdateRequest createUpdateRequest(Iterator<? extends Quad> added, Iterator<? extends Quad> removed) {
  UpdateRequest result = new UpdateRequest();
  if(added != null && added.hasNext()) {
    QuadDataAcc insertQuads = new QuadDataAcc(Lists.newArrayList(added));
    UpdateData insertData = new UpdateDataInsert(insertQuads);
    result.add(insertData);
  }
  if(removed != null && removed.hasNext()) {
    QuadDataAcc deleteQuads = new QuadDataAcc(Lists.newArrayList(removed));
    UpdateData deleteData = new UpdateDataDelete(deleteQuads);
    result.add(deleteData);
  }
  return result;
}
origin: apache/jena

private Update buildNoWhere() {
  if (inserts.isEmpty()) {
    QuadDataAcc quadData = new QuadDataAcc(getQuads(deletes).mapWith(new Function<Quad, Quad>() {
      @Override
      public Quad apply(Quad arg0) {
        return check(arg0);
      }
    }).toList());
    return new UpdateDataDelete(quadData);
  }
  if (deletes.isEmpty()) {
    QuadDataAcc quadData = new QuadDataAcc(getQuads(inserts).mapWith(new Function<Quad, Quad>() {
      @Override
      public Quad apply(Quad t) {
        return check(t);
      }
    }).toList());
    return new UpdateDataInsert(quadData);
  }
  throw new IllegalStateException("Can not have both insert and delete without a where clause");
}
origin: org.apache.jena/jena-querybuilder

private Update buildNoWhere() {
  if (inserts.isEmpty()) {
    QuadDataAcc quadData = new QuadDataAcc(getQuads(deletes).mapWith(new Function<Quad, Quad>() {
      @Override
      public Quad apply(Quad arg0) {
        return check(arg0);
      }
    }).toList());
    return new UpdateDataDelete(quadData);
  }
  if (deletes.isEmpty()) {
    QuadDataAcc quadData = new QuadDataAcc(getQuads(inserts).mapWith(new Function<Quad, Quad>() {
      @Override
      public Quad apply(Quad t) {
        return check(t);
      }
    }).toList());
    return new UpdateDataInsert(quadData);
  }
  throw new IllegalStateException("Can not have both insert and delete without a where clause");
}
origin: apache/jena

@Test public void testDelete3()
{
  DatasetGraph gStore = getEmptyDatasetGraph() ;
  defaultGraphData(gStore, graph1) ;
  QuadDataAcc acc = new QuadDataAcc() ;
  UpdateDataDelete delete = new UpdateDataDelete(acc) ;
  acc.addTriple(triple1) ;
  UpdateAction.execute(delete, gStore) ;
  assertTrue(graphEmpty(gStore.getDefaultGraph())) ;
}

origin: apache/jena

@Test public void testDeleteData2()
{
  DatasetGraph gStore = getEmptyDatasetGraph() ;
  defaultGraphData(gStore, graph1) ;
  QuadDataAcc acc = new QuadDataAcc() ;
  acc.addTriple(triple1) ;
  UpdateDataDelete delete = new UpdateDataDelete(acc) ;
  UpdateProcessor uProc = UpdateExecutionFactory.create(delete, gStore) ;
  uProc.execute(); 
  assertTrue(graphEmpty(gStore.getDefaultGraph())) ;
  assertFalse(graphContains(gStore.getDefaultGraph(), triple1)) ;
}

origin: apache/jena

@Test public void testDelete4()
{
  DatasetGraph gStore = getEmptyDatasetGraph() ;
  namedGraphData(gStore, graphIRI, data1()) ;
  
  QuadDataAcc acc = new QuadDataAcc() ;
  UpdateDataDelete delete = new UpdateDataDelete(acc) ;
  acc.setGraph(graphIRI) ;
  acc.addTriple(triple1) ;
  UpdateAction.execute(delete, gStore) ;
  assertTrue(graphEmpty(gStore.getGraph(graphIRI))) ;
  assertTrue(graphEmpty(gStore.getDefaultGraph())) ;
}

origin: apache/jena

@Test public void testDeleteData1()
{
  DatasetGraph gStore = getEmptyDatasetGraph() ;
  defaultGraphData(gStore, graph1) ;
  QuadDataAcc acc = new QuadDataAcc() ;
  acc.addTriple(triple2) ;
  UpdateDataDelete delete = new UpdateDataDelete(acc) ;
  UpdateProcessor uProc = UpdateExecutionFactory.create(delete, gStore) ;
  uProc.execute(); 
  assertFalse(graphEmpty(gStore.getDefaultGraph())) ;
  assertTrue(graphContains(gStore.getDefaultGraph(), triple1)) ;
  assertFalse(graphContains(gStore.getDefaultGraph(), triple2)) ;
}
org.apache.jena.sparql.modify.requestUpdateDataDelete<init>

Popular methods of UpdateDataDelete

  • getQuads

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JLabel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now