T - The type of the data to locatepublic abstract class DataLocator<T>
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
DataLocator.ResourceLocator
Locator that returns
Resources. |
| Constructor and Description |
|---|
DataLocator(java.util.Map<java.lang.String,java.lang.String> sparkContext) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.Optional<T> |
readFrom(org.openstreetmap.atlas.streaming.resource.Resource resource)
Transform a resource into a fetched object
|
java.lang.Iterable<T> |
retrieve(java.lang.Iterable<java.lang.String> paths)
Retrieve some resources
|
java.util.Optional<T> |
retrieve(java.lang.String path)
Retrieve a resource
|
public DataLocator(java.util.Map<java.lang.String,java.lang.String> sparkContext)
public java.lang.Iterable<T> retrieve(java.lang.Iterable<java.lang.String> paths)
paths - The paths to getpublic java.util.Optional<T> retrieve(java.lang.String path)
path - The path of the resourceprotected abstract java.util.Optional<T> readFrom(org.openstreetmap.atlas.streaming.resource.Resource resource)
resource - The resource to read