@Test @Ignore("Disabling test due to lack of resources to debug") public void shouldGetOWLGraphEdgeSubRelsReflexive() { OWLOntology ont = this.graphManipulator.getOwlGraphWrapper().getSourceOntology(); OWLClass source = this.graphManipulator.getOwlGraphWrapper().getOWLClassByIdentifier("FOO:0003"); OWLClass target = this.graphManipulator.getOwlGraphWrapper().getOWLClassByIdentifier("FOO:0001"); OWLObjectProperty fakeRel1 = this.graphManipulator.getOwlGraphWrapper(). getOWLObjectPropertyByIdentifier("fake_rel1"); OWLGraphEdge testEdge = new OWLGraphEdge(source, target, fakeRel1, Quantifier.SOME, ont); int subRelRank = 0; for (OWLGraphEdge subRel: this.graphManipulator.getOwlGraphWrapper(). getOWLGraphEdgeSubRelsReflexive(testEdge)) { if (subRelRank == 0) { assertEquals("Incorrect order of sub-properties, 1st relation", "fake_rel1", this.graphManipulator.getOwlGraphWrapper().getIdentifier( subRel.getSingleQuantifiedProperty().getProperty())); } else if (subRelRank == 1) { assertEquals("Incorrect order of sub-properties, 2nd relation", "fake_rel2", this.graphManipulator.getOwlGraphWrapper().getIdentifier( subRel.getSingleQuantifiedProperty().getProperty())); } else if (subRelRank == 2 || subRelRank == 3) { assertTrue("Incorrect order of sub-properties, 3rd or 4th relation", ("fake_rel3".equals(this.graphManipulator.getOwlGraphWrapper().getIdentifier( subRel.getSingleQuantifiedProperty().getProperty())) || "fake_rel4".equals(this.graphManipulator.getOwlGraphWrapper().getIdentifier( subRel.getSingleQuantifiedProperty().getProperty())))); } else { throw new AssertionError("Incorrect number of sub-relations"); } subRelRank++; } assertEquals("Incorrect number of sub-relations", 4, subRelRank); }
public OWLGraphWrapper getOwlGraphWrapper() { return this.owlGraphWrapper; }
OWLGraphManipulator { public OWLGraphWrapper getOwlGraphWrapper() { return this.owlGraphWrapper; } }
OWLGraphManipulator { public OWLGraphWrapper getOwlGraphWrapper() { return this.owlGraphWrapper; } @SuppressWarnings("unused") private  OWLGraphManipulator();  OWLGraphManipulator(OWLOntology ont);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper, boolean performDefaultModifs); }
OWLGraphManipulator { public OWLGraphWrapper getOwlGraphWrapper() { return this.owlGraphWrapper; } @SuppressWarnings("unused") private  OWLGraphManipulator();  OWLGraphManipulator(OWLOntology ont);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper, boolean performDefaultModifs); void makeSimpleOntology(); void simplifies(Collection<String> classIdsToRemove, Collection<String> relIds, 
            Collection<String> toRemoveSubgraphRootIds,
            Collection<String> toFilterSubgraphRootIds,   
            Collection<String> subsetNames); int reduceRelations(); int reducePartOfIsARelations(); int removeClassAndPropagateEdges(String classToRemoveId); int mapRelationsToParent(Collection<String> parentRelations); int mapRelationsToParent(Collection<String> parentRelations, 
    		Collection<String> relsExcluded); Set<String> filterSubgraphs(Collection<String> allowedSubgraphRootIds); Set<String> removeSubgraphs(Collection<String> subgraphRootIds, 
            boolean keepSharedClasses); Set<String> removeSubgraphs(Collection<String> subgraphRootIds, 
            boolean keepSharedClasses, Collection<String> allowedSubgraphRootIds); int filterRelations(Collection<String> allowedRels, boolean allowSubRels); void removeUnrelatedRelations(Collection<String> allowedRels); int removeRelations(Collection<String> forbiddenRels, boolean forbidSubRels); int removeRelsToSubsets(Collection<String> subsets); int removeRelsToSubsets(Collection<String> subsets, 
	        Collection<String> classIdsExcluded); int removeDirectEdgesBetween(String sourceId, String targetId); boolean removeEdge(OWLGraphEdge edge); int removeEdges(Collection<OWLGraphEdge> edges); boolean addEdge(OWLGraphEdge edge); int addEdges(Set<OWLGraphEdge> edges); boolean removeClass(OWLClass classToDel); Set<OWLClass> removeClasses(Set<OWLClass> classesToDel); Set<OWLClass> filterClasses(Set<OWLClass> classesToKeep); boolean isASubClassOfEdge(OWLGraphEdge edge); boolean isAPartOfEdge(OWLGraphEdge edge); OWLGraphWrapper getOwlGraphWrapper(); }
OWLGraphManipulator { public OWLGraphWrapper getOwlGraphWrapper() { return this.owlGraphWrapper; } @SuppressWarnings("unused") private  OWLGraphManipulator();  OWLGraphManipulator(OWLOntology ont);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper);  OWLGraphManipulator(OWLGraphWrapper owlGraphWrapper, boolean performDefaultModifs); void makeSimpleOntology(); void simplifies(Collection<String> classIdsToRemove, Collection<String> relIds, 
            Collection<String> toRemoveSubgraphRootIds,
            Collection<String> toFilterSubgraphRootIds,   
            Collection<String> subsetNames); int reduceRelations(); int reducePartOfIsARelations(); int removeClassAndPropagateEdges(String classToRemoveId); int mapRelationsToParent(Collection<String> parentRelations); int mapRelationsToParent(Collection<String> parentRelations, 
    		Collection<String> relsExcluded); Set<String> filterSubgraphs(Collection<String> allowedSubgraphRootIds); Set<String> removeSubgraphs(Collection<String> subgraphRootIds, 
            boolean keepSharedClasses); Set<String> removeSubgraphs(Collection<String> subgraphRootIds, 
            boolean keepSharedClasses, Collection<String> allowedSubgraphRootIds); int filterRelations(Collection<String> allowedRels, boolean allowSubRels); void removeUnrelatedRelations(Collection<String> allowedRels); int removeRelations(Collection<String> forbiddenRels, boolean forbidSubRels); int removeRelsToSubsets(Collection<String> subsets); int removeRelsToSubsets(Collection<String> subsets, 
	        Collection<String> classIdsExcluded); int removeDirectEdgesBetween(String sourceId, String targetId); boolean removeEdge(OWLGraphEdge edge); int removeEdges(Collection<OWLGraphEdge> edges); boolean addEdge(OWLGraphEdge edge); int addEdges(Set<OWLGraphEdge> edges); boolean removeClass(OWLClass classToDel); Set<OWLClass> removeClasses(Set<OWLClass> classesToDel); Set<OWLClass> filterClasses(Set<OWLClass> classesToKeep); boolean isASubClassOfEdge(OWLGraphEdge edge); boolean isAPartOfEdge(OWLGraphEdge edge); OWLGraphWrapper getOwlGraphWrapper();  }