Interface ResourceReferences
- All Known Implementing Classes:
StandardResourceReferences
public interface ResourceReferences
A representation of zero or more
ResourceReference
s-
Method Summary
Modifier and TypeMethodDescriptionasList()
asURLs()
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.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.int
getCount()
-
Method Details
-
asList
List<ResourceReference> asList()- Returns:
- a List representation of all Resource References
-
asLocations
- Returns:
- a list of all Resource References' locations
-
asURLs
- Returns:
- a list of all Resource References' URLs
-
getCount
int getCount()- Returns:
- the number of Resource References held
-
flatten
ResourceReferences 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. CallingasList()
would return a single ResourceReference. But callingflatten()
would return a new ResourceReferences type whoseasList()
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, useflattenRecursively()
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. CallingasList()
would return a single ResourceReference. But callingflatten()
would return a new ResourceReferences type whoseasList()
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
-