code: public List<Attribute> setupResources(Map<URI, AttributeValue> res, RelationshipResolver relationshipResolver)
              throws MelcoeXacmlException {
  
          if (res == null || res.size() == 0) {
              return new ArrayList<Attribute>();
          }
  
          List<Attribute> attributes = new ArrayList<Attribute>(res.size());
          try {
              String pid = null;
              AttributeValue pidAttr = res.get(Constants.XACML1_RESOURCE.ID.attributeId);
              if (pidAttr != null) {
                  pid = pidAttr.encode();
                  pid = relationshipResolver.buildRESTParentHierarchy(pid);
  
                  String dsid = null;
                  AttributeValue dsidAttr =
                          res.get(Constants.DATASTREAM.ID.attributeId);
                  if (dsidAttr != null) {
                      dsid = dsidAttr.encode();
                      if (!dsid.isEmpty()) {
                          pid += "/" + dsid;
                      }
                  }
  
                  res.put(Constants.XACML1_RESOURCE.ID.attributeId, new AnyURIAttribute(new URI(pid)));
              }
          } catch (Exception e) {
              logger.error("Error finding parents.", e);
              throw new MelcoeXacmlException("Error finding parents.", e);
          }
  
          for (URI uri : res.keySet()) {
              attributes.add(new SingletonAttribute(uri, null, null, res.get(uri)));
          }
  
          return attributes;
      }
docs: Creates a Resource specifying the resource-id, a required attribute.
  
  @return a Set of Attributes for inclusion in a Request