Class ScriptProvider
Object
InstallationResources
InstallationScriptProvider
ScriptProvider
Provides SQL scripts for creating a local copy of the EPSG geodetic dataset.
Provides also a copy of the EPSG Terms of Use,
which should be accepted by users before the EPSG dataset can be installed.
Notice
EPSG is maintained by the International Association of Oil and Gas Producers (IOGP) Surveying & Positioning Committee. The SQL scripts given by this class are derived from the EPSG scripts, but in a more compact format and with some EPSG lineage metadata omitted.- Since:
- 0.7
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLicense(String authority, Locale locale, String mimeType) Returns a copy of EPSG terms of use.protected InputStreamopenStream(String name) Returns the content for the SQL script of the given name.Methods inherited from class InstallationScriptProvider
getAuthorities, getResourceNames, openScriptMethods inherited from class InstallationResources
getInstructionURL, getResource, load
-
Constructor Details
-
ScriptProvider
public ScriptProvider()Creates a new EPSG scripts provider.
-
-
Method Details
-
getLicense
Returns a copy of EPSG terms of use.- Specified by:
getLicensein classInstallationResources- Parameters:
authority- one of the values returned byInstallationScriptProvider.getAuthorities().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 the specified MIME type is not recognized. - Throws:
IOException- if an error occurred while reading the license file.- See Also:
-
openStream
Returns the content for the SQL script of the given name. The file encoding is UTF-8.- Specified by:
openStreamin classInstallationScriptProvider- Parameters:
name- either"Tables.sql","Data.sql"or"FKeys.sql".- Returns:
- the SQL script of the given name, or
nullif the given name is not one of the expected names.
-