@Test public void geosciml20() { String path = AppSchemaResolver .getSimpleHttpResourcePath("http: Assert.assertEquals(path, "/org/geosciml/www/geosciml/2.0/xsd/geosciml.xsd"); String classpathPath = AppSchemaResolver.class.getResource(path).toExternalForm(); Assert.assertTrue(classpathPath.startsWith("jar:file:/")); Assert.assertTrue(classpathPath .endsWith("!/org/geosciml/www/geosciml/2.0/xsd/geosciml.xsd")); }
public static String getSimpleHttpResourcePath(String location) { URI locationUri; try { locationUri = new URI(location); } catch (URISyntaxException e) { return null; } return getSimpleHttpResourcePath(locationUri); }
AppSchemaResolver { public static String getSimpleHttpResourcePath(String location) { URI locationUri; try { locationUri = new URI(location); } catch (URISyntaxException e) { return null; } return getSimpleHttpResourcePath(locationUri); } }
AppSchemaResolver { public static String getSimpleHttpResourcePath(String location) { URI locationUri; try { locationUri = new URI(location); } catch (URISyntaxException e) { return null; } return getSimpleHttpResourcePath(locationUri); } AppSchemaResolver(AppSchemaCatalog catalog, AppSchemaCache cache);  AppSchemaResolver();  AppSchemaResolver(AppSchemaCatalog catalog);  AppSchemaResolver(AppSchemaCache cache); }
AppSchemaResolver { public static String getSimpleHttpResourcePath(String location) { URI locationUri; try { locationUri = new URI(location); } catch (URISyntaxException e) { return null; } return getSimpleHttpResourcePath(locationUri); } AppSchemaResolver(AppSchemaCatalog catalog, AppSchemaCache cache);  AppSchemaResolver();  AppSchemaResolver(AppSchemaCatalog catalog);  AppSchemaResolver(AppSchemaCache cache); String resolve(String location, String context); String resolve(String location); static String getSimpleHttpResourcePath(String location); static String getSimpleHttpResourcePath(URI location); static URL getClasspathResourceUrl(String location); static String resolveClasspathLocation(String location); }
AppSchemaResolver { public static String getSimpleHttpResourcePath(String location) { URI locationUri; try { locationUri = new URI(location); } catch (URISyntaxException e) { return null; } return getSimpleHttpResourcePath(locationUri); } AppSchemaResolver(AppSchemaCatalog catalog, AppSchemaCache cache);  AppSchemaResolver();  AppSchemaResolver(AppSchemaCatalog catalog);  AppSchemaResolver(AppSchemaCache cache); String resolve(String location, String context); String resolve(String location); static String getSimpleHttpResourcePath(String location); static String getSimpleHttpResourcePath(URI location); static URL getClasspathResourceUrl(String location); static String resolveClasspathLocation(String location);  }