
Conclusion to have one image for SKA and VLKB:
* separate 1. & 2. to its own module
* implement 3 & 4 also for pure-SODA
* delete 5. 6.

exposes endpoints
*/soda
*/availability
*/capabilities
*/cutouts [optional, only if 4. application/xml supported]

Q:
* Does 2 withoput 1 make sense ??
________________________________________________
on top of soda functionality vlkb-cutout has

1. IA2 token validation
-- env: (see auth.properties for params)
ENABLE in config by: token-validation endpoint defined

2. authorization
-- env: DB-table (AUTH_DB_*) columns: policy(PUBLIC|PRIVATE), groups
ENABLE in config by: DB-table URI defined


3. */cutouts temp dir of cuts
** internal feature: if defined streaming is happening from the cache
** is pre-requisite for other features
-- volume: /*/cutouts
-- env: access-url to cache (and service type: download, bbcp,..)
-- env: time-to-live
ENABLE:


4. links instead of streaming by RESPONSEFORMAT=application/xml
-- config in download_url=http://host:port/path/<file>
-- special value: download_url=THISWEBAPP
** cutouts-dirs (and/or surveys-dirs) exported on the same host/tomcat instance
** no need for separate service
** this is tomcat config:
**** context.xml for dir mappings and default webapp in web.xml & default-webapp config: listings-allowed
**** only web.xml and context.xml are part of the app: src/main/webapp/WEB-INF/web.xml and META-INF/context.xml
ENABLE in config: define URL download service (THISWEBAPP, http://, bbcp?)


5. add/modif keywords in cut-files given in metadata
metadata:
for search: adds info about surveys not present in FITS-headers
for cutouts: may add keywords to cut FITS headers
NOTE if keywords added at ingestion, metadata is needed only in search
-- env: METADATA (/*/surveys/survey_populate.csv)
TEMPORARILY instead of direct streaming:
--> check: cfitsio Extended Syntax with output: fitsfile(outfile[modkey CUNIT3=km/s])[23:234 600:800 1:100]
** 1, create fitsfile in cache (cutouts e.g. use 4.)
** 2, add missing keywords to FITSheader
** 3, stream the modif'd file down
ENABLE in config: define metadata file pathname


6. mcutout
-- accept doPost with vlva-JDL in body
-- produce tar.gz and reponse forms as for fits (stream tar.gz or put to cutouts/* cuts-cache)
ENABLE: [no need; if suported, will read body of POST]


7. count of undef values in IMAGE_HDU
-- runtime option webapi param: ??


Optional:

7. resolver by mapping
-- env: DB-table (RESOLVER_DB_*) : obs_publisher_did, local pathname

8. AMQP connection API-engine (vlkbd)
-- env: host, queue-name, amqp-user/password

