Package org.geotools.xml

Examples of org.geotools.xml.Configuration$DepEdge


    @Override
    protected GetFeatureParser getParser( QName featureName, String schemaLocation,
            SimpleFeatureType featureType, URL getFeaturesRequest ) throws IOException {
        URL schemaLocationUrl = TestData.getResource(this, schemaLocation);

        Configuration configuration = new WFSConfiguration();
        final InputStream inputStream = new BufferedInputStream(getFeaturesRequest.openStream());
        final StreamingParserFeatureReader featureReader;
        featureReader = new StreamingParserFeatureReader(configuration, inputStream, featureName,
                schemaLocationUrl);
        return featureReader;
View Full Code Here


        if (Version.WFS1_1 == version) {
            final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());

            String namespaceURI = featureName.getNamespaceURI();
            String uri = schemaLocation.toExternalForm();
            Configuration wfsConfiguration = new org.geotools.gml3.ApplicationSchemaConfiguration(
                    namespaceURI, uri);

            FeatureType parsed = GTXML.parseFeatureType(wfsConfiguration, featureName, crs);
            return DataUtilities.simple(parsed);
        }

        if (Version.WFS1_0 == version) {
            final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());

            String namespaceURI = featureName.getNamespaceURI();
            String uri = schemaLocation.toExternalForm();

            XSD xsd = new org.geotools.gml2.ApplicationSchemaXSD(namespaceURI, uri);
            Configuration configuration = new Configuration(xsd) {
                {
                    addDependency(new XSConfiguration());
                    addDependency(gmlConfiguration); // use our GML configuration
                }
View Full Code Here

    private SimpleFeatureType testParseDescribeSimpleFeatureType(final QName featureTypeName,
            final URL schemaLocation, int expectedAttributeCount) throws IOException {
        assertNotNull(schemaLocation);
        final CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;

        Configuration configuration = new WFSConfiguration();

        SimpleFeatureType featureType;
        featureType = EmfAppSchemaParser.parseSimpleFeatureType(configuration, featureTypeName,
                schemaLocation, crs);
View Full Code Here

    }

    /** Use the provided schemaLocation with a GML3 ApplicationSchemaConfiguration */
    public static SimpleFeatureType parse(URL schemaLocation, QName featureName,
            CoordinateReferenceSystem crs) throws IOException {
        Configuration configuration;
        // use GML3 application Schema by default
        String namespaceURI = featureName.getNamespaceURI();
        String uri = schemaLocation.toExternalForm();
        configuration = new ApplicationSchemaConfiguration(namespaceURI, uri);

View Full Code Here

*
* @source $URL$
*/
public class GMLGeometryStreamingTest extends TestCase {
    public void testStreamByXpath() throws Exception {
        Configuration configuration = new GMLConfiguration();
        InputStream input = getClass().getResourceAsStream("geometry.xml");
        String xpath = "/pointMember | /lineStringMember | /polygonMember";

        //String xpath = "/child::*";
        StreamingParser parser = new StreamingParser(configuration, input, xpath);
View Full Code Here

    protected void setUp() throws Exception {
        SAXParserFactory spf = SAXParserFactory.newInstance();

        spf.setNamespaceAware(true);

        Configuration configuration = new GMLConfiguration();

        parser = new Parser(configuration, getClass().getResourceAsStream("geometry.xml"));
    }
View Full Code Here

   
    public void testEncodeFeatureCollectionWithoutBBOX() throws Exception {
        FeatureCollectionType fc = WfsFactory.eINSTANCE.createFeatureCollectionType();
        FeatureCollection features = store.getFeatureSource("feature").getFeatures();
        fc.getFeature().add( features );
        Configuration wfsConfiguration = new org.geotools.wfs.v2_0.WFSConfiguration();
        wfsConfiguration.getProperties().add(GMLConfiguration.NO_FEATURE_BOUNDS);
        Encoder e = encoder(wfsConfiguration);
        e.getNamespaces().declarePrefix( "geotools", "http://geotools.org");
        e.setIndenting(true);
       
        Document d = e.encodeAsDOM( fc, WFS.FeatureCollection );
View Full Code Here

        Object object;
        BufferedReader in = null;
        try
        {
            Configuration config = new WPSConfiguration();

            URL url;
            if (ONLINE)
            {
                url = new URL(
View Full Code Here

        Object object;
        BufferedReader in = null;
        try
        {
            Configuration config = new WPSConfiguration();

            URL url;
            url = TestData.url(this, "deegree3Capabilities.xml");

            Parser parser = new Parser(config);
View Full Code Here

        Object object;
        BufferedReader in = null;
        try
        {
            Configuration config = new WPSConfiguration();

            URL url;
            url = TestData.url(this, "geoserverCapabilities.xml");

            Parser parser = new Parser(config);
View Full Code Here

TOP

Related Classes of org.geotools.xml.Configuration$DepEdge

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.