public interface ResourceProvider
| Modifier and Type | Method and Description |
|---|---|
String |
getDataProviderId(String path)
Returns the data provider identifier used in ECloud.
|
eu.europeana.cloud.common.model.DataProviderProperties |
getDataProviderProperties(String path)
Get basic information on data provider such as organisation name, address and others.
|
int |
getFileCount(String localId)
Determine the number of files that should be added for the specified local identifier.
|
String |
getFilename(String location,
String path)
Determines user filename from the specified path to file and location.
|
String |
getLocalIdentifier(String location,
String path,
boolean duplicate)
Get local identifier of the record for the specified path to file and provider identifier.
|
List<URI> |
getLocations()
Return resource provider location as URI.
|
String |
getRepresentationName()
Return the default representation name of records added for this resource provider.
|
String |
getResourceProviderId(String path)
Get resource provider identifier as string.
|
Map<String,String> |
getReversedMapping()
Mapping file can associate local record identifier with a set of paths to files.
|
boolean |
isLocal()
Checks whether the provider location is local.
|
Map<String,List<FilePaths>> |
scan()
Scan location in case it's local.
|
List<FilePaths> |
split(List<FilePaths> paths)
Resource provider implementation may split the file paths that will be migrated into several parts.
|
boolean |
usePathsFile()
Indicates whether file paths to process should be stored in a file.
|
String getResourceProviderId(String path)
path - path to resourceString getDataProviderId(String path)
path - path to file that may be used to determine the data provider identifier if it's not defined in configurationeu.europeana.cloud.common.model.DataProviderProperties getDataProviderProperties(String path)
DataProviderProperties for details.path - path to directory where the data provider properties file is locatedString getLocalIdentifier(String location, String path, boolean duplicate)
location - location of the file pathpath - path to fileduplicate - indicate whether this may be a duplicateString getRepresentationName()
List<URI> getLocations()
boolean isLocal()
Map<String,List<FilePaths>> scan()
String getFilename(String location, String path)
location - location where the path is placed, usually needed to determine file path relative to locationpath - path to file either local or remote in URI syntaxint getFileCount(String localId)
localId - local identifier of the recordList<FilePaths> split(List<FilePaths> paths)
paths - paths to files that will be migratedboolean usePathsFile()
Map<String,String> getReversedMapping()
Copyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.