|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.xml.AppSchemaCache
public class AppSchemaCache
Cache containing application schemas. (Should also work for other file types.)
If configured to permit downloading, schemas not present in the cache are downloaded from the network.
Only http/https URLs are supported.
Files are stored according to the Simple HTTP Resource Path (see
AppSchemaResolver#getSimpleHttpResourcePath(URI))
.
Constructor Summary | |
---|---|
AppSchemaCache(java.io.File directory,
boolean download)
A cache of application schemas (or other file types) rooted in the given directory, with optional downloading. |
Method Summary | |
---|---|
static AppSchemaCache |
buildFromGeoserverUrl(java.net.URL url)
Search parents of url for a GeoServer data directory. |
static void |
disableGeoserverSupport()
Turn off support for automatic construction of a cache in GeoServer data directory. |
static void |
enableGeoserverSupport()
The opposite of disableGeoserverSupport() |
java.io.File |
getDirectory()
Return the root directory of the cache. |
boolean |
isDownloadAllowed()
Are schemas not already present in the cache downloaded from the network? |
static boolean |
isGeoserverSupportEnabled()
|
java.lang.String |
resolveLocation(java.lang.String location)
Return the local file URL of a schema, downloading it if not found in the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppSchemaCache(java.io.File directory, boolean download)
directory
- the directory in which downloaded schemas are storeddownload
- is downloading of schemas permitted. If false, only schemas already present in the
cache will be resolved.Method Detail |
---|
public java.io.File getDirectory()
public boolean isDownloadAllowed()
public java.lang.String resolveLocation(java.lang.String location)
location
- the absolute http/https URL of the schema
public static AppSchemaCache buildFromGeoserverUrl(java.net.URL url)
url
- a URL for a file in a GeoServer data directory.
public static void disableGeoserverSupport()
public static void enableGeoserverSupport()
disableGeoserverSupport()
public static boolean isGeoserverSupportEnabled()
disableGeoserverSupport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |