Package net.opengis.wfs

Examples of net.opengis.wfs.FeatureTypeType


            ops.getOperation().add(OperationType.INSERT_LITERAL);
            ops.getOperation().add(OperationType.QUERY_LITERAL);
            ftl.setOperations(ops);
        }
        {
            FeatureTypeType ft = factory.createFeatureTypeType();
            ft.setName(new QName("http://www.openplans.org/topp", "Type1"));
            ft.setTitle("Title1");
            ft.setAbstract("Abstract1");
            KeywordsType kwd = Ows10Factory.eINSTANCE.createKeywordsType();
            kwd.getKeyword().add("keword1");
            kwd.getKeyword().add("keword2");
            ft.getKeywords().add(kwd);
            ft.setDefaultSRS("urn:ogc:crs:EPSG:6.7:4326");
            ft.getOtherSRS().add("urn:ogc:crs:EPSG:6.7:23030");
            ft.setOperations(factory.createOperationsType());
            OperationsType operations = ft.getOperations();
            List operationList = operations.getOperation();
            operationList.add(OperationType.QUERY_LITERAL);
            operationList.add(OperationType.INSERT_LITERAL);
            operationList.add(OperationType.UPDATE_LITERAL);
            operationList.add(OperationType.DELETE_LITERAL);
            OutputFormatListType outputFormat = factory.createOutputFormatListType();
            outputFormat.getFormat().add("GML2");
            ft.setOutputFormats(outputFormat);
            WGS84BoundingBoxType bbox = Ows10Factory.eINSTANCE.createWGS84BoundingBoxType();
            bbox.setCrs("urn:ogc:crs:EPSG:6.7:4326");
            ft.getWGS84BoundingBox().add(bbox);
            ftl.getFeatureType().add(ft);
        }

        final Document dom = encode(ftl, WFS.FeatureTypeList);
        final Element root = dom.getDocumentElement();
View Full Code Here


        assertSame(OperationType.INSERT_LITERAL, operations.get(1));
        assertSame(OperationType.QUERY_LITERAL, operations.get(2));
        assertSame(OperationType.GET_GML_OBJECT_LITERAL, operations.get(3));

        assertEquals(1, ftl.getFeatureType().size());
        FeatureTypeType ft = (FeatureTypeType) ftl.getFeatureType().get(0);
        assertEquals(new QName("http://www.openplans.org/topp", "name1"), ft.getName());
        assertEquals("title1", ft.getTitle());
        assertEquals(1, ft.getKeywords().size());
        KeywordsType kw = (KeywordsType) ft.getKeywords().get(0);
        assertEquals(2, kw.getKeyword().size());
        assertEquals("urn:ogc:crs:EPSG:6.7:4326", ft.getDefaultSRS());
        assertEquals(1, ft.getOtherSRS().size());
        assertEquals("urn:ogc:crs:EPSG:6.7:23030", ft.getOtherSRS().get(0));
        assertEquals(1, ft.getOutputFormats().getFormat().size());
        assertEquals("GML2", ft.getOutputFormats().getFormat().get(0));
        assertNotNull(ft.getWGS84BoundingBox());
    }
View Full Code Here

    /**
     * @see org.geotools.data.wfs.internal.WFSStrategy#getFeatureTypeInfo(javax.xml.namespace.QName)
     */
    @Override
    public FeatureTypeInfo getFeatureTypeInfo(QName typeName) {
        FeatureTypeType eType = typeInfos.get(typeName);
        if (null == eType) {
            throw new IllegalArgumentException("Type name not found: " + typeName);
        }
        return new FeatureTypeInfoImpl(eType);
    }
View Full Code Here

        @SuppressWarnings("unchecked")
        List<FeatureTypeType> featureTypes = featureTypeList.getFeatureType();

        for (FeatureTypeType typeInfo : featureTypes) {
            FeatureTypeType transTypeInfo = translateTypeInfo(typeInfo);
            QName name = transTypeInfo.getName();
            typeInfos.put(name, transTypeInfo);
        }
    }
View Full Code Here

    /**
     * @see WFSProtocol#getSupportedOutputFormats(String)
     */
    public Set<String> getSupportedOutputFormats(String typeName) {
        final Set<String> serviceOutputFormats = getSupportedGetFeatureOutputFormats();
        final FeatureTypeType typeInfo = getFeatureTypeInfo(typeName);
        final OutputFormatListType outputFormats = typeInfo.getOutputFormats();

        Set<String> ftypeFormats = new HashSet<String>();
        if (outputFormats != null) {
            List<String> ftypeDeclaredFormats = outputFormats.getFormat();
            ftypeFormats.addAll(ftypeDeclaredFormats);
View Full Code Here

    /**
     * @see WFSProtocol#getFeatureTypeName(String)
     */
    public QName getFeatureTypeName(String typeName) {
        FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        QName name = featureTypeInfo.getName();
        return name;
    }
View Full Code Here

    /**
     * @see WFSProtocol#getFeatureTypeTitle(String)
     */
    public String getFeatureTypeTitle(String typeName) {
        FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        return featureTypeInfo.getTitle();
    }
View Full Code Here

    /**
     * @see WFSProtocol#getFeatureTypeAbstract(String)
     */
    public String getFeatureTypeAbstract(String typeName) {
        FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        return featureTypeInfo.getAbstract();
    }
View Full Code Here

    /**
     * @see WFSProtocol#getFeatureTypeWGS84Bounds(String)
     */
    public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) {
        final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox();
        if (bboxList != null && bboxList.size() > 0) {
            WGS84BoundingBoxType bboxType = bboxList.get(0);
            List lowerCorner = bboxType.getLowerCorner();
            List upperCorner = bboxType.getUpperCorner();
            double minLon = (Double) lowerCorner.get(0);
View Full Code Here

    /**
     * @see WFSProtocol#getDefaultCRS(String)
     */
    public String getDefaultCRS(String typeName) {
        FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        String defaultSRS = featureTypeInfo.getDefaultSRS();
        return defaultSRS;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.FeatureTypeType

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.