/** Returns a map of the sub-resources on this resource. */
  public Map<String, RestResource> getResources() {
    if (resource.getResources() == null) {
      return Collections.emptyMap();
    }

    return Maps.transformValues(
        resource.getResources(),
        new Function<Restresource, RestResource>() {
          public RestResource apply(Restresource input) {
            return new RestResource(input, topLevelSchemas);
          }
        });
  }