From 9f4dfd2ab25ef5cbea6acf446b286ff9964e8878 Mon Sep 17 00:00:00 2001 From: "WolfgangWalter Sauer (wowasa)" Date: Fri, 8 Mar 2019 15:00:50 +0100 Subject: [PATCH] loglevel of FileSizeException to info; only public profiles on status=production --- .../eu/clarin/cmdi/curation/cr/PublicProfiles.java | 2 +- .../curation/processor/CollectionProcessor.java | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/curation-module-core/src/main/java/eu/clarin/cmdi/curation/cr/PublicProfiles.java b/curation-module-core/src/main/java/eu/clarin/cmdi/curation/cr/PublicProfiles.java index d50141d5..c53becc5 100644 --- a/curation-module-core/src/main/java/eu/clarin/cmdi/curation/cr/PublicProfiles.java +++ b/curation-module-core/src/main/java/eu/clarin/cmdi/curation/cr/PublicProfiles.java @@ -22,7 +22,7 @@ public static Collection createPublicProfiles(){ XMLMarshaller publicProfilesMarshaller = new XMLMarshaller<>(PublicProfiles.class); Collection publicProfiles = publicProfilesMarshaller //.unmarshal(new URL(CRService.CR_REST_1_2_PROFILES).openStream()) - .unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=*").openStream()) + .unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=production").openStream()) .profileDescription; publicProfiles.forEach(p -> { diff --git a/curation-module-core/src/main/java/eu/clarin/cmdi/curation/processor/CollectionProcessor.java b/curation-module-core/src/main/java/eu/clarin/cmdi/curation/processor/CollectionProcessor.java index ec04ac03..14694661 100644 --- a/curation-module-core/src/main/java/eu/clarin/cmdi/curation/processor/CollectionProcessor.java +++ b/curation-module-core/src/main/java/eu/clarin/cmdi/curation/processor/CollectionProcessor.java @@ -41,7 +41,18 @@ public Report process(CurationEntity entity, String parentName) { report.addSegmentScore(step.calculateScore(report)); - } catch (FileSizeException | ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) { + } + catch(FileSizeException e) { + _logger.info("Exception when processing " + step.toString() + " : " + e.getMessage()); + //if it is not a collection report, keep the loop going for the following records, dont just produce an error report + if (!(report instanceof CollectionReport)) { + return new ErrorReport(report.getName(), e.getMessage()); + } else { + addInvalidFile(report, e); + } + } + + catch (ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) { _logger.error("Exception when processing " + step.toString() + " : " + e.getMessage()); //if it is not a collection report, keep the loop going for the following records, dont just produce an error report if (!(report instanceof CollectionReport)) {