code: public ResourceMetaData getResourceMetaData(Resource resource)
      {
          Object o=resource.getAssociate();
          if (o instanceof ResourceMetaData)
              return (ResourceMetaData)o;
          return new ResourceMetaData(resource);
      }
docs: Get Resource MetaData.
  @param resource
  @return Meta data for the resource.