nlsfi / hakunapi

OGC API Features Java server
https://github.com/nlsfi/hakunapi
MIT License
12 stars 3 forks source link

Source oracle 1.4.0 (includes dependency updates from #101) #102

Closed nls-jajuko closed 7 months ago

nls-jajuko commented 7 months ago

This pull request adds basic oracle datasource support with modules

This pull request has basic functionality to resolve #100

This pull request Includes dependency updates from #101 (which should be merged first, I think)

Implemented modules

hakunapi-source-oracle

This module has geotools gt-main as a dependency to avoid re-implementing any oracle specific operations. Many unnecessary cascading dependencies have been excluded.

hakunapi-oracle-webapp-javax

A separate webapp with oracle and geotools dependencies

nls-jajuko commented 7 months ago

Sample configuration

api.title=Addresses
api.version=1.0
api.description=Addresses PoC Oracle
api.contact.name=Technical support for APIs
api.contact.email=info@example.org
api.contact.url=https://example.org
api.license.name=Data accessed from the API is property of Example Org (test data)
api.license.url=https://creativecommons.org/licenses/by/4.0/

servers=features

servers.features.url=http://localhost:8080/features
servers.features.description=Addresses

formats=json,html,jsonfg
formats.json.type=json
formats.jsonfg.type=jsonfg
formats.html.type=html

getfeatures.limit.default=100
getfeatures.limit.max=1000

telemetry.mode=log-json
telemetry.logger=fi.nls.hakunapi.telemetry
telemetry.collections=*
telemetry.fields=auth-log-username,auth-knum

db.classes=fi.nls.hakunapi.simple.sdo.SDOSimpleSource
db=oso

collections=osoitepiste
collections.osoitepiste.type=ora
collections.osoitepiste.table=<TABLE>
collections.osoitepiste.schema=<SCHEMA>
collections.osoitepiste.db=oso
collections.osoitepiste.srid.storage=3067
collections.osoitepiste.extent.spatial=15.053785270822842,58.60745650071967,33.993537468175056,70.26415661214813
collections.osoitepiste.srid=3067
collections.osoitepiste.writeNulls=false
collections.osoitepiste.geometryDimension=XY
collections.osoitepiste.id.mapping=ID
collections.osoitepiste.geometry.mapping=GEOM
collections.osoitepiste.properties=BUILDING_ID
collections.osoitepiste.parameters=BUILDING_ID,geometry
collections.osoitepiste.parameters.geometry.prop=$geometry

collections.osoitepiste.properties.BUILDING_ID.mapping=BUILDING_ID
collections.osoitepiste.pagination.strategy=offset

db.oso.jdbcUrl=jdbc:oracle:thin...<DB>
db.oso.driverClassName=oracle.jdbc.OracleDriver
db.oso.dataSource.user=<USERNAME>
db.oso.dataSource.password=<PASSWORD>
db.oso.minimumIdle=1
db.oso.maximumPoolSize=10
db.oso.readOnly=true
db.oso.autoCommit=false
nls-jajuko commented 7 months ago

Some notes

Any available ora database I have access to seems to require offset paging (with results sort) for acceptable performance.

Generic SQL classes are in packages . I did close the previous pull request for generic sql module.