public class FoodAndDrinkResourceProvider extends DefaultResourceProvider
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LIST_SIZE |
CONTACT_PERSON_KEY, dataProviderId, DEFAULT_CONTACT_PERSON, DEFAULT_DIGITAL_LIBRARY_WEBSITE, DEFAULT_DIGITAL_LIBRARY_WEBSITE_URL, DEFAULT_OFFICIAL_ADDRESS, DEFAULT_ORGANISATION_NAME, DEFAULT_ORGANISATION_WEBSITE, DEFAULT_ORGANISATION_WEBSITE_URL, DEFAULT_REMARKS, DIGITAL_LIBRARY_WEBSITE_KEY, DIGITAL_LIBRARY_WEBSITE_URL_KEY, local, locations, mappingFile, OFFICIAL_ADDRESS_KEY, ORGANISATION_NAME_KEY, ORGANISATION_WEBSITE_KEY, ORGANISATION_WEBSITE_URL_KEY, PROPERTIES_EXTENSION, REMARKS_KEY, representationName| Constructor and Description |
|---|
FoodAndDrinkResourceProvider(String representationName,
String mappingFile,
String locations,
String dataProviderId) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDataProviderId(String path)
FoodAndDrinkResourceProvider uses the resource provider as the data provider identifier.
|
eu.europeana.cloud.common.model.DataProviderProperties |
getDataProviderProperties(String path)
Input path must point to the file that is either the properties file or the directory that contains
properties file named id.properties where id is identifier of data provider used in ECloud
|
int |
getFileCount(String localId)
Determine the number of files that should be added for the specified local identifier.
|
String |
getFilename(String location,
String path)
User filename must contain provider id and all intermediate directory names between provider directory and image filename
|
String |
getLocalIdentifier(String location,
String path,
boolean duplicate)
Return local record identifier from the path to image file.
|
String |
getResourceProviderId(String path)
Get resource provider identifier as string.
|
List<FilePaths> |
split(List<FilePaths> paths)
Food And Drink resource provider splits the paths list to several lists of more or less equal size around 500.
|
getDataProviderPropertiesFromFile, getDefaultDataProviderProperties, getLocations, getProviderPaths, getProvidersLocation, getRepresentationName, getReversedMapping, isLocal, scan, usePathsFilepublic static final int DEFAULT_LIST_SIZE
public String getLocalIdentifier(String location, String path, boolean duplicate)
location - not used herepath - path to image fileduplicate - not used herepublic String getResourceProviderId(String path)
ResourceProviderpath - path to resourcepublic String getDataProviderId(String path)
path - path to file that may be used to determine the data provider identifier if it's not defined in configurationpublic eu.europeana.cloud.common.model.DataProviderProperties getDataProviderProperties(String path)
path - path to directory where the data provider properties file is locatedpublic String getFilename(String location, String path)
getFilename in interface ResourceProvidergetFilename in class DefaultResourceProviderpath - path to file either local or remote in URI syntaxlocation - location where path is placed, usually path starts with locationpublic int getFileCount(String localId)
ResourceProvidergetFileCount in interface ResourceProvidergetFileCount in class DefaultResourceProviderlocalId - local identifier of the recordpublic List<FilePaths> split(List<FilePaths> paths)
split in interface ResourceProvidersplit in class DefaultResourceProviderpaths - Copyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.