public abstract class DefaultResourceProvider extends Object implements ResourceProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTACT_PERSON_KEY |
protected String |
dataProviderId |
static String |
DEFAULT_CONTACT_PERSON |
static String |
DEFAULT_DIGITAL_LIBRARY_WEBSITE |
static String |
DEFAULT_DIGITAL_LIBRARY_WEBSITE_URL |
static String |
DEFAULT_OFFICIAL_ADDRESS |
static String |
DEFAULT_ORGANISATION_NAME |
static String |
DEFAULT_ORGANISATION_WEBSITE |
static String |
DEFAULT_ORGANISATION_WEBSITE_URL |
static String |
DEFAULT_REMARKS |
static String |
DIGITAL_LIBRARY_WEBSITE_KEY |
static String |
DIGITAL_LIBRARY_WEBSITE_URL_KEY |
protected boolean |
local |
protected List<URI> |
locations |
protected String |
mappingFile |
static String |
OFFICIAL_ADDRESS_KEY |
static String |
ORGANISATION_NAME_KEY |
static String |
ORGANISATION_WEBSITE_KEY |
static String |
ORGANISATION_WEBSITE_URL_KEY |
static String |
PROPERTIES_EXTENSION |
static String |
REMARKS_KEY |
protected String |
representationName |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultResourceProvider(String representationName,
String mappingFile,
String locations,
String dataProviderId) |
| Modifier and Type | Method and Description |
|---|---|
protected eu.europeana.cloud.common.model.DataProviderProperties |
getDataProviderPropertiesFromFile(File dpFile) |
protected eu.europeana.cloud.common.model.DataProviderProperties |
getDefaultDataProviderProperties() |
int |
getFileCount(String localId)
Determine the number of files that should be added for the specified local identifier.
|
String |
getFilename(String location,
String path)
Default implementation of determining filename from path.
|
List<URI> |
getLocations()
Return resource provider location as URI.
|
protected FilePaths |
getProviderPaths(String location,
String providerId,
Map<String,List<FilePaths>> paths) |
URI |
getProvidersLocation(String providerId) |
String |
getRepresentationName()
Return the default representation name of records added for this resource provider.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDataProviderId, getDataProviderProperties, getLocalIdentifier, getResourceProviderIdpublic static final String ORGANISATION_NAME_KEY
public static final String OFFICIAL_ADDRESS_KEY
public static final String ORGANISATION_WEBSITE_KEY
public static final String ORGANISATION_WEBSITE_URL_KEY
public static final String DIGITAL_LIBRARY_WEBSITE_KEY
public static final String DIGITAL_LIBRARY_WEBSITE_URL_KEY
public static final String CONTACT_PERSON_KEY
public static final String REMARKS_KEY
public static final String DEFAULT_ORGANISATION_NAME
public static final String DEFAULT_OFFICIAL_ADDRESS
public static final String DEFAULT_ORGANISATION_WEBSITE
public static final String DEFAULT_ORGANISATION_WEBSITE_URL
public static final String DEFAULT_DIGITAL_LIBRARY_WEBSITE
public static final String DEFAULT_DIGITAL_LIBRARY_WEBSITE_URL
public static final String DEFAULT_CONTACT_PERSON
public static final String DEFAULT_REMARKS
public static final String PROPERTIES_EXTENSION
protected String representationName
protected String mappingFile
protected boolean local
protected String dataProviderId
protected eu.europeana.cloud.common.model.DataProviderProperties getDataProviderPropertiesFromFile(File dpFile)
protected eu.europeana.cloud.common.model.DataProviderProperties getDefaultDataProviderProperties()
public String getRepresentationName()
ResourceProvidergetRepresentationName in interface ResourceProviderpublic List<URI> getLocations()
ResourceProvidergetLocations in interface ResourceProviderpublic boolean isLocal()
ResourceProviderisLocal in interface ResourceProviderpublic Map<String,List<FilePaths>> scan()
ResourceProviderscan in interface ResourceProviderprotected FilePaths getProviderPaths(String location, String providerId, Map<String,List<FilePaths>> paths)
public String getFilename(String location, String path)
getFilename in interface ResourceProviderlocation - location where path is placed, usually path starts with locationpath - path to file either local or remote in URI syntaxpublic int getFileCount(String localId)
ResourceProvidergetFileCount in interface ResourceProviderlocalId - local identifier of the recordpublic List<FilePaths> split(List<FilePaths> paths)
ResourceProvidersplit in interface ResourceProviderpaths - paths to files that will be migratedpublic boolean usePathsFile()
ResourceProviderusePathsFile in interface ResourceProviderpublic Map<String,String> getReversedMapping()
ResourceProvidergetReversedMapping in interface ResourceProviderCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.