FamilySearch / gedcomx-rs

RESTful Interface Definitions for GEDCOM X data
https://github.com/FamilySearch/gedcomx-rs/
Apache License 2.0
12 stars 9 forks source link

Which data types support links? #8

Closed justincy closed 8 years ago

justincy commented 8 years ago

The specification for Link says:

Instances of Link can be reasonably expected as extension elements to any GEDCOM X data type.

I believe that statement should be more explicit.

In gedcomx-java (the canonical implementation of GEDCOM X), anything that supports links inherits from HypermediaEnabledData. There are a number of data types that don't inherit from HypermediaEnabledData and thus don't support links. Why?

The best reason I could see for not supporting links is not supporting extension elements but Address supports extension elements while not supporting links. Was that intentional?

The spec should either say "All data types support links," list data types that do support links, or list data types that don't support it and imply that all others do.

stoicflame commented 8 years ago

At 6f6c84a, I added some language that clarifies that a link cannot be applied to data types that explicitly do not allow extension elements.

It's true that the Java implementation doesn't have links on a bunch of data types that technically do support links, but that's just because this is one of the rare cases where the Java implementation is incomplete with regards to the specification.

In the Java implementation at the time of this comment this applies to:

The Java implementation will be updated as needed if links ever need to be used on those data types.