Opened 11 years ago

Closed 10 years ago

#519 closed defect (fixed)

Do not hardwire kahlua host in petascopedb init

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: minor Milestone: 9.0
Component: petascope Version: development
Keywords: secore kahlua petascopedb Cc: Dimitar Misev
Complexity: Medium

Description

As soon as CRS URIs for index and time CRSs are accepted resources by OGC naming authority, and as SECORE is including them in the rasdaman source, the CRSs which are inserted in petascopedb should use the configured SECORE resolver instead of hardwiring kahlua.

See:

$ egrep -i "kahlua|secore" ./applications/petascope/src/main/db/petascope9/global_const.sql 
-- TODO: global_const.sql.in with replacement of %SECORE% configured host
    SELECT cset('KAHLUA_SECORE_ENTRY',   'http://kahlua.eecs.jacobs-university.de:8080/def/');
    SELECT cset('CRS_ANSI',         cget('KAHLUA_SECORE_ENTRY') || 'crs/OGC/0.1/ANSI-Date');
    SELECT cset('CRS_INDEX_1D',     cget('KAHLUA_SECORE_ENTRY') || 'crs/OGC/0.1/Index1D');
    SELECT cset('CRS_INDEX_2D',     cget('KAHLUA_SECORE_ENTRY') || 'crs/OGC/0.1/Index2D');
    SELECT cset('CRS_INDEX_3D',     cget('KAHLUA_SECORE_ENTRY') || 'crs/OGC/0.1/Index3D');
    SELECT cset('CRS_EOBSTEST_T',   cget('KAHLUA_SECORE_ENTRY') || 'crs/OGC/0.1/Temporal?epoch="1950-01-01T00:00:00"&uom="d"');
    SELECT cset('CRS_WGS84_2D',     cget('KAHLUA_SECORE_ENTRY') || 'crs/EPSG/0/4326');
    SELECT cset('CRS_WGS84_3D',     cget('KAHLUA_SECORE_ENTRY') || 'crs/EPSG/0/4327');

Change History (3)

comment:1 by Dimitar Misev, 10 years ago

Depends on #539 right?

comment:2 by Piero Campalani, 10 years ago

Yes, overlaps: I'm working on this now, the definitions are now in the UserDictionary.xml, so that the configured SECORE host can be replaced in the current KAHLUA_SECORE_ENTRY, to something like just SECORE_ENTRY.

comment:3 by Piero Campalani, 10 years ago

Resolution: fixed
Status: newclosed

Cascading the fix resolution from #539 (see changeset:957dee4).

Now there is a new keyword %SECORE_URL% which is replaced on the fly by Petascope using the configured SECORE resolver (petascope.properties).

$ egrep -i "kahlua|secore" ~/rasdaman/applications/petascope/src/main/db/petascope/global_const.sql 
-- TODO: global_const.sql.in with replacement of %SECORE% configured host
    SELECT cset('SECORE_ENTRY',         '%SECORE_URL%'); -- [!] This shall match with Petascope constant to replace it with the configured resolver.
    SELECT cset('CRS_ANSI',         cget('SECORE_ENTRY') || '/crs/OGC/0/AnsiDate');
    SELECT cset('CRS_INDEX_1D',     cget('SECORE_ENTRY') || '/crs/OGC/0/Index1D');
    SELECT cset('CRS_INDEX_2D',     cget('SECORE_ENTRY') || '/crs/OGC/0/Index2D');
    SELECT cset('CRS_INDEX_3D',     cget('SECORE_ENTRY') || '/crs/OGC/0/Index3D');
    SELECT cset('CRS_EOBSTEST_T',   cget('SECORE_ENTRY') || '/crs/OGC/0/Temporal?epoch="1950-01-01T00:00:00"&uom="d"');
    SELECT cset('CRS_WGS84_2D',     cget('SECORE_ENTRY') || '/crs/EPSG/0/4326');
    SELECT cset('CRS_WGS84_3D',     cget('SECORE_ENTRY') || '/crs/EPSG/0/4327');

This way there can be eithr concrete or "parametrized" URIs in ps9_crs:

petascopedb=# SELECT * FROM ps9_crs;
 id |                                       uri                                        
----+----------------------------------------------------------------------------------
  1 | %SECORE_URL%/crs/OGC/0/AnsiDate
  2 | %SECORE_URL%/crs/OGC/0/Index1D
  3 | %SECORE_URL%/crs/OGC/0/Index2D
  4 | %SECORE_URL%/crs/OGC/0/Index3D
  5 | %SECORE_URL%/crs/OGC/0/Temporal?epoch="1950-01-01T00:00:00"&uom="d"
  6 | %SECORE_URL%/crs/EPSG/0/4326
  7 | %SECORE_URL%/crs/EPSG/0/4327
  8 | http://localhost:8080/def/crs/OGC/0/Index2D
  9 | http://localhost:8080/def/crs/OGC/0/Temporal?epoch="1950-01-01T00:00:00"&uom="d"
 10 | http://localhost:8080/def/crs/EPSG/0/4326
 11 | http://localhost:8080/def/crs/OGC/0/Index3D
(11 rows)
Note: See TracTickets for help on using tickets.