code: public List<Attribute> setupAction(Map<URI, AttributeValue> a) {
  
          if (a == null || a.size() == 0) {
              return Collections.emptyList();
          }
  
          List<Attribute> actions = new ArrayList<Attribute>(a.size());
          Map<URI, AttributeValue> newActions =
                  new HashMap<URI, AttributeValue>();
          for (URI uri : a.keySet()) {
              URI newUri = null;
              AttributeValue newValue = null;
  
              if (actionMap != null && actionMap.size() > 0) {
                  newUri = actionMap.get(uri);
              }
  
              if (actionValueMap != null && actionValueMap.size() > 0) {
                  String tmpValue = actionValueMap.get(a.get(uri).encode());
                  if (tmpValue != null) {
                      newValue = new StringAttribute(tmpValue);
                  }
              }
  
              newUri = newUri == null ? uri : newUri;
              newValue = newValue == null ? a.get(uri) : newValue;
              newActions.put(newUri, newValue);
          }
  
          for (URI uri : newActions.keySet()) {
              actions.add(new SingletonAttribute(uri, null, null, newActions.get(uri)));
          }
  
          return actions;
      }
docs: Creates an Action specifying the action-id, an optional attribute.
  
  @return a Set of Attributes for inclusion in a Request