public abstract class GCoreResourceMapper<GR extends org.gcube.common.resources.gcore.Resource,R extends org.gcube.informationsystem.model.entity.Resource> extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CREATE |
static String |
DATE |
static String |
ERROR |
static String |
EXCEPTION_TYPE |
static String |
EXPORTED |
static String |
EXPORTED_FROM_OLD_GCORE_IS |
protected boolean |
filteredReport |
protected Class<GR> |
grClass |
static String |
ID |
static String |
MAPPING_ERROR |
static String |
PUBLISHING_ERROR |
protected Class<R> |
rClass |
protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient |
resourceRegistryClient |
protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher |
resourceRegistryPublisher |
static String |
TYPE |
static String |
UPDATE |
static String |
UTF8 |
| Modifier | Constructor and Description |
|---|---|
protected |
GCoreResourceMapper(Class<GR> grClass,
Class<R> rClass,
boolean filteredReport) |
| Modifier and Type | Method and Description |
|---|---|
protected R |
create(R r) |
protected R |
createOrUpdate(R r) |
void |
export() |
protected List<GR> |
getAll() |
static String |
getCurrentContextName() |
static String |
getDateString(Calendar calendar) |
File |
getFile(Class<?> grClass,
String contextFullName,
String dateString) |
protected String |
getStringAsUTF8(String s) |
protected String |
getUsername() |
protected abstract R |
map(GR gr) |
protected R |
mapAndPublish(GR gr) |
protected void |
notifyFailures(int allSize,
List<GR> failed) |
protected R |
read(UUID uuid) |
protected R |
update(R r) |
public static final String EXPORTED
public static final String EXPORTED_FROM_OLD_GCORE_IS
public static final String MAPPING_ERROR
public static final String PUBLISHING_ERROR
public static final String TYPE
public static final String ID
public static final String ERROR
public static final String DATE
public static final String EXCEPTION_TYPE
public static final String CREATE
public static final String UPDATE
protected final boolean filteredReport
public static final String UTF8
protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher resourceRegistryPublisher
protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient resourceRegistryClient
public static String getCurrentContextName()
protected String getStringAsUTF8(String s) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected R create(R r) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected R update(R r) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected R read(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected R createOrUpdate(R r) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void export()
Copyright © 2017. All Rights Reserved.