question: public boolean matches ( final Relation relation , final boolean symmetric ) { final Entity sourceEntity = relation . getSource ( ) ; final Entity targetEntity = relation . getTarget ( ) ; final String sourceType = sourceEntity . getTypeName ( ) ; final String targetType = targetEntity . getTypeName ( ) ; final boolean relationType = type . equalsIgnoreCase ( relation . getRelationshipType ( ) ) && subType . equalsIgnoreCase ( relation . getRelationSubType ( ) ) ; if ( ! symmetric ) { return relationType && typesEqual ( sourceType , targetType ) ; } else { return relationType && ( typesEqual ( sourceType , targetType ) || typesEqual ( targetType , sourceType ) ) ; } }
target:  Check is the relation provided matches this constraint. No inheritence and matches the full (not short) type name.