GR - the gCore Resource class to map on gCure Model ResourceR - the gCube Model Resource which map the gCore Resource classpublic abstract class GCoreResourceMapper<GR extends org.gcube.common.resources.gcore.Resource,R extends org.gcube.informationsystem.model.reference.entities.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 |
protected boolean |
statistics |
static String |
TYPE |
static String |
UPDATE |
static String |
UTF8 |
| Modifier | Constructor and Description |
|---|---|
protected |
GCoreResourceMapper(Class<GR> grClass,
Class<R> rClass,
boolean filteredReport,
Boolean statistics) |
| 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 |
getReportFile(Class<?> rClass,
String contextFullName,
Calendar calendar) |
File |
getStatisticFile(Class<?> rClass,
String contextFullName,
Calendar calendar) |
protected String |
getStringAsUTF8(String s) |
protected String |
getUnmarshalledResource(GR gr) |
protected String |
getUsername() |
protected abstract R |
map(GR gr) |
protected R |
mapAndPublish(GR gr) |
protected void |
notifyFailures(int allSize,
List<GR> failed,
Calendar start,
File reportFile) |
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 Class<R extends org.gcube.informationsystem.model.reference.entities.Resource> rClass
protected final boolean filteredReport
protected final boolean statistics
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()
public File getStatisticFile(Class<?> rClass, String contextFullName, Calendar calendar)
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.ResourceRegistryExceptionprotected void notifyFailures(int allSize,
List<GR> failed,
Calendar start,
File reportFile)
public void export()
Copyright © 2020. All Rights Reserved.