- /**
- * Extract the multiplicity type from the Edge rules
- *
- * @param key
- * @return
- * @throws CrudException
- */
- public String lookupRelationMultiplicity(String key) throws CrudException {
- EdgeRule edgeRule = relationshipRules.get(key);
-
- if (edgeRule == null) {
- throw new CrudException("Invalid source/target/relationship type: " + key, Status.BAD_REQUEST);
- }
-
- if (edgeRule.getMultiplicityRule() != null) {
- return edgeRule.getMultiplicityRule().toString();
- }
-
- return null;
- }
-