|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.xml.AppSchemaResolver
public class AppSchemaResolver
Application schema resolver that maps absolute URLs to local URL resources.
Resources are sought, in order:
getSimpleHttpResourcePath(URI)
).
Constructor Summary | |
---|---|
AppSchemaResolver()
Convenience constructor for a resolver with neither catalog nor cache (just classpath). |
|
AppSchemaResolver(AppSchemaCache cache)
Convenience constructor for a resolver with no catalog. |
|
AppSchemaResolver(AppSchemaCatalog catalog)
Convenience constructor for a resolver with no cache. |
|
AppSchemaResolver(AppSchemaCatalog catalog,
AppSchemaCache cache)
|
Method Summary | |
---|---|
static java.net.URL |
getClasspathResourceUrl(java.lang.String location)
Return the URL for a resource found on the classpath at the Simple HTTP Resource Path. |
static java.lang.String |
getSimpleHttpResourcePath(java.lang.String location)
Return the Simple HTTP Resource Path for an absolute http/https URL. |
static java.lang.String |
getSimpleHttpResourcePath(java.net.URI location)
Return the Simple HTTP Resource Path for an absolute http/https URL. |
java.lang.String |
resolve(java.lang.String location)
Resolve an absolute URL to a local file or jar URL. |
static java.lang.String |
resolveClasspathLocation(java.lang.String location)
Return the string representation of URL for a resource found on the classpath at the Simple HTTP Resource Path. |
java.lang.String |
unresolve(java.lang.String resolvedLocation)
Maps a resolved location (a URL used to obtain a schema from a file or the classpath) to the original HTTP URL used to obtain it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppSchemaResolver(AppSchemaCatalog catalog, AppSchemaCache cache)
public AppSchemaResolver()
public AppSchemaResolver(AppSchemaCatalog catalog)
catalog
- public AppSchemaResolver(AppSchemaCache cache)
cache
- Method Detail |
---|
public java.lang.String resolve(java.lang.String location)
location
- an absolute URL
java.lang.RuntimeException
- if a local resource could not be foundpublic java.lang.String unresolve(java.lang.String resolvedLocation)
public static java.lang.String getSimpleHttpResourcePath(java.lang.String location)
location
- not null
getSimpleHttpResourcePath(URI)
public static java.lang.String getSimpleHttpResourcePath(java.net.URI location)
The Simple HTTP Resource Path maps an HTTP or HTTPS URL to a path on the classpath or relative to some other root. To form the Simple HTTP Resource Path from an http/https URL:
http://schemas.example.org/exampleml/exml.xsd
becomes
/org/example/schemas/exampleml/exml.xsd
.
The Simple HTTP Resource Path always starts with a forward slash (if not null).
location
- not null
public static java.net.URL getClasspathResourceUrl(java.lang.String location)
location
-
public static java.lang.String resolveClasspathLocation(java.lang.String location)
location
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |