Class EmbeddedResources
Object
InstallationResources
EmbeddedResources
Provides an embedded database for the EPSG geodetic dataset and other resources.
Provides also a copy of the EPSG terms of use,
which should be accepted by users before the EPSG dataset can be installed.
- Since:
- 0.8
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new provider for connections to the embedded database. -
Method Summary
Modifier and TypeMethodDescriptionReturns the pseudo-authority, which is"Embedded".getLicense(String authority, Locale locale, String mimeType) Returns the license of embedded data.getResource(String authority, int index) Returns the data source for embedded database.String[]getResourceNames(String authority) Returns the data source name, which is"SpatialMetadata".openScript(String authority, int resource) Unconditionally throws an exception since the embedded database is not provided as SQL scripts.Methods inherited from class InstallationResources
getInstructionURL, loadModifier and TypeMethodDescriptionReturns a URL where users can get more information about the installation process.static ServiceLoader<InstallationResources> load()Returns all installation resources found on the module path, regardless if supported or not.
-
Constructor Details
-
EmbeddedResources
public EmbeddedResources()Creates a new provider for connections to the embedded database.
-
-
Method Details
-
getAuthorities
Returns the pseudo-authority, which is"Embedded".- Specified by:
getAuthoritiesin classInstallationResources- Returns:
"Embedded"pseudo-authority.
-
getLicense
Returns the license of embedded data.- Specified by:
getLicensein classInstallationResources- Parameters:
authority- shall be"Embedded".locale- the preferred locale for the terms of use.mimeType- either"text/plain"or"text/html".- Returns:
- the terms of use in plain text or HTML, or
nullif none. - Throws:
IllegalArgumentException- if the givenauthorityargument is not the expected values.IOException- if an error occurred while reading the license file.
-
getResourceNames
Returns the data source name, which is"SpatialMetadata".- Specified by:
getResourceNamesin classInstallationResources- Parameters:
authority- shall be"Embedded".- Returns:
"SpatialMetadata".
-
getResource
Returns the data source for embedded database. If theSIS_DATAenvironment variable is defined and does not containSpatialMetadatafiles, the embedded data will be copied in that directory and the returnedDataSourcewill use these files. This copy is done because database operations are faster on ordinary files compared to entries embedded in a JAR file.- Overrides:
getResourcein classInstallationResources- Parameters:
authority- shall be"Embedded".index- shall be 0.- Returns:
- the embedded data source, or
nullif not available. - See Also:
-
openScript
Unconditionally throws an exception since the embedded database is not provided as SQL scripts.- Specified by:
openScriptin classInstallationResources- Parameters:
authority- shall be"Embedded".resource- shall be 0.- Returns:
- never return.
- Throws:
IOException- always thrown.
-