Feature #18848, Updated Catalogue ENUM in accounting dashboard harvester
This commit is contained in:
parent
a9ab818768
commit
813531f5ae
|
@ -7,14 +7,14 @@ package org.gcube.dataharvest.datamodel;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* May 22, 2018
|
* @author M. Assante, ISTI-CNR
|
||||||
*/
|
*/
|
||||||
public enum HarvestedDataKey {
|
public enum HarvestedDataKey {
|
||||||
|
|
||||||
CATALOGUE_ACCESSES("Catalogue Home Accesses"),
|
CATALOGUE_ACCESSES("Catalogue Accesses"),
|
||||||
CATALOGUE_DATASET_LIST_ACCESSES("Catalogue Datasets List (Also Filtered)"),
|
CATALOGUE_DATASET_LIST_ACCESSES("Item List"),
|
||||||
CATALOGUE_DATASET_ACCESSES("Catalogue Dataset"),
|
CATALOGUE_DATASET_ACCESSES("Item Metadata"),
|
||||||
CATALOGUE_RESOURCE_ACCESSES("Catalogue Resource"),
|
CATALOGUE_RESOURCE_ACCESSES("Item Resource"),
|
||||||
ACCESSES("VRE Accesses"),
|
ACCESSES("VRE Accesses"),
|
||||||
USERS("VRE Users"),
|
USERS("VRE Users"),
|
||||||
DATA_METHOD_DOWNLOAD("Data/Method download"),
|
DATA_METHOD_DOWNLOAD("Data/Method download"),
|
||||||
|
|
|
@ -734,9 +734,10 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||||
@Test
|
@Test
|
||||||
public void testCatalogueHarvester() {
|
public void testCatalogueHarvester() {
|
||||||
try {
|
try {
|
||||||
|
// String context = ROOT;
|
||||||
|
String context = "/gcube";
|
||||||
//Utils.setContext(RESOURCE_CATALOGUE);
|
//Utils.setContext(RESOURCE_CATALOGUE);
|
||||||
ContextTest.setContextByName(ROOT);
|
ContextTest.setContextByName(context);
|
||||||
System.out.println("vaaa");
|
System.out.println("vaaa");
|
||||||
AggregationType measureType = AggregationType.MONTHLY;
|
AggregationType measureType = AggregationType.MONTHLY;
|
||||||
|
|
||||||
|
@ -751,13 +752,14 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||||
|
|
||||||
// ContextAuthorization contextAuthorization = new ContextAuthorization();
|
// ContextAuthorization contextAuthorization = new ContextAuthorization();
|
||||||
// SortedSet<String> contexts = contextAuthorization.getContexts();
|
// SortedSet<String> contexts = contextAuthorization.getContexts();
|
||||||
//
|
|
||||||
|
|
||||||
// for(String context : contexts) {
|
// for(String context : contexts) {
|
||||||
ScopeBean scopeBean = new ScopeBean(ROOT);
|
ScopeBean scopeBean = new ScopeBean(context);
|
||||||
logger.debug("FullName {} - Name {}", scopeBean.toString(), scopeBean.name());
|
logger.debug("FullName {} - Name {}", scopeBean.toString(), scopeBean.name());
|
||||||
|
|
||||||
|
|
||||||
ContextTest.setContextByName(ROOT);
|
ContextTest.setContextByName(context);
|
||||||
CatalogueAccessesHarvester catalogueHarvester = new CatalogueAccessesHarvester(start, end);
|
CatalogueAccessesHarvester catalogueHarvester = new CatalogueAccessesHarvester(start, end);
|
||||||
List<AccountingRecord> data = catalogueHarvester.getAccountingRecords();
|
List<AccountingRecord> data = catalogueHarvester.getAccountingRecords();
|
||||||
for (AccountingRecord accountingRecord : data) {
|
for (AccountingRecord accountingRecord : data) {
|
||||||
|
|
Loading…
Reference in New Issue