@Test public void findGml32Configuration() { AppSchemaConfiguration configuration = new AppSchemaConfiguration( "urn:cgi:xmlns:CGI:GeoSciML-Core:3.0.0", "https: new AppSchemaResolver()); Configuration gmlConfiguration = EmfAppSchemaReader.findGmlConfiguration(configuration); Assert.assertNotNull(gmlConfiguration); Assert.assertEquals(new org.geotools.gml3.v3_2.GMLConfiguration(), gmlConfiguration); }
public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } }
EmfAppSchemaReader { public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } } }
EmfAppSchemaReader { public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } } private  EmfAppSchemaReader(); }
EmfAppSchemaReader { public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } } private  EmfAppSchemaReader(); AppSchemaResolver getResolver(); void setResolver(AppSchemaResolver resolver); void setResolver(URL catalogLocation); SchemaIndex parse(Configuration configuration); SchemaIndex parse(String nameSpace, String schemaLocation); SchemaIndex parse(final URL location); String findSchemaNamespace(URL location); static EmfAppSchemaReader newInstance(); static Configuration findGmlConfiguration(AppSchemaConfiguration configuration); }
EmfAppSchemaReader { public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } } private  EmfAppSchemaReader(); AppSchemaResolver getResolver(); void setResolver(AppSchemaResolver resolver); void setResolver(URL catalogLocation); SchemaIndex parse(Configuration configuration); SchemaIndex parse(String nameSpace, String schemaLocation); SchemaIndex parse(final URL location); String findSchemaNamespace(URL location); static EmfAppSchemaReader newInstance(); static Configuration findGmlConfiguration(AppSchemaConfiguration configuration);  }