Skip to content
Snippets Groups Projects
Commit 0935dcbf authored by Jesper Zedlitz's avatar Jesper Zedlitz
Browse files

weitere Kennzeichnungsmöglichkeit für Shape-Dateien

parent c123943e
No related branches found
No related tags found
No related merge requests found
Pipeline #696 passed
......@@ -597,7 +597,7 @@ public class MDMetadata2Dataset {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/GML");
} else if (lowerCaseURL.contains("outputformat=shape-zip")) {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/SHP");
} else if (lowerCaseURL.contains("outputformat=shape/zip")) {
} else if (lowerCaseURL.contains("outputformat=shape%2bzip")) {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/SHP");
} else if (lowerCaseURL.contains("outputformat=csv")) {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/CSV");
......
......@@ -164,7 +164,7 @@ public class Mapping {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/WFS_SRVC");
} else if ("view".equals(format)) {
return ResourceFactory.createResource("http://publications.europa.eu/resource/authority/file-type/WMS_SRVC");
} else if ("Shapefiles".equals(format) || "Shape".equals(format) || "ESRI-Shape".equals(format)) {
} else if ("Shapefiles".equals(format) || "Shape".equals(format) || "SHAPE".equals(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");
......
......@@ -1373,4 +1373,19 @@ public class MDMetadata2DatasetTests {
"Seals in the Schleswig-Holstein Wadden Sea in 1995", "en") ));
}
/**
* This WFS has a different output format syntax for shape files.
*/
@Test
public void convert_wfsWithShape() throws DocumentException, IOException {
final Document inputDocument = saxReader.read(getClass().getResourceAsStream("/710b07d4-2b80-4e81-bdb6-c60f06ffbb9b.xml"));
final Resource result = service.convert(inputDocument);
final Map<String, Resource> distributionMap = collectDistributions(result);
assertEquals(1, distributionMap.size());
Resource distribution = distributionMap.get(distributionMap.keySet().iterator().next()); // first and only entry
assertEquals(FILE_TYPE_SHP, distribution.getProperty(DCTerms.format).getResource());
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment