Hi, Florent,
Right now there is a Elastic JSON → OGCAPI-Records JSON output (as specified in the spec). The -Records output is very simple, so this is an easy output and there isn’t too much in the output (i.e. keyword/theme, and contact).
For the GN5/GN-microservices ogcapi-records, I’ve extended the output to also include the entire Elastic JSON index as well as the underlying record XML text (in the JSON output). The -Records spec is based on DC/DCAT so its very anemic. This output gives the client lots of options - they can use the standard -Records information as well as a bunch of “extra” information. The -Records spec seems to be based around search and a common format for simple searching and summary of metadata. I don’t think its for detailed metadata.
For example, a “nice” interactive html view of a metadata record would (very likely) need more than the information in the Elastic JSON index.
For CSW endpoints, the output isn’t defined in the same way as with -Records. I would recommend using the full underlying XML for these type of xforms as any type of “pivot model” will be lossy.
The plan is to support DCAT and XML output inside the GN5 OGCAPI-Records. You can see some work in that area here (FormatterApi
): API / Formatter migration check by fxprunayre · Pull Request #78 · geonetwork/geonetwork · GitHub as well as quite a bit of recent GN4 DCAT-AP* work (francois and jose).
Since this is one of the first modules that will be moved from GN4 to GN5, its going to take a little bit to get our infrastructure in place (i.e. things like security, access, exception handling, and GN4 XSLT to GN5 XSLT). The rest of the GN4->GN5 module migration will follow the same ideas. There are a few different ways of doing metadata formatting, but the main one is XSLT.
Once that’s finished we should have a very simple shared library were we can query what output are available for a particular metadata type and I will put that in the items
links in ogcapi-records. I expect the vast majority of these will be XML output (via XSLT) - in the same manner as what’s currently available in GN4. I doubt any of these will use the Elastic JSON index. However, I would be more than happy to add the OGCAPI-Records JSON output as a FormatterApi
non-XSLT output in the future.
I havent looked at the CSW spec in detail, however, I expect we can do something similar.
I would recommend that the people interested in GN5 get together and really look at the FormatterApi
and how its put together.
- Its real core GN functionality
- I expect it to be reused in the future in other modules
- Its the first real module being migrated from GN4, so all the concerns about access, security, etc… need to be addressed. I think we’ll see that any decisions made here will be “monkey-see monkey-do” for all the other modules
Also, my might hear me talk about “GN5++”. I haven’t talked about it too much (I need some more time). However, this is more along the lines of microservices - smaller spring-boot based GN-based apps. An example of this would be being able to just deploy a scalable OGCAPI-Records (or just CSW) into a cluster. There would be a lot of code sharing with GN5 - much in the same way as GeoServer cloud-native and GeoServer standard. However, I expect there to be other apps - like vocabulary management, validation services, etc…
For “GN5” I mean the “GN4” replacement (i.e. a monolith with everything in it) - the GN5++ would be smaller (more specific) apps.
Hope that makes sense - I will be talking about it more in the future so its not too important right now.
Summary:
- I don’t think there will be anything other than OGCAPI-Records that uses the Elastic JSON.
- Almost all output formats will be XSLT-based (see GN4 output)
FormatterApi
is very important to get right
- CSW not be using the elastic index
NOTE: The reason why I used the Elastic JSON index is because it is a schema-independent summary of the record. If i didn’t use this, I would have to have a xform-to-ogcapi-records for EACH of the different schemas!! However, this one works because the ogcapi-records output is so simple.