Package org.geoserver.wcs.kvp

Source Code of org.geoserver.wcs.kvp.SectionsKvpParser

/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.wcs.kvp;

import java.util.List;

import net.opengis.ows11.Ows11Factory;
import net.opengis.ows11.SectionsType;

import org.geoserver.ows.KvpParser;
import org.geoserver.ows.util.KvpUtils;

/**
* Parses the "sections" GetCapabilities kvp argument
* @author Andrea Aime - TOPP
*/
public class SectionsKvpParser extends KvpParser {

    public SectionsKvpParser() {
        super("sections", SectionsType.class);
       
    }

    @Override
    public Object parse(String value) throws Exception {
        List<String> sectionNames = KvpUtils.readFlat(value);
        SectionsType sections = Ows11Factory.eINSTANCE.createSectionsType();
        sections.getSection().addAll(sectionNames);
        return sections;
    }

}
TOP

Related Classes of org.geoserver.wcs.kvp.SectionsKvpParser

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.