@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof OWLPropertyAssertionAxiom)) { return false; } OWLPropertyAssertionAxiom<?, ?> other = (OWLPropertyAssertionAxiom<?, ?>) obj; return other.getSubject().equals(subject) && other.getProperty().equals(property) && other.getObject().equals(o); }
public void setObjectPropertyAxiom( OWLPropertyAssertionAxiom<OWLObjectPropertyExpression, OWLNamedIndividual> ax) { // OWLObjectPropertyExpression p = ax.getProperty(); // if (p instanceof OWLObjectProperty) { // this.objectPropertyPanel.setSelection((OWLObjectProperty) p); // } this.individualSelectorPanel.setSelection(ax.getObject()); }
long getObjectPropertyRelationship( OWLPropertyAssertionAxiom<OWLObjectPropertyExpression, OWLIndividual> axiom) { long subject = getOrCreateNode(getIri(axiom.getSubject())); String property = getIri(axiom.getProperty()); long object = getOrCreateNode(getIri(axiom.getObject())); RelationshipType type = RelationshipType.withName(property.toString()); long relationship = getOrCreateRelationship(subject, object, type); graph.setRelationshipProperty(relationship, CommonProperties.IRI, property.toString()); return relationship; }
@Override protected int compareObjectOfSameType(OWLObject object) { OWLPropertyAssertionAxiom<?, ?> other = (OWLPropertyAssertionAxiom<?, ?>) object; int diff = subject.compareTo(other.getSubject()); if (diff != 0) { return diff; } diff = property.compareTo(other.getProperty()); if (diff != 0) { return diff; } return o.compareTo(other.getObject()); }
public void setDataPropertyAxiom(OWLPropertyAssertionAxiom<OWLDataPropertyExpression, OWLLiteral> ax) { constantEditorComponent.setEditedObject(ax.getObject()); }