Skip to content

Commit 9f4dfd2

Browse files
author
WolfgangWalter Sauer (wowasa)
committed
loglevel of FileSizeException to info; only public profiles on
status=production
1 parent 5714155 commit 9f4dfd2

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

curation-module-core/src/main/java/eu/clarin/cmdi/curation/cr/PublicProfiles.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static Collection<ProfileHeader> createPublicProfiles(){
2222
XMLMarshaller<PublicProfiles> publicProfilesMarshaller = new XMLMarshaller<>(PublicProfiles.class);
2323
Collection<ProfileHeader> publicProfiles = publicProfilesMarshaller
2424
//.unmarshal(new URL(CRService.CR_REST_1_2_PROFILES).openStream())
25-
.unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=*").openStream())
25+
.unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=production").openStream())
2626
.profileDescription;
2727

2828
publicProfiles.forEach(p -> {

curation-module-core/src/main/java/eu/clarin/cmdi/curation/processor/CollectionProcessor.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,18 @@ public Report<?> process(CurationEntity entity, String parentName) {
4141

4242
report.addSegmentScore(step.calculateScore(report));
4343

44-
} catch (FileSizeException | ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) {
44+
}
45+
catch(FileSizeException e) {
46+
_logger.info("Exception when processing " + step.toString() + " : " + e.getMessage());
47+
//if it is not a collection report, keep the loop going for the following records, dont just produce an error report
48+
if (!(report instanceof CollectionReport)) {
49+
return new ErrorReport(report.getName(), e.getMessage());
50+
} else {
51+
addInvalidFile(report, e);
52+
}
53+
}
54+
55+
catch (ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) {
4556
_logger.error("Exception when processing " + step.toString() + " : " + e.getMessage());
4657
//if it is not a collection report, keep the loop going for the following records, dont just produce an error report
4758
if (!(report instanceof CollectionReport)) {

0 commit comments

Comments
 (0)