Пример #1
0
 /** {@inheritDoc} */
 @Override
 public DataObjectAttribute getAttribute(String attributeName) {
   if (attributeName == null) {
     return null;
   }
   DataObjectAttribute attribute = null;
   // attempt to get it from the local attribute map (if any attributed defined locally)
   if (attributes != null) {
     attribute = attributeMap.get(attributeName);
   }
   // if we don't find one, but we have an embedded metadata object, check it
   if (attribute == null && embedded != null) {
     attribute = embedded.getAttribute(attributeName);
     // but, ensure it's not on the removed attribute list
     if (attribute != null
         && removedAttributeNames != null
         && removedAttributeNames.contains(attribute.getName())) {
       attribute = null;
     }
   }
   return attribute;
 }