diff --git a/docker/README.txt b/docker/README.txt index b3d03a1..8e02b33 100644 --- a/docker/README.txt +++ b/docker/README.txt @@ -15,7 +15,7 @@ Try out the EDR API ETS with these combinations of inputs. Location of the landing page : https://ogcie.iblsoft.com/edr -Location of OpenAPI definition document : https://opengeospatial.github.io/ogcapi-environmental-data-retrieval/candidate-standard/openapi/EDR_OpenAPI.json +Location of OpenAPI definition document : https://ogcie.iblsoft.com/edr/api Conformance class: Level 1 (Note this input is ignored) @@ -25,4 +25,11 @@ Location of the landing page : https://data-api.mdl.nws.noaa.gov/EDR-API Location of OpenAPI definition document : https://data-api.mdl.nws.noaa.gov/EDR-API/api?f=json + +Alternatively, try it out with: + +Location of the landing page : http://labs.metoffice.gov.uk/edr + +Location of OpenAPI definition document : http://labs.metoffice.gov.uk/edr/openapi.json + Conformance class: Level 1 (Note this input is ignored) diff --git a/docker/te_base/scripts/ogcapi-edr10/1.0/ctl/ogcapi-edr10-suite.ctl b/docker/te_base/scripts/ogcapi-edr10/1.0/ctl/ogcapi-edr10-suite.ctl index 073e186..0323433 100644 --- a/docker/te_base/scripts/ogcapi-edr10/1.0/ctl/ogcapi-edr10-suite.ctl +++ b/docker/te_base/scripts/ogcapi-edr10/1.0/ctl/ogcapi-edr10-suite.ctl @@ -56,7 +56,7 @@ - +

diff --git a/docker/teamengine/WEB-INF/lib/apache-sis_old.zip b/docker/teamengine/WEB-INF/lib/apache-sis_old.zip new file mode 100644 index 0000000..78aa4ec Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/apache-sis_old.zip differ diff --git a/docker/teamengine/WEB-INF/lib/ets-ogcapi-edr10-0.1-SNAPSHOT.jar b/docker/teamengine/WEB-INF/lib/ets-ogcapi-edr10-0.1-SNAPSHOT.jar index c5c05c0..4c6b6bf 100644 Binary files a/docker/teamengine/WEB-INF/lib/ets-ogcapi-edr10-0.1-SNAPSHOT.jar and b/docker/teamengine/WEB-INF/lib/ets-ogcapi-edr10-0.1-SNAPSHOT.jar differ diff --git a/docker/teamengine/WEB-INF/lib/geoapi-3.0.1.jar b/docker/teamengine/WEB-INF/lib/geoapi-3.0.1.jar new file mode 100644 index 0000000..01a2893 Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/geoapi-3.0.1.jar differ diff --git a/docker/teamengine/WEB-INF/lib/jaxb-api-2.2.12.jar b/docker/teamengine/WEB-INF/lib/jaxb-api-2.2.12.zip similarity index 100% rename from docker/teamengine/WEB-INF/lib/jaxb-api-2.2.12.jar rename to docker/teamengine/WEB-INF/lib/jaxb-api-2.2.12.zip diff --git a/docker/teamengine/WEB-INF/lib/sis-metadata-1.0.jar b/docker/teamengine/WEB-INF/lib/sis-metadata-1.0.jar new file mode 100644 index 0000000..3fa2d55 Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/sis-metadata-1.0.jar differ diff --git a/docker/teamengine/WEB-INF/lib/sis-referencing-1.0.jar b/docker/teamengine/WEB-INF/lib/sis-referencing-1.0.jar new file mode 100644 index 0000000..de7c3a3 Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/sis-referencing-1.0.jar differ diff --git a/docker/teamengine/WEB-INF/lib/sis-utility-1.0.jar b/docker/teamengine/WEB-INF/lib/sis-utility-1.0.jar new file mode 100644 index 0000000..19a6946 Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/sis-utility-1.0.jar differ diff --git a/docker/teamengine/WEB-INF/lib/unit-api-1.0.jar b/docker/teamengine/WEB-INF/lib/unit-api-1.0.jar new file mode 100644 index 0000000..3ded90e Binary files /dev/null and b/docker/teamengine/WEB-INF/lib/unit-api-1.0.jar differ diff --git a/pom.xml b/pom.xml index 79addf9..f611d67 100644 --- a/pom.xml +++ b/pom.xml @@ -107,8 +107,25 @@ sis-referencing 1.0 + + javax.xml.bind + jaxb-api + 2.3.1 + + + + org.apache.sis.core + sis-utility + 1.0 + + + + org.opengis + geoapi + 3.0.1 + + - diff --git a/src/main/java/org/opengis/cite/ogcapiedr10/CommonFixture.java b/src/main/java/org/opengis/cite/ogcapiedr10/CommonFixture.java index 4df7e76..387ab88 100644 --- a/src/main/java/org/opengis/cite/ogcapiedr10/CommonFixture.java +++ b/src/main/java/org/opengis/cite/ogcapiedr10/CommonFixture.java @@ -8,8 +8,7 @@ import org.apache.sis.referencing.CRS; import org.opengis.cite.ogcapiedr10.util.ClientUtils; -import org.opengis.referencing.NoSuchAuthorityCodeException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; + import org.opengis.util.FactoryException; import org.testng.ITestContext; import org.testng.annotations.BeforeClass; @@ -48,19 +47,7 @@ public void initCommonFixture( ITestContext testContext ) { initLogging(); rootUri = (URI) testContext.getSuite().getAttribute( SuiteAttribute.IUT.getName() ); - CoordinateReferenceSystem source = null; - - try { - - - source = CRS.fromWKT("GEOGCS[\"Unknown\", DATUM[\"Unknown\", SPHEROID[\"WGS_1984\", 6378137.0, 298.257223563]], PRIMEM[\"Greenwich\",0], UNIT[\"degree\", 0.017453], AXIS[\"Lon\", EAST], AXIS[\"Lat\", NORTH]]"); - } catch (NoSuchAuthorityCodeException e) { - System.out.println("CHK ERROR 1"); - e.printStackTrace(); - } catch (FactoryException e) { - System.out.println("CHK ERROR 2"); - e.printStackTrace(); - } + } diff --git a/src/main/java/org/opengis/cite/ogcapiedr10/collections/CollectionsCRS.java b/src/main/java/org/opengis/cite/ogcapiedr10/collections/CollectionsCRS.java index 02fa829..0f0a5d0 100644 --- a/src/main/java/org/opengis/cite/ogcapiedr10/collections/CollectionsCRS.java +++ b/src/main/java/org/opengis/cite/ogcapiedr10/collections/CollectionsCRS.java @@ -48,11 +48,12 @@ import io.restassured.response.Response; import io.restassured.path.json.JsonPath; + /** * /collections/{collectionId}/ * */ -public class CollectionsCRS extends CommonFixture { +public class CollectionsCRS extends CommonFixture { /** *

@@ -63,69 +64,57 @@ public class CollectionsCRS  extends CommonFixture {
 	@Test(description = "Implements Abstract Test 8  Requirement 33 /req/core/crs84")
 	public void collectionsCRS84() {
 
-		boolean compliesWithCRS84Requirement = false;
-		     StringBuffer resultMessage = new StringBuffer();
-		     
-	    	 TestPoint testPoint = new TestPoint(rootUri.toString(),"/collections",null);
-	         String testPointUri = new UriBuilder( testPoint ).buildUrl();
-	         Response response = init().baseUri( testPointUri ).accept( JSON ).when().request( GET );
-	         JsonPath jsonPath = response.jsonPath();
-	
-	         List collectionsList = jsonPath.getList( "collections" );
-	
-	         for(int t = 0 ; t < collectionsList.size(); t++)
-	         {
-	        	 boolean supportsCRS84 = false;
-	        	 HashMap collectionMap = (HashMap) collectionsList.get(t);
-	        	 
-	        	 String crsText = collectionMap.get("crs").toString();
-	        	 ArrayList crsList = (ArrayList) collectionMap.get("crs");	        	 	        	 
-	        	 HashMap crsMap = (HashMap) crsList.get(0);
-	        	 
-	        	 CoordinateReferenceSystem source = null;
-	        	 
-	        	 try {
-	        		 
-
-					source = CRS.fromWKT(crsMap.get("wkt").toString());
-	     		} catch (NoSuchAuthorityCodeException e) {
-					
-					e.printStackTrace();
-				} catch (FactoryException e) {
-			
-					e.printStackTrace();
+		boolean compliesWithCRS84Requirement = true;
+		StringBuffer resultMessage = new StringBuffer();
+
+		TestPoint testPoint = new TestPoint(rootUri.toString(), "/collections", null);
+		String testPointUri = new UriBuilder(testPoint).buildUrl();
+		Response response = init().baseUri(testPointUri).accept(JSON).when().request(GET);
+		JsonPath jsonPath = response.jsonPath();
+
+		List collectionsList = jsonPath.getList("collections");
+
+		for (int t = 0; t < collectionsList.size(); t++) {
+			boolean supportsCRS84 = false;
+			HashMap collectionMap = (HashMap) collectionsList.get(t);
+
+			String crsText = collectionMap.get("crs").toString();
+			ArrayList crsList = (ArrayList) collectionMap.get("crs");
+			HashMap crsMap = (HashMap) crsList.get(0);
+
+			CoordinateReferenceSystem source = null;
+
+			try {
+
+				source = CRS.fromWKT(crsMap.get("wkt").toString());
+			} catch (Exception e) {
+
+				e.printStackTrace();
+			}
+
+			DefaultGeographicCRS crs = (DefaultGeographicCRS) source;
+
+			if (crs.getDatum().getEllipsoid().getName().toString().equals("WGS 84")
+					|| crs.getDatum().getEllipsoid().getName().toString().equals("WGS_1984")
+					|| crs.getDatum().getEllipsoid().getName().toString().equals("WGS84")) {
+
+				if (source.getCoordinateSystem().getAxis(0).toString().toLowerCase().contains("longitude")
+						&& source.getCoordinateSystem().getAxis(1).toString().toLowerCase().contains("latitude")) {
+
+					supportsCRS84 = true;
+
 				}
-					
-			
-					DefaultGeographicCRS crs = (DefaultGeographicCRS) source;
-			
-					 if(crs.getDatum().getEllipsoid().getName().toString().equals("WGS 84") || crs.getDatum().getEllipsoid().getName().toString().equals("WGS_1984") || crs.getDatum().getEllipsoid().getName().toString().equals("WGS84")) {
-						
-	        		 if(source.getCoordinateSystem().getAxis(0).toString().toLowerCase().contains("longitude") && source.getCoordinateSystem().getAxis(1).toString().toLowerCase().contains("latitude")) {
-	        			
-	        				 supportsCRS84 = true;	  
-	        			 
-	        		 }
-	        	 }
-	        	 if(supportsCRS84==false) {
-	        		 compliesWithCRS84Requirement = false;
-	        		 resultMessage.append("Collection "+collectionMap.get("id").toString()+" fails. ");
-	        	 }
-					
-			
-	        	 
-	       
-	        	 
-	         }	            
-	         
-	 
-	         org.testng.Assert.assertTrue( compliesWithCRS84Requirement,   "Fails Abstract Test 8 because "+resultMessage.toString() );
+			}
+			if (supportsCRS84 == false) {
+				compliesWithCRS84Requirement = false;
+				resultMessage.append("Collection " + collectionMap.get("id").toString() + " fails. ");
+			}
 
+		}
 
-	}
+		org.testng.Assert.assertTrue(compliesWithCRS84Requirement,
+				"Fails Abstract Test 8 because " + resultMessage.toString());
 
+	}
 
-	
-	
-	
 }
diff --git a/src/main/scripts/ctl/ogcapi-edr10-suite.ctl b/src/main/scripts/ctl/ogcapi-edr10-suite.ctl
index 6f4e27a..8bd0d5f 100644
--- a/src/main/scripts/ctl/ogcapi-edr10-suite.ctl
+++ b/src/main/scripts/ctl/ogcapi-edr10-suite.ctl
@@ -56,7 +56,7 @@
                  
-                 
+