@Override
  public String toString() {
    StringBuilder sb = new StringBuilder();

    sb.append("Resource : ").append(type).append("\n");
    sb.append("Properties:\n");
    sb.append(propertiesMap);

    return sb.toString();
  }
Construct a resource from the given resource, setting only the properties
that are found in the given set of property and category ids.

@param resource    the resource to copy
@param propertyIds the set of requested property and category ids
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java