Package org.apache.clerezza.rdf.core

Examples of org.apache.clerezza.rdf.core.MGraph.removeAll()


                Triple triple = tripleItr.next();
                willBeRemoved.add(triple);
            }
        }

        enhancementGraph.removeAll(willBeRemoved);
    }

    private void updateEnhancementGraph(ContentItem ci) throws StoreException {
        MGraph enhancementGraph = getEnhancementGraph();
        // Delete old enhancements which belong to this content item from the
View Full Code Here


        //assert ID
        assertEquals(contentItem.getUri(), ci.getUri());
        //assert metadata
        MGraph copy = new SimpleMGraph();
        copy.addAll(contentItem.getMetadata());
        assertTrue(copy.removeAll(ci.getMetadata()));
        assertTrue(copy.isEmpty());
        //assert Blob
        assertEquals(contentItem.getBlob().getMimeType(), ci.getBlob().getMimeType());
        String content = IOUtils.toString(contentItem.getStream(),"UTF-8");
        String readContent = IOUtils.toString(ci.getStream(), "UTF-8");
View Full Code Here

            while(entityTriples.hasNext()){
                expected.add(entityTriples.next());
            }
        }
        MGraph notExpected = new IndexedMGraph(testData);
        notExpected.removeAll(expected);
        Assert.assertTrue(metadata.containsAll(expected));
        Assert.assertTrue(Collections.disjoint(metadata, notExpected));
    }

    private static class TestDereferencer implements EntityDereferencer {
View Full Code Here

        null);
    List<Triple> willBeRemoved = new ArrayList<Triple>();
    while (it.hasNext()) {
      willBeRemoved.add(it.next());
    }
    enhancementGraph.removeAll(willBeRemoved);
  }

  private void updateEnhancementGraph(SolrContentItem sci) {
    MGraph enhancementGraph = getEnhancementGraph();
    // Delete old enhancements which belong to this content item from the
View Full Code Here

        //assert ID
        assertEquals(contentItem.getUri(), ci.getUri());
        //assert metadata
        MGraph copy = new SimpleMGraph();
        copy.addAll(contentItem.getMetadata());
        assertTrue(copy.removeAll(ci.getMetadata()));
        assertTrue(copy.isEmpty());
        //assert Blob
        assertEquals(contentItem.getBlob().getMimeType(), ci.getBlob().getMimeType());
        String content = IOUtils.toString(contentItem.getStream(),"UTF-8");
        String readContent = IOUtils.toString(ci.getStream(), "UTF-8");
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.