code: public static boolean isPublicAsset(ResourceType resourceType, RepositoryResource installResource) {
          if (resourceType.equals(ResourceType.FEATURE) || resourceType.equals(ResourceType.ADDON)) {
              EsaResource esar = ((EsaResource) installResource);
              if (esar.getVisibility().equals(Visibility.PUBLIC) || esar.getVisibility().equals(Visibility.INSTALL)) {
                  return true;
              }
  
          } else if (resourceType.equals(ResourceType.PRODUCTSAMPLE) || resourceType.equals(ResourceType.OPENSOURCE)) {
              return true;
          }
          return false;
      }
docs: Checks if Feature or Addon has visibility public or install
  OR checks if the resource is a Product sample or open source to see if it is a public asset.
  
  @param resourceType - type of repository
  @param installResource - represents a resouce in a repository
  @return - true if the resource is visible to the public