Skip to content

Commit

Permalink
Fix case sensitive extensions in ZipIRIMapper
Browse files Browse the repository at this point in the history
Fix case sensitive extensions in ZipIRIMapper

Fixes #1140
  • Loading branch information
srfteixeira authored and ignazio1977 committed Aug 3, 2024
1 parent 2ef0667 commit 2d54418
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,21 @@ protected void parseIfExtensionSupported(ZipFile file, ZipEntry e, String baseIR
}
IRI physicalIRI = IRI.create(baseIRI + name);
String extension = name.substring(lastIndexOf);
if (".obo".equals(extension)) {
if (".obo".equalsIgnoreCase(extension)) {
oboFileMap.put(name, physicalIRI);
} else {
try (InputStream in = file.getInputStream(e)) {
if (".ofn".equals(extension)) {
if (".ofn".equalsIgnoreCase(extension)) {
IRI logical = parseFSSFile(in);
if (logical != null) {
ontologyIRI2PhysicalURIMap.put(logical, physicalIRI);
}
} else if (".omn".equals(extension)) {
} else if (".omn".equalsIgnoreCase(extension)) {
IRI logical = parseManchesterSyntaxFile(in);
if (logical != null) {
ontologyIRI2PhysicalURIMap.put(logical, physicalIRI);
}
} else if (fileExtensions.contains(extension)) {
} else if (fileExtensions.contains(extension.toLowerCase())) {
IRI logical = parseFile(in);
if (logical != null) {
ontologyIRI2PhysicalURIMap.put(logical, physicalIRI);
Expand Down

0 comments on commit 2d54418

Please sign in to comment.