Examples of ScalingType


Examples of com.google.apphosting.utils.config.AppEngineWebXml.ScalingType

    }
  }

  private static void checkScalingTypesMatch(WebModule currentModule, WebModule updatedModule)
      throws AppEngineConfigException {
    ScalingType currentScalingType = currentModule.getAppEngineWebXml().getScalingType();
    ScalingType updatedScalingType = updatedModule.getAppEngineWebXml().getScalingType();
    if (!currentScalingType.equals(updatedScalingType)) {
      String message = String.format(
          "Unsupported configuration change of scaling from '%s' to '%s' in '%s'",
          currentScalingType, updatedScalingType, currentModule.getAppEngineWebXmlFile());
      LOGGER.severe(message);
View Full Code Here

Examples of com.google.apphosting.utils.config.AppEngineWebXml.ScalingType

    }
  }

  private static void checkInstanceCountsMatch(WebModule currentModule, WebModule updatedModule)
      throws AppEngineConfigException {
    ScalingType currentScalingType = currentModule.getAppEngineWebXml().getScalingType();
    switch (currentScalingType) {
      case MANUAL:
      String currentManualInstances =
          currentModule.getAppEngineWebXml().getManualScaling().getInstances();
      String updatedManualInstances =
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleAxesByFactor());
        assertNull(scaling.getScaleToSize());
        assertNull(scaling.getScaleToExtent());
       
        ScaleByFactorType scaleByFactor = scaling.getScaleByFactor();
        assertEquals(2.5, scaleByFactor.getScaleFactor(), 1e-9d);
    }
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleByFactor());
        assertNull(scaling.getScaleToSize());
        assertNull(scaling.getScaleToExtent());
       
        ScaleAxisByFactorType sa = scaling.getScaleAxesByFactor();
        assertEquals(3, sa.getScaleAxis().size());
        ScaleAxisType sa1 = sa.getScaleAxis().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", sa1.getAxis());
        assertEquals(3.5, sa1.getScaleFactor(), 1e-9);
        ScaleAxisType sa2 = sa.getScaleAxis().get(1);
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleByFactor());
        assertNull(scaling.getScaleAxesByFactor());
        assertNull(scaling.getScaleToExtent());
       
        ScaleToSizeType sa = scaling.getScaleToSize();
        assertEquals(3, sa.getTargetAxisSize().size());
        TargetAxisSizeType sa1 = sa.getTargetAxisSize().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", sa1.getAxis());
        assertEquals(1000.0, sa1.getTargetSize(), 1e-9);
        TargetAxisSizeType sa2 = sa.getTargetAxisSize().get(1);
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleByFactor());
        assertNull(scaling.getScaleAxesByFactor());
        assertNull(scaling.getScaleToSize());
       
        ScaleToExtentType se = scaling.getScaleToExtent();
        assertEquals(2, se.getTargetAxisExtent().size());
        TargetAxisExtentType sa1 = se.getTargetAxisExtent().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", sa1.getAxis());
        assertEquals(10.0, sa1.getLow(), 1e-9);
        assertEquals(20.0, sa1.getHigh(), 1e-9);
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

        }
    }

    private void parseScalingExtension(GetCoverageType gc, Map kvp) {
        boolean found = false;
        ScalingType scaling = WCS20_FACTORY.createScalingType();
        if (kvp.containsKey("scalefactor")) {
            found = true;
            ScaleByFactorType sf = WCS20_FACTORY.createScaleByFactorType();
            sf.setScaleFactor(((Double) kvp.get("scalefactor")));
            scaling.setScaleByFactor(sf);
        }
        if (kvp.containsKey("scaleaxes")) {
            found = true;
            scaling.setScaleAxesByFactor((ScaleAxisByFactorType) kvp.get("scaleaxes"));
        }
        if (kvp.containsKey("scalesize")) {
            found = true;
            scaling.setScaleToSize((ScaleToSizeType) kvp.get("scalesize"));
        }
        if (kvp.containsKey("scaleextent")) {
            found = true;
            scaling.setScaleToExtent((ScaleToExtentType) kvp.get("scaleextent"));
        }

        // if we found at least one, put it in the extension map (it's the duty of
        // GetCoverage to complain about multiple scaling constructs)
        if (found == true) {
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                "&coverageId=theCoverage&scaleFactor=2");
       
        Map<String, Object> extensions = getExtensionsMap(gc);

        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleByFactorType sbf = scaling.getScaleByFactor();
        assertEquals(2.0, sbf.getScaleFactor(), 0d);
    }
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                "&coverageId=theCoverage&scaleaxes=http://www.opengis.net/def/axis/OGC/1/i(3.5)," +
                "http://www.opengis.net/def/axis/OGC/1/j(5.0),http://www.opengis.net/def/axis/OGC/1/k(2.0)");
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleAxisByFactorType sax = scaling.getScaleAxesByFactor();
        EList<ScaleAxisType> saxes = sax.getScaleAxis();
        assertEquals(3, saxes.size());
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", saxes.get(0).getAxis());
        assertEquals(3.5d, saxes.get(0).getScaleFactor(), 0d);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/j", saxes.get(1).getAxis());
View Full Code Here

Examples of net.opengis.wcs20.ScalingType

                "&coverageId=theCoverage&scalesize=http://www.opengis.net/def/axis/OGC/1/i(1000)," +
                "http://www.opengis.net/def/axis/OGC/1/j(1000),http://www.opengis.net/def/axis/OGC/1/k(10)");
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleToSizeType sts = scaling.getScaleToSize();
        EList<TargetAxisSizeType> scaleAxes = sts.getTargetAxisSize();
        assertEquals(3, scaleAxes.size());
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", scaleAxes.get(0).getAxis());
        assertEquals(1000d, scaleAxes.get(0).getTargetSize(), 0d);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/j", scaleAxes.get(1).getAxis());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.