Interface ResourceReferences

All Known Implementing Classes:
StandardResourceReferences

public interface ResourceReferences
A representation of zero or more ResourceReferences
  • Method Details

    • asList

      Returns:
      a List representation of all Resource References
    • asLocations

      List<String> asLocations()
      Returns:
      a list of all Resource References' locations
    • asURLs

      List<URL> asURLs()
      Returns:
      a list of all Resource References' URLs
    • getCount

      int getCount()
      Returns:
      the number of Resource References held
    • flatten

      Iterates through the Resource References and for any reference that may represent more than one resource, flattens the resource into a List of single-entity references. For example, consider that this ResourceReferences holds a single ResourceReference, of type DIRECTORY and the referenced directory contains 10 files. Calling asList() would return a single ResourceReference. But calling flatten() would return a new ResourceReferences type whose asList() method would return 10 ResourceReference objects, each with a ResourceType of FILE. The flatten operation is not recursive, meaning that if a DIRECTORY is flattened, any sub-directories will be dropped. If the contents of the subdirectories are to be retained, use flattenRecursively() instead.
      Returns:
      a flattened ResourceReferences
    • flattenRecursively

      ResourceReferences flattenRecursively()
      Recursively iterates through the Resource References and for any reference that may represent more than one resource, flattens the resource into a List of single-entity references. For example, consider that this ResourceReferences holds a single ResourceReference, of type DIRECTORY and the referenced directory contains 10 files. Calling asList() would return a single ResourceReference. But calling flatten() would return a new ResourceReferences type whose asList() method would return 10 ResourceReference objects, each with a ResourceType of FILE. The flatten operation is recursive, meaning that if a DIRECTORY is encountered, its reference will be replaced with a new reference for each file, even if that file exists 100 levels deep in the directory structure.
      Returns:
      a flattened ResourceReferences