Package net.opengis.wcs20

Examples of net.opengis.wcs20.DimensionTrimType


   
    @Test
    public void testTrimOpen() throws Exception {
        // not sure if this makes any sense, but the sytax allows it, and it's like not
        // specifying anything
        DimensionTrimType result = (DimensionTrimType) parser.parse("lon,EPSG:4326(*,*)");
        assertEquals("lon", result.getDimension());
        assertEquals("EPSG:4326", result.getCRS());
        assertNull(result.getTrimLow());
        assertNull(result.getTrimHigh());
    }
View Full Code Here


   
    @Test
    public void testTrimNumbers() throws Exception {
        // not sure if this makes any sense, but the sytax allows it, and it's like not
        // specifying anything
        DimensionTrimType result = (DimensionTrimType) parser.parse("lon,EPSG:4326(10,20)");
        assertEquals("lon", result.getDimension());
        assertEquals("EPSG:4326", result.getCRS());
        assertEquals("10", result.getTrimLow());
        assertEquals("20", result.getTrimHigh());
    }
View Full Code Here

   
    @Test
    public void testTrimStringsCommas() throws Exception {
        // not sure if this makes any sense, but the sytax allows it, and it's like not
        // specifying anything
        DimensionTrimType result = (DimensionTrimType) parser.parse("mydim(\"a,b\",\"c,d\")");
        assertEquals("mydim", result.getDimension());
        assertNull(result.getCRS());
        assertEquals("a,b", result.getTrimLow());
        assertEquals("c,d", result.getTrimHigh());
    }
View Full Code Here

            Node child = (Node) o;
            String name = child.getComponent().getName();
            String namespace = child.getComponent().getNamespace();
            Object v = child.getValue();
           
            ExtensionItemType item = Wcs20Factory.eINSTANCE.createExtensionItemType();
            item.setName(name);
            item.setNamespace(namespace);
            if(v instanceof String) {
                item.setSimpleContent((String) v);
            } else {
                item.setObjectContent(v);
            }
           
            contents.add(item);
        }
       
View Full Code Here

    private void parseSimpleContentList(GetCoverageType gc, Map kvp, List<String> geoTiffParams,
            String namespace) {
        for (String param : geoTiffParams) {
            String value = KvpUtils.firstValue(kvp, param);
            if (value != null) {
                ExtensionItemType item = WCS20_FACTORY.createExtensionItemType();
                item.setNamespace(namespace);
                item.setName(param);
                item.setSimpleContent(value);

                gc.getExtension().getContents().add(item);
            }
        }
    }
View Full Code Here

        }

        // 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) {
            ExtensionItemType item = WCS20_FACTORY.createExtensionItemType();
            item.setNamespace(Scaling.NAMESPACE);
            item.setName("Scaling");
            item.setObjectContent(scaling);
            gc.getExtension().getContents().add(item);
        }
    }
View Full Code Here

        }
    }

    private void parseRangeSubsetExtension(GetCoverageType gc, Map kvp) {
        if (kvp.containsKey("rangesubset")) {
            ExtensionItemType item = WCS20_FACTORY.createExtensionItemType();
            item.setNamespace(RangeSubset.NAMESPACE);
            item.setName("RangeSubset");
            item.setObjectContent(kvp.get("rangesubset"));
            gc.getExtension().getContents().add(item);
        }
    }
View Full Code Here

        }
    }

    private void parseInterpolationExtension(GetCoverageType gc, Map kvp) {
        if (kvp.containsKey("interpolation")) {
            ExtensionItemType item = WCS20_FACTORY.createExtensionItemType();
            item.setNamespace(Interpolation.NAMESPACE);
            item.setName("Interpolation");
            item.setObjectContent(kvp.get("interpolation"));
            gc.getExtension().getContents().add(item);
        }
    }
View Full Code Here

    @Override
    public Object parse(String value) throws Exception {
        // clean up extra space
        value = value.trim();

        ExtensionItemType se = Wcs20Factory.eINSTANCE.createExtensionItemType();
        se.setName(WCS20Const.OVERVIEW_POLICY_EXTENSION);
        se.setNamespace(WCS20Const.OVERVIEW_POLICY_EXTENSION_NAMESPACE);
        se.setSimpleContent(value);
        return se;

    }
View Full Code Here

     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
       
        ExtensionType et = Wcs20Factory.eINSTANCE.createExtensionType();
       
        EList<ExtensionItemType> contents = et.getContents();
        for(Object o : node.getChildren()) {
            Node child = (Node) o;
            String name = child.getComponent().getName();
            String namespace = child.getComponent().getNamespace();
            Object v = child.getValue();
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.DimensionTrimType

Copyright © 2018 www.massapicom. 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.