Skip to content

Commit

Permalink
[ICIJ/datashare#842] refactor class name
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanzalu committed Nov 4, 2021
1 parent 19317f0 commit 9698e13
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 25,7 @@ public class MetadataCleaner {
private final ContentCleaner cleaner;

public MetadataCleaner() {
this.cleaner = new ContentCleaner(asList(new PdfMetadataCleaner(), new OfficeMetadataCleaner()));
this.cleaner = new ContentCleaner(asList(new PdfMetadataCleaner(), new OfficeWordMetadataCleaner()));
}

public DocumentSource clean(Path document) throws IOException {
Expand All @@ -51,7 51,7 @@ public ContentCleaner(List<Cleaner> cleanerList) {
public Set<MediaType> getSupportedTypes(CleanContext context) {
Set<MediaType> mediaTypes = new HashSet<>();
mediaTypes.addAll(MediaType.set("application/pdf"));
mediaTypes.addAll(Arrays.stream(OfficeParser.POIFSDocumentType.values()).map(OfficeParser.POIFSDocumentType::getType).collect(Collectors.toSet()));
mediaTypes.addAll(MediaType.set("application/msword"));
return mediaTypes;
}

Expand Down Expand Up @@ -97,7 97,7 @@ public void clean(InputStream stream, DocumentSource documentSource, Metadata me
}
}

static class OfficeMetadataCleaner implements Cleaner {
static class OfficeWordMetadataCleaner implements Cleaner {
@Override
public Set<MediaType> getSupportedTypes(CleanContext context) {
return MediaType.set("application/msword");
Expand Down

0 comments on commit 9698e13

Please sign in to comment.