hbm.sos.metadata.README.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proxy-mappings Show documentation
Show all versions of proxy-mappings Show documentation
REST SPI Mappings for SOS Proxy Cache.
## Adding extra metadata fields
Adding extra metadata to each series can be done by creating an extra metadata table.
Apply `src/extension/metadata/create_metadata_table.sql` and add some metadata to it.
Add `/hbm/sos/metadata` to the `seriesSessionFactory` bean in
`WEB-INF/spring/series-database-config.xml` like
```
classpath:hbm/sos/v42/*.hbm.xml
classpath:hbm/sos/v42/series/*.hbm.xml
classpath:hbm/sos/metadata/*.hbm.xml
```
Now configure the metadata extension to the Web interface so the data can be accessed.
Open the `api_v1_mvc.xml` add the bean
`org.n52.io.extension.DatabaseMetadataExtension` to the `metadataExtensions`
property of a parameterController.
For example
```
```
After restart you should be able to review the extra metadata available in the
`extras` property array of a timeseries. To access them just call
`api/v1/timeseries/:id/extras` and optionally filter by adding query parameter
`fields` (takes a comma-separated list of metadata names).