@Override public boolean equals(final Object other) { if (this == other) return true; if (!(other instanceof DefaultEdge)) return false; final DefaultEdge that = (DefaultEdge) other; return _from.equals(that._from) && _role.equals(that._role) && _to.equals(that._to); }
@Override public boolean equals(final Object other) { if (this == other) return true; if (!(other instanceof DefaultEdge)) return false; final DefaultEdge that = (DefaultEdge) other; return _from.equals(that._from) && _role.equals(that._role) && _to.equals(that._to); }
/** * {@inheritDoc} */ @Override public Node getNeighbor(final Node node) { if (_from.equals(node)) return _to; else if (_to.equals(node)) return _from; else return null; }
/** * {@inheritDoc} */ @Override public Node getNeighbor(final Node node) { if (_from.equals(node)) return _to; else if (_to.equals(node)) return _from; else return null; }
public boolean isSame(final Node node) { return getSame().equals(node.getSame()); }
public boolean isSame(final Node node) { return getSame().equals(node.getSame()); }
public Edge getExactEdge(final Individual from, final Role role, final Node to) { for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().equals(role)) && (to == null || to.equals(e.getTo()))) return e; return null; }
public Edge getExactEdge(final Individual from, final Role role, final Node to) { for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().equals(role)) && (to == null || to.equals(e.getTo()))) return e; return null; }
/** * Equals method */ @Override public boolean equals(final Object other) { if (other instanceof ClashDependency) return _assertion.equals(((ClashDependency) other)._assertion) && _clash.getNode().equals(((ClashDependency) other)._clash.getNode()) && _clash.getType() == ((ClashDependency) other)._clash.getType() && _clash.getDepends().equals(((ClashDependency) other)._clash.getDepends()); else return false; }
/** * Similar to {@link #hasEdge(Individual, Role, Node)} but does not consider subproperty hierarchy for matching so only exact predicate matches are * considered. * * @param from * @param role * @param to * @return true if contains an edge that match */ public boolean hasExactEdge(final Individual from, final Role role, final Node to) { for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().equals(role)) && (to == null || to.equals(e.getTo()))) return true; return false; }
/** * Equals method */ @Override public boolean equals(final Object other) { if (other instanceof ClashDependency) return _assertion.equals(((ClashDependency) other)._assertion) && _clash.getNode().equals(((ClashDependency) other)._clash.getNode()) && _clash.getType() == ((ClashDependency) other)._clash.getType() && _clash.getDepends().equals(((ClashDependency) other)._clash.getDepends()); else return false; }
private void getDescendants(final Individual ind, final List<Individual> descendants) { descendants.add(ind); for (final Edge edge : ind.getOutEdges()) if (edge.getTo().isIndividual() && !edge.getTo().equals(ind)) getDescendants((Individual) edge.getTo(), descendants); }
private void getDescendants(final Individual ind, final List<Individual> descendants) { descendants.add(ind); for (final Edge edge : ind.getOutEdges()) if (edge.getTo().isIndividual() && !edge.getTo().equals(ind)) getDescendants((Individual) edge.getTo(), descendants); }
public DependencySet check(final Individual node1, final Node node2) { final EdgeList list = node1.getRNeighborEdges(_role); for (int i = 0, n = list.size(); i < n; i++) { final Edge edge = list.get(i); if (edge.getNeighbor(node1).equals(node2)) return edge.getDepends(); } return null; }
public DependencySet check(final Individual node1, final Node node2) { final EdgeList list = node1.getRNeighborEdges(_role); for (int i = 0, n = list.size(); i < n; i++) { final Edge edge = list.get(i); if (edge.getNeighbor(node1).equals(node2)) return edge.getDepends(); } return null; }
/** * Sets the _blocker to the specified child of the _current _blocker and returns if the new _blocker candidate is allowed to block. The child is not allowed * to block if it is a literal, or a root, or pruned/merged, or is _blocked itself. * * @param child child of the _current _blocker * @return <code>true</code> if the new _blocker candidate is allowed to block */ public boolean moveBlockerDown(final Node child) { if (child.isLiteral() || child.isRoot() || child.isPruned() || child.isMerged() || ((Individual) child).isBlocked() || child.equals(_blocker)) return false; _blocker = (Individual) child; _rolesToBlocked = null; return true; }
/** * Sets the _blocker to the specified child of the _current _blocker and returns if the new _blocker candidate is allowed to block. The child is not allowed * to block if it is a literal, or a root, or pruned/merged, or is _blocked itself. * * @param child child of the _current _blocker * @return <code>true</code> if the new _blocker candidate is allowed to block */ public boolean moveBlockerDown(final Node child) { if (child.isLiteral() || child.isRoot() || child.isPruned() || child.isMerged() || ((Individual) child).isBlocked() || child.equals(_blocker)) return false; _blocker = (Individual) child; _rolesToBlocked = null; return true; }
/** * Checks if this list contains an edge matching the given subject, predicate and object. A null parameter is treated as a wildcard matching every value and * predicates are matched by considering the subproperty hierarchy, i.e. passing the parameter <code>sup</code> to this function will return * <code>true</code> if an edge with subproperty <code>sub</code> exists. * * @param from * @param role * @param to * @return true if contains an edge that match */ public boolean hasEdge(final Individual from, final Role role, final Node to) { for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().isSubRoleOf(role)) && (to == null || to.equals(e.getTo()))) return true; return false; }
private EdgeList findEdges(final Role role, final Individual from, final Node to) { final EdgeList result = new EdgeList(); for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().isSubRoleOf(role)) && (to == null || to.equals(e.getTo()))) result.addEdge(e); return result; }
private EdgeList findEdges(final Role role, final Individual from, final Node to) { final EdgeList result = new EdgeList(); for (final Edge e : this) if ((from == null || from.equals(e.getFrom())) && (role == null || e.getRole().isSubRoleOf(role)) && (to == null || to.equals(e.getTo()))) result.addEdge(e); return result; }