Examples of IndexedMGraph


Examples of org.apache.stanbol.commons.indexedgraph.IndexedMGraph

        validateDereferencedEntities(ci.getMetadata());
    }

    private void validateDereferencedEntities(TripleCollection metadata) {
        Iterator<Triple> referenced = metadata.filter(null, ENHANCER_ENTITY_REFERENCE, null);
        MGraph expected = new IndexedMGraph();
        while(referenced.hasNext()){
            UriRef entity = (UriRef)referenced.next().getObject();
            Iterator<Triple> entityTriples = testData.filter(entity, null, null);
            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));
    }
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.