* @param forward true to match in the forward direction.
* @param backward true to match in the backward direction.
*/
public void addRelation(Relation rel, boolean forward, boolean backward) {
if (map.containsKey(rel)) {
DirectedRelation d = map.get(rel);
d.setMatchForward(d.matchForward() || forward);
d.setMatchBackward(d.matchBackward() || backward);
} else {
map.put(rel, new BasicDirectedRelation(rel, forward, backward));
}
}