EIDA / mediatorws

EIDA NG Mediator/Federator web services
GNU General Public License v3.0
6 stars 6 forks source link

StationXML 1.x handling #116

Closed nikosT closed 4 years ago

nikosT commented 4 years ago

Hi, Concerning the issue with the StationXML versioning: When a FDSN-station service is queried for station metadata the first line of the responded XML document is showing the schema Version. For example:

I was wondering if the eida-federator could parse this information and convert performantly the StationXML version 1.1 to 1.0, even as a temporary fix.

About the conversion:

damb commented 4 years ago

@nikosT, thanks for your hints.

Solving the StationXML1.x issue is not that straight forward:

  • For the missing fields that are presented at the StationXML 1.0 but not at the StationXML 1.1, N/A indication will be enough.

Did you verify if such a document would validate?

To conclude: From the current point of view, I doubt if the changes would be worth the effort.

kaestli commented 4 years ago

n/a does not seem to be a valid DateTime: https://www.w3.org/TR/xmlschema-2/#dateTime

nikosT commented 4 years ago

Hi guys, @damb, concerning the first point, would it be possible to request or decompose -let's say- the "headers" of the meta-data info? Perhaps, the /endpoints info of the Routing Service could include information of such. For example, an XML field where the DC refers to which version of the StationXML is using, among other info too.

eida-federator can only support one single version of StationXML. Maybe, we should consider supporting multiple cases even if effort and energy is wasted. What if a DC move to 1.3 next year?

@kaestli

n/a does not seem to be a valid DateTime: https://www.w3.org/TR/xmlschema-2/#dateTime

Could we consider an EIDA convention about the N/A, like a negative year as it's supported by the specification (-0001 = 1 BC)?

damb commented 4 years ago

@nikosT,

Perhaps, the /endpoints info of the Routing Service could include information of such. For example, an XML field where the DC refers to which version of the StationXML is using, among other info too.

Hmm. This would be another example of EIDA internal configuration and such a reason for setting up a configuration service. See also the discussion in https://github.com/EIDA/routing/issues/62.

Maybe, we should consider supporting multiple cases even if effort and energy is wasted. What if a DC move to 1.3 next year?

As long EIDA webservices implement the API of webservices specified by FDSN it needs to be discussed at FDSN level how to move to a new StationXML1.x format and how a StationXML *.xsd incompatible modification is implemented with respect to /fdsnws/station webservices.

IIf FDSN would allow returning any StationXML *.xsd incompatible version using one and only the path /fdsnws/station/1/, clients such as eida-federator need to implement the expensive merging solution. However, then it still needs to be defined how those documents are merged, practically.

kaestli commented 4 years ago

@nikosT: i am not sure whether i get your first point. But I believe that (sooner or later) a next version of the routing protocol should (among other changes) include a version tag for the services dataselect, station, wfcatalog etc.

On the second point: a) changing the data type of a StationXML element or attribute from type="xs:dateTime" (ISO 8601 formatted) to something else would require a new version of StationXML (or a violation of both StationXML 1.0 and 1.1) - so I don't think this can solve anything here. b) Negative years are covered because they are covered by ISO 8601 the dateTime xml basetype refers to. c)Replacing xs:dateTime by a proprietary time representation has a considerable impact on software development: Developers cannot leverage existing software packages as easily any more & may have to re-implement functionality such as sorting, converting etc.

nikosT commented 4 years ago

@kaestli

@nikosT: i am not sure whether i get your first point. But I believe that (sooner or later) a next version of the routing protocol should (among other changes) include a version tag for the services dataselect, station, wfcatalog etc.

I mean exposing EIDA node configuration as primary data (i.e. among mseed, inventory and routing).

a) changing the data type of a StationXML element or attribute from type="xs:dateTime" (ISO 8601 formatted) to something else would require a new version of StationXML (or a violation of both StationXML 1.0 and 1.1) - so I don't think this can solve anything here.

I agree!

b) Negative years are covered because they are covered by ISO 8601 the dateTime xml basetype refers to.

So, we could use, for example, the negative year to indicate N/A.

c)Replacing xs:dateTime by a proprietary time representation has a considerable impact on software development: Developers cannot leverage existing software packages as easily any more & may have to re-implement functionality such as sorting, converting etc.

I agree!

damb commented 4 years ago

Closed. StationXML1.1 is in place.