diff --git a/src/main/java/de/landsh/opendata/csw2dcat/Mapping.java b/src/main/java/de/landsh/opendata/csw2dcat/Mapping.java index dc1354a473418948d152fe50bba6684f1bb30819..f12fd64c3445b673947f25cb8b0f5b73da64b058 100644 --- a/src/main/java/de/landsh/opendata/csw2dcat/Mapping.java +++ b/src/main/java/de/landsh/opendata/csw2dcat/Mapping.java @@ -9,7 +9,6 @@ import org.dom4j.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -152,22 +151,26 @@ public class Mapping { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/" + format); } else if (ArrayUtils.contains(SERVICES, format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/" + format + "_SRVC"); - } else if ("download".equals(format)) { + } else if (StringUtils.equalsIgnoreCase("download", format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/WFS_SRVC"); - } else if ("view".equals(format)) { + } else if (StringUtils.equalsIgnoreCase("view", format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/WMS_SRVC"); - } else if ("Shapefiles".equals(format) || "Shape".equals(format) || "SHAPE".equals(format) || "ESRI-Shape".equals(format)) { + } else if (StringUtils.equalsIgnoreCase("Shapefiles", format) + || StringUtils.equalsIgnoreCase("Shape", format) + || "ESRI-Shape".equals(format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/SHP"); } else if ("TIFF 5 Group 4 Fax CCITT, TIFF-LZW (Summenlayer)".equals(format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/TIFF"); } else if ("predefined ATOM".equals(format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/ATOM"); - } else if ("Excel".equals(format)) { + } else if (StringUtils.equalsIgnoreCase("Excel", format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/XLS"); - } else if ("GeoTIFF".equals(format)) { + } else if (StringUtils.equalsIgnoreCase("GeoTIFF", format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/GEOTIFF"); } else if ("ARC/INFO-Coverage".equals(format)) { return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/ARCINFO_COV"); + } else if (StringUtils.equalsIgnoreCase("GeoJSON", format)) { + return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/GEOJSON"); } else if (StringUtils.isEmpty(format)) { throw new IllegalArgumentException("Format must not be empty."); } else {