예제 #1
0
 /** {@inheritDoc} */
 @Override
 public DataObjectRelationship getRelationship(String relationshipName) {
   if (relationshipName == null) {
     return null;
   }
   DataObjectRelationship relationship = null;
   // attempt to get it from the local attribute map (if any attributed defined locally)
   if (relationships != null) {
     relationship = relationshipMap.get(relationshipName);
   }
   // if we don't find one, but we have an embedded metadata object, check it
   if (relationship == null && embedded != null) {
     relationship = embedded.getRelationship(relationshipName);
     // but, ensure it's not on the removed attribute list
     if (relationship != null
         && removedRelationshipNames != null
         && removedRelationshipNames.contains(relationship.getName())) {
       relationship = null;
     }
   }
   return relationship;
 }