diff --git a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java index 9d9c2c6..7256da0 100644 --- a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java +++ b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java @@ -136,49 +136,52 @@ public class AccountingDataHarvesterPlugin extends Plugin harvested = vreUsersHarvester.getData(); - data.addAll(harvested); - } catch(Exception x) { - logger.error(x.getLocalizedMessage()); - } - - - try { - // collecting info on Res. Catalogue (Dataset, Application, Deliverables, Methods) - ResourceCatalogueHarvester resourceCatalogueHarvester = new ResourceCatalogueHarvester(start, end); - List harvested = resourceCatalogueHarvester.getData(); - data.addAll(harvested); - } catch(Exception x) { - logger.error(x.getLocalizedMessage()); - } - - try { - // collecting info on Data/Method download - DataMethodDownloadHarvester dataMethodDownloadHarvester = new DataMethodDownloadHarvester(start, end); - List harvested = dataMethodDownloadHarvester.getData(); - data.addAll(harvested); - } catch(Exception x) { - logger.error(x.getLocalizedMessage()); - } - - try { - // collecting info on social (posts, replies and likes) + // Collecting info on social (posts, replies and likes) SocialHarvester socialHarvester = new SocialHarvester(start, end); List harvested = socialHarvester.getData(); data.addAll(harvested); - } catch(Exception x) { - logger.error(x.getLocalizedMessage()); + } catch(Exception e) { + logger.error("Error harvesting Scoial Interactions for {}", context, e); + } + + + try { + // Collecting info on VRE users + VreUsersHarvester vreUsersHarvester = new VreUsersHarvester(start, end); + List harvested = vreUsersHarvester.getData(); + data.addAll(harvested); + } catch(Exception e) { + logger.error("Error harvesting Context Users for {}", context, e); + } + + + try { + // Collecting info on Res. Catalogue (Dataset, Application, Deliverables, Methods) + ResourceCatalogueHarvester resourceCatalogueHarvester = new ResourceCatalogueHarvester(start, end); + List harvested = resourceCatalogueHarvester.getData(); + data.addAll(harvested); + } catch(Exception e) { + logger.error("Error harvesting Resource Catalogue Information for {}", context, e); } try { - // collecting info on method invocation + // Collecting info on Data/Method download + DataMethodDownloadHarvester dataMethodDownloadHarvester = new DataMethodDownloadHarvester(start, end); + List harvested = dataMethodDownloadHarvester.getData(); + data.addAll(harvested); + } catch(Exception e) { + logger.error("Error harvesting Data Method Download for {}", context, e); + } + + + + try { + // Collecting info on method invocation MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end); List harvested = methodInvocationHarvester.getData(); data.addAll(harvested); - } catch(Exception x) { - logger.error(x.getLocalizedMessage()); + } catch(Exception e) { + logger.error("Error harvesting Method Invocations for {}", context, e); } } diff --git a/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java b/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java index ce7c294..6f762cd 100644 --- a/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java +++ b/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java @@ -28,8 +28,8 @@ public class VreUsersHarvester extends BasicHarvester { @Override public List getData() throws Exception { - String context = Utils.getCurrentContext(); try { + String context = Utils.getCurrentContext(); int measure = get(); HarvestedData harvest = new HarvestedData(HarvestedData.USERS, context, measure); logger.debug(harvest.toString()); @@ -37,7 +37,6 @@ public class VreUsersHarvester extends BasicHarvester { data.add(harvest); return data; } catch(Exception e) { - logger.error("Error Haversting Context Users for context {}", context, e); throw e; } } diff --git a/src/main/java/org/gcube/dataharvest/harvester/sobigdata/DataMethodDownloadHarvester.java b/src/main/java/org/gcube/dataharvest/harvester/sobigdata/DataMethodDownloadHarvester.java index 2071745..d137548 100644 --- a/src/main/java/org/gcube/dataharvest/harvester/sobigdata/DataMethodDownloadHarvester.java +++ b/src/main/java/org/gcube/dataharvest/harvester/sobigdata/DataMethodDownloadHarvester.java @@ -68,7 +68,6 @@ public class DataMethodDownloadHarvester extends BasicHarvester { return data; } catch(Exception e) { - logger.error("Error Harvesting Data Methods Download for context {}", context, e); throw e; }