Package org.geotools.xml.schema

Examples of org.geotools.xml.schema.Schema


     *
     *
     * @throws SAXException
     */
    public Schema getSchema() throws SAXException {
        Schema s = schema.compress(uri);

        return s;
    }
View Full Code Here


            URL getCapsURL = getCaps.toURI().toURL();
            Map hints = new HashMap();
            hints.put(DocumentHandler.DEFAULT_NAMESPACE_HINT_KEY, WMSSchema.getInstance());
            Object object = DocumentFactory.getInstance(getCapsURL.openStream(), hints, Level.WARNING);
           
            Schema schema = WMSSchema.getInstance();
            SchemaFactory.getInstance(WMSSchema.NAMESPACE);
           
            assertTrue("Capabilities failed to parse", object instanceof WMSCapabilities);
           
            WMSCapabilities capabilities = (WMSCapabilities) object;
View Full Code Here

* @source $URL$
*/
public class WMSSchemaTest extends TestCase {
   
    public void testSchema() throws URISyntaxException{
        Schema v1 = SchemaFactory.getInstance(new URI("http://www.opengis.net/wms"));
        assertNotNull(v1);
        Schema v2 = WMSSchema.getInstance();
        assertNotNull(v2);
        assertEquals(v1,v2);
    }
View Full Code Here

    File getCaps = TestData.file(this, "1.3.0Capabilities.xml");
        URL getCapsURL = getCaps.toURI().toURL();

    Object object = DocumentFactory.getInstance(getCapsURL.openStream(), null, Level.WARNING);

        Schema schema = WMSSchema.getInstance();
    SchemaFactory.getInstance(WMSSchema.NAMESPACE);
       
    assertTrue("Capabilities failed to parse", object instanceof WMSCapabilities);
   
    WMSCapabilities capabilities = (WMSCapabilities) object;
View Full Code Here

    File getCaps = TestData.file(this, "1.3.0Capabilities_StyleAbstractTest.xml");
        URL getCapsURL = getCaps.toURI().toURL();

    Object object = DocumentFactory.getInstance(getCapsURL.openStream(), null, Level.WARNING);

        Schema schema = WMSSchema.getInstance();
    SchemaFactory.getInstance(WMSSchema.NAMESPACE);
       
    assertTrue("Capabilities failed to parse", object instanceof WMSCapabilities);
   
    WMSCapabilities capabilities = (WMSCapabilities) object;
View Full Code Here

        Map hints = new HashMap();
        hints.put(DocumentHandler.DEFAULT_NAMESPACE_HINT_KEY, WMSSchema.getInstance());
        Object object = DocumentFactory.getInstance(getCapsURL.openStream(), hints, Level.WARNING);

        Schema schema = WMSSchema.getInstance();
        SchemaFactory.getInstance(WMSSchema.NAMESPACE);

        assertTrue("Capabilities failed to parse", object instanceof WMSCapabilities);

        WMSCapabilities capabilities = (WMSCapabilities) object;
View Full Code Here

*
* @source $URL$
*/
public class GMLParserTest extends TestCase {
    public void testSchema(){
        Schema s = SchemaFactory.getInstance(GMLSchema.NAMESPACE);
        assertNotNull(s);
    }
View Full Code Here

        TestData.copy(this,"xml/wfs/WFS-basic.xsd");

        GMLFeatureCollection doc = (GMLFeatureCollection)DocumentFactory.getInstance(f.toURI(),null,Level.WARNING);
        assertNotNull("Document missing", doc);

        Schema s = SchemaFactory.getInstance(new URI("http://www.openplans.org/topp"));
               
        path = "oneFeature_out.xml";
        f = new File(f.getParentFile(),path);
        if(f.exists())
            f.delete();
View Full Code Here

        TestData.copy(this,"xml/wfs/WFS-basic.xsd");

        GMLFeatureCollection doc = (GMLFeatureCollection)DocumentFactory.getInstance(f.toURI(),null,Level.WARNING);
        assertNotNull("Document missing", doc);

        Schema s = SchemaFactory.getInstance(new URI("http://www.openplans.org/topp"));
               
        path = "oneFeature_out_hints.xml";
        f = new File(f.getParentFile(),path);
        if(f.exists())
            f.delete();
View Full Code Here

        spf.setNamespaceAware(true);
        spf.setValidating(false);
        SAXParser parser = spf.newSAXParser();
        parser.parse(f, contentHandler);

        Schema schema = contentHandler.getSchema();
        Element geomElement = schema.getElements()[0].findChildElement("GEOM");
        GeometryFactory factory=new GeometryFactory();
        LinearRing ring = factory.createLinearRing(new Coordinate[]{
                new Coordinate(0,0),
                new Coordinate(10,0),
                new Coordinate(0,10),
View Full Code Here

TOP

Related Classes of org.geotools.xml.schema.Schema

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.