|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSchemaCache
public class SchemaCache
Cache containing XML 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 SchemaResolver#getSimpleHttpResourcePath(URI))
.
Constructor Summary | |
---|---|
SchemaCache(File directory,
boolean download)
A cache of XML schemas (or other file types) rooted in the given directory, with optional downloading. |
|
SchemaCache(File directory,
boolean download,
boolean keepQuery)
A cache of XML schemas (or other file types) rooted in the given directory, with optional downloading. |
Method Summary | |
---|---|
static SchemaCache |
buildAutomaticallyConfiguredUsingFileUrl(URL url)
If automatic configuration is enabled, recursively search parent directories of file url for a GeoServer data directory or directory containing an existing cache. |
static void |
disableAutomaticConfiguration()
Turn off support for automatic configuration of a cache in GeoServer data directory or detection of an existing cache. |
static void |
enableAutomaticConfiguration()
The opposite of disableAutomaticConfiguration() . |
File |
getDirectory()
Return the root directory of the cache. |
File |
getTempDirectory()
Return the temp directory for not cached downloads (those occurring during another download, to avoid conflicts among threads). |
static boolean |
isAutomaticConfigurationEnabled()
Is automatic configuration enabled? |
boolean |
isDownloadAllowed()
Are schemas not already present in the cache downloaded from the network? |
String |
resolveLocation(String location)
Return the local file URL of a schema, downloading it if not found in the cache. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaCache(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.public SchemaCache(File directory, boolean download, boolean keepQuery)
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.keepQuery
- indicates whether or not the query components should be included in the path. If this is set to true then the query portion is
converted to an MD5 message digest and that string is used to identify the file in the cache.Method Detail |
---|
public File getDirectory()
public File getTempDirectory()
public boolean isDownloadAllowed()
public String resolveLocation(String location)
location
- the absolute http/https URL of the schema
public static SchemaCache buildAutomaticallyConfiguredUsingFileUrl(URL url)
url
- a URL for a file in a GeoServer data directory.
public static void disableAutomaticConfiguration()
public static void enableAutomaticConfiguration()
disableAutomaticConfiguration()
. Automatic configuration is enabled by default.
public static boolean isAutomaticConfigurationEnabled()
disableAutomaticConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |