Package org.geotools.xml

Examples of org.geotools.xml.AppSchemaConfiguration


    @Test
    public void testCatalogSchemaResolution() throws Exception {
        URL catalogLocation = getClass().getResource(schemaBase + "mappedPolygons.oasis.xml");
        String namespace = "http://www.cgi-iugs.org/xml/GeoSciML/2";
        String schemaLocation = "http://schemas.opengis.net/GeoSciML/geosciml.xsd";
        Configuration config = new AppSchemaConfiguration(namespace, schemaLocation,
                new SchemaResolver(SchemaCatalog.build(catalogLocation)));
        String resolvedSchemaLocation = config.getXSD().getSchemaLocation();
        assertTrue(resolvedSchemaLocation.startsWith("file:/"));
        assertTrue(resolvedSchemaLocation.endsWith(schemaBase
                + "commonSchemas_new/GeoSciML/geosciml.xsd"));
    }
View Full Code Here


    /**
     * Test we can find that GeoSciML 2.0 depends on GML 3.1.
     */
    @Test
    public void findGml31Configuration() {
        AppSchemaConfiguration configuration = new AppSchemaConfiguration(
                "urn:cgi:xmlns:CGI:GeoSciML:2.0",
                "http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd", new SchemaResolver());
        Configuration gmlConfiguration = EmfAppSchemaReader.findGmlConfiguration(configuration);
        Assert.assertNotNull(gmlConfiguration);
        Assert.assertEquals(new GMLConfiguration(), gmlConfiguration);
View Full Code Here

    /**
     * Test we can find that GeoSciML 3.0rc1 depends on GML 3.2.
     */
    @Test
    public void findGml32Configuration() {
        AppSchemaConfiguration configuration = new AppSchemaConfiguration(
                "urn:cgi:xmlns:CGI:GeoSciML-Core:3.0.0",
                "https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0_rc1_gml3.2/geosciml-core/3.0.0/xsd/geosciml-core.xsd",
                new SchemaResolver());
        Configuration gmlConfiguration = EmfAppSchemaReader.findGmlConfiguration(configuration);
        Assert.assertNotNull(gmlConfiguration);
View Full Code Here

     */
    @Test
  public void testNonGMLConfiguration() {
    SchemaCatalog catalog = SchemaCatalog.build(getClass()
        .getResource("/test-data/mappedPolygons.oasis.xml"));
    AppSchemaConfiguration configuration = new AppSchemaConfiguration(
        "http://www.opengis.net/swe/2.0",
        "http://schemas.opengis.net/sweCommon/2.0/swe.xsd",
        new SchemaResolver(catalog));
    Configuration gmlConfiguration = EmfAppSchemaReader
        .findGmlConfiguration(configuration);
View Full Code Here

     * @param location the physical location of the root xsd schema that comprises the application schema to parse.
     * @throws IOException if any non recoverable problem occurs while parsing the application schema pointed out by <code>location</code> or one of
     *         its dependencies.
     */
    public SchemaIndex parse(String nameSpace, String schemaLocation) throws IOException {
        AppSchemaConfiguration configuration = new AppSchemaConfiguration(nameSpace,
                schemaLocation, resolver);
        return parse(configuration);
    }
View Full Code Here

TOP

Related Classes of org.geotools.xml.AppSchemaConfiguration

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.