OWLGraphEdge { @Override public boolean equals(Object e) { return this.equals(e, false, false); } OWLGraphEdge(OWLObject source, OWLObject target,
			OWLOntology ontology, OWLQuantifiedProperty qp);  OWLGraphEdge(OWLRestriction s, OWLObject t,
			OWLQuantifiedProperty el, OWLOntology o);  OWLGraphEdge(OWLObject source, OWLObject target, List<OWLQuantifiedProperty> qpl, OWLOntology ontology);  OWLGraphEdge(OWLObject source, OWLObject target, List<OWLQuantifiedProperty> qpl, 
            OWLOntology ontology, Set<OWLAxiom> axioms, 
            OWLClass gciFiller, OWLObjectPropertyExpression gciRelation);  OWLGraphEdge(OWLObject source, OWLObject target, OWLOntology ontology);  OWLGraphEdge(OWLObject source, OWLObject target, OWLOntology ontology, 
            Set<OWLAxiom> underlyingAxioms, 
            OWLClass gciFiller, OWLObjectPropertyExpression gciRelation);  OWLGraphEdge(OWLObject source, OWLObject target);  OWLGraphEdge(OWLObject s, OWLObject t, OWLObjectPropertyExpression p,
			Quantifier q, OWLOntology o);  OWLGraphEdge(OWLObject s, OWLObject t, OWLObjectPropertyExpression p,
            Quantifier q, OWLOntology o, OWLAxiom ax);  OWLGraphEdge(OWLObject s, OWLObject t, OWLObjectPropertyExpression p,
            Quantifier q, OWLOntology o, OWLAxiom ax, 
            OWLClass gciFiller, OWLObjectPropertyExpression gciRelation);  OWLGraphEdge(OWLObject s, OWLObject t, Quantifier q);  OWLGraphEdge(OWLGraphEdge edge); OWLObject getSource(); String getSourceId(); void setSource(OWLObject source); OWLObject getTarget(); String getTargetId(); void setTarget(OWLObject target); int getDistance(); void setDistance(int distance); List<OWLQuantifiedProperty> getQuantifiedPropertyList(); void setQuantifiedPropertyList(List<OWLQuantifiedProperty> qps); OWLQuantifiedProperty getSingleQuantifiedProperty(); OWLQuantifiedProperty getFirstQuantifiedProperty(); OWLQuantifiedProperty getLastQuantifiedProperty(); void setSingleQuantifiedProperty(OWLQuantifiedProperty qp); OWLQuantifiedProperty getFinalQuantifiedProperty(); OWLOntology getOntology(); void setOntology(OWLOntology ontology); boolean isSourceNamedObject(); boolean isTargetNamedObject(); OWLClass getGCIFiller(); OWLObjectPropertyExpression getGCIRelation(); boolean isGCI(); Set<OWLAxiom> getAxioms(); Set<OWLSubClassOfAxiom> getSubClassOfAxioms(); OWLGraphEdge merge(OWLGraphEdge edge); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object e); boolean equalsIgnoreOntology(Object e); boolean equalsIgnoreOntologyAndGCI(Object e); boolean equalsGCI(OWLGraphEdge e);  }
@Test public void testEquals() throws OWLOntologyCreationException, IOException { ParserWrapper parserWrapper = new ParserWrapper(); OWLOntology ont = parserWrapper.parse(OWLGraphWrapperEdgesExtendedTest.class.getResource( "/graph/OWLGraphManipulatorTest.obo").getFile()); OWLGraphWrapper wrapper = new OWLGraphWrapper(ont); OWLObjectProperty partOf = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLClass source = wrapper.getOWLClassByIdentifier("FOO:0002"); OWLClass target = wrapper.getOWLClassByIdentifier("FOO:0001"); OWLClass taxon = wrapper.getOWLClassByIdentifier("NCBITaxon:9606"); OWLClass taxon2 = wrapper.getOWLClassByIdentifier("NCBITaxon:10090"); OWLGraphEdge edge1 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont, null, taxon, partOf); OWLGraphEdge edge2 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont, null, taxon, partOf); assertTrue("Equal edges seen as non-equal", edge1.equals(edge2)); assertEquals("Equal edges with different hashCodes", edge1.hashCode(), edge2.hashCode()); assertTrue("Equal edges seen as non-equal", edge1.equalsIgnoreOntology(edge2)); assertTrue("Equal edges seen as non-equal", edge1.equalsIgnoreOntologyAndGCI(edge2)); edge2 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, wrapper.getManager().createOntology(), null, taxon, partOf); assertFalse("Different edges seen as equal", edge1.equals(edge2)); assertTrue("Equal edges with different ontologies seen as non-equal " + "by equalsIgnoreOntology", edge1.equalsIgnoreOntology(edge2)); assertTrue("Equal edges with different ontologies seen as non-equal " + "by equalsIgnoreOntologyAndGCI", edge1.equalsIgnoreOntologyAndGCI(edge2)); edge2 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont, null, taxon2, partOf); assertFalse("Different edges seen as equal", edge1.equals(edge2)); assertTrue("Equal edges with different GCI fillers and relations seen as non-equal " + "by equalsIgnoreOntologyAndGCI", edge1.equalsIgnoreOntologyAndGCI(edge2)); }