class EmfAppSchemaReader extends EmfComplexFeatureReader {

    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);
                    }
                }
            }
            for (XSDSchema schema : index.getSchemas()) {
                String ns = schema.getTargetNamespace();
                if (ns != null && ns.startsWith("http://www.opengis.net/gml")) {
                    throw new RuntimeException("Unsupported GML version for schema at "
                            + configuration.getSchemaLocation());
                }
            }
        } finally {
            if (index != null) {
                index.destroy();
            }
        }
        return null;
    }

    private  EmfAppSchemaReader();

}