Package org.apache.clerezza.rdf.core.access

Examples of org.apache.clerezza.rdf.core.access.TcProvider.deleteTripleCollection()


        mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
        Graph graph = mGraph.getGraph();
        simpleTcmProvider.createGraph(uriRefA, graph);
        simpleTcmProvider.createGraph(uriRefC, graph);

        simpleTcmProvider.deleteTripleCollection(uriRefA);
        try {
            simpleTcmProvider.getGraph(uriRefA);
            assertTrue(false);
        } catch (NoSuchEntityException e) {
            assertTrue(true);
View Full Code Here


        UriRef name2 = new UriRef("http://myGraph2");
        Graph secondGraph = provider.createGraph(name2, triples);

        //if we delete graph with name1, the second graph should still be there
        provider.deleteTripleCollection(name1);

        provider = getInstance();
        Graph firstGraph = provider.getGraph(name2);
        assertNotNull(firstGraph);
View Full Code Here

    mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
    Graph graph = mGraph.getGraph();
    simpleTcmProvider.createGraph(uriRefA, graph);
    simpleTcmProvider.createGraph(uriRefC, graph);

    simpleTcmProvider.deleteTripleCollection(uriRefA);
    try {
      simpleTcmProvider.getGraph(uriRefA);
      assertTrue(false);
    } catch (NoSuchEntityException e) {
      assertTrue(true);
View Full Code Here

    UriRef name2 = new UriRef("http://myGraph2");
    Graph secondGraph = provider.createGraph(name2, triples);

    //if we delete graph with name1, the second graph should still be there
    provider.deleteTripleCollection(name1);

    provider = getInstance();
    Graph firstGraph = provider.getGraph(name2);
    assertNotNull(firstGraph);
View Full Code Here

  @Override
  public void testDeleteEntity() {
    TcProvider fileTcProvider = getInstance();
    MGraph mGraph = fileTcProvider.createMGraph(uriRefA);
    mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
    fileTcProvider.deleteTripleCollection(uriRefA);
    try {
      fileTcProvider.getMGraph(uriRefA);
      assertTrue(false);
    } catch (NoSuchEntityException e) {
      assertTrue(true);
View Full Code Here

    provider.createMGraph(uriRefB);
    expected.add(uriRefB.getUnicodeString());
    assertTrue(expected.equals(getLinesFromFile(dataFile)));
 
    provider.deleteTripleCollection(uriRefA);
    expected.remove(uriRefA.getUnicodeString());
    assertTrue(expected.equals(getLinesFromFile(dataFile)));
   
    provider.deleteTripleCollection(uriRefB);
    expected.remove(uriRefB.getUnicodeString());
View Full Code Here

 
    provider.deleteTripleCollection(uriRefA);
    expected.remove(uriRefA.getUnicodeString());
    assertTrue(expected.equals(getLinesFromFile(dataFile)));
   
    provider.deleteTripleCollection(uriRefB);
    expected.remove(uriRefB.getUnicodeString());
    assertTrue(expected.equals(getLinesFromFile(dataFile)));
  }

  @Test
View Full Code Here

    TcProvider tcProvider = EasyMock.createMock(TcProvider.class);
    EasyMock.expect(tcProvider.getMGraph(testMGraphUri0)).andReturn(
        EasyMock.createNiceMock(MGraph.class));
    EasyMock.expect(tcProvider.getMGraph(testMGraphUri1)).andReturn(
        EasyMock.createNiceMock(MGraph.class));
    tcProvider.deleteTripleCollection(testGraphUriA);
    EasyMock.expect(tcProvider.createGraph(EasyMock.eq(testGraphUriA),
        EasyMock.notNull(TripleCollection.class))).andReturn(new SimpleMGraph().getGraph());
    EasyMock.replay(tcProvider);
    Restorer restore = new Restorer();
    restore.parser = Parser.getInstance();
View Full Code Here

        TcProvider tcProvider = EasyMock.createMock(TcProvider.class);
        EasyMock.expect(tcProvider.getMGraph(testMGraphUri0)).andReturn(
                EasyMock.createNiceMock(MGraph.class));
        EasyMock.expect(tcProvider.getMGraph(testMGraphUri1)).andReturn(
                EasyMock.createNiceMock(MGraph.class));
        tcProvider.deleteTripleCollection(testGraphUriA);
        EasyMock.expect(tcProvider.createGraph(EasyMock.eq(testGraphUriA),
                EasyMock.notNull(TripleCollection.class))).andReturn(new SimpleMGraph().getGraph());
        EasyMock.replay(tcProvider);
        Restorer restore = new Restorer();
        restore.parser = Parser.getInstance();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.