Package net.opengis.wfs

Examples of net.opengis.wfs.GetFeatureType


     *
     * @param operation
     * @return
     */
    public String getExtension(Operation operation) {
        GetFeatureType request = (GetFeatureType) OwsUtils.parameter(operation.getParameters(),
                GetFeatureType.class);

        String outputFormat = request.getOutputFormat().toUpperCase();
        // DXF
        if (outputFormat.equals("DXF"))
            return "dxf";
        // DXF-ZIP
        return "zip";
View Full Code Here


     * If the handle attribute is defined on the GetFeature tag it
     * will be used, else the name is obtained concatenating lauer names
     * with underscore as a separator (up to a maximum name length).
     */
    private String getFileName(Operation operation) {
        GetFeatureType request = (GetFeatureType) OwsUtils.parameter(operation.getParameters(),
                GetFeatureType.class);
       
        if (request.getHandle() != null) {
            LOGGER.log(Level.FINE,"Using handle for file name: "+request.getHandle());
            return request.getHandle();
        }
       
        StringBuffer sb = new StringBuffer();
        for (Iterator f = request.getQuery().iterator(); f.hasNext();) {
            QueryType query = (QueryType) f.next();
            sb.append(getLayerName(query) + "_");
        }       
        sb.setLength(sb.length() - 1);
        LOGGER.log(Level.FINE,"Using layer names for file name: "+sb.toString());
View Full Code Here

            ZipEntry entry = new ZipEntry(getFileName(operation) + ".dxf");
            zipStream.putNextEntry(entry);
            w = new BufferedWriter(new OutputStreamWriter(zipStream));
        }
        // extract format_options (GET mode)
        GetFeatureType gft = (GetFeatureType) operation.getParameters()[0];
        String version = (String) gft.getFormatOptions().get("VERSION");
        String blocks = (String) gft.getFormatOptions().get("ASBLOCKS");
        String colors = (String) gft.getFormatOptions().get("COLORS");
        String ltypes = (String) gft.getFormatOptions().get("LTYPES");
        String layerNames = (String) gft.getFormatOptions().get("LAYERS");
        LOGGER.log(Level.FINE,"Format options: "+version+"; "+blocks+"; "+colors+"; "+ltypes+"; "+layerNames);
        // get a suitable DXFWriter, for the requested version (null -> get any writer)
        DXFWriter dxfWriter = DXFWriterFinder.getWriter(version, w);
       
        if (dxfWriter != null) {
            LOGGER.log(Level.INFO,"DXFWriter: "+dxfWriter.getDescription());
            String[] layers = null;
            if(layerNames!=null)
                layers=layerNames.toUpperCase().split(",");
            else
                layers=getLayerNames(gft.getQuery().iterator());
            LOGGER.log(Level.FINE,"Layers names: "+StringUtils.join(layers,","));
            dxfWriter.setOption("layers", layers);
            if (blocks != null && blocks.toLowerCase().equals("true"))
                dxfWriter.setOption("geometryasblock", true);
            // set optional colors
View Full Code Here

TOP

Related Classes of net.opengis.wfs.GetFeatureType

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.