Skip to content
Snippets Groups Projects
Verified Commit 6b112caf authored by Jesper Zedlitz's avatar Jesper Zedlitz
Browse files

added GeoJSON as format and made format detection case-insensitive

parent ae7dc487
No related branches found
No related tags found
No related merge requests found
Pipeline #1483 passed
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment