code: public RepositoryResourceImpl createResourceFromAsset(Asset ass, RepositoryConnection connection) throws RepositoryBackendException {
  
          // No wlp information means no type set, so can't create a resource from this....
          RepositoryResourceImpl result;
          if (null == ass.getWlpInformation() ||
              ass.getType() == null) {
              result = new RepositoryResourceImpl(connection, ass) {};
          } else {
              result = createResource(ass.getType(), connection, ass);
          }
          result.parseAttachmentsInAsset();
          return result;
      }
docs: Creates a resources from the supplied asset
  
  @param ass The asset to create the resource from.
  @param userId user id to log on to massive with
  @param password password to log on to massive with
  @param apiKey the apikey for the marketplace
  @return
  @throws RepositoryBackendException