Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNDESIRABLE? UCDs 'meta.id;meta.ref` resolve entry to the datalink viewer #242

Open
kimakan opened this issue Jul 17, 2024 · 2 comments
Open

Comments

@kimakan
Copy link
Contributor

kimakan commented Jul 17, 2024

Currently, columns with the UCDs main.id;main.ref resolve the entry to /datalink/<datalink_id>/?job=<job_id>.

  • First, it only works for the tables in the query results and breaks in the tables provided by /serve/table/<schema_name>/<table_name. In the serve module, it resolves to /serve/table/<schema_name>/<table_name>/NaN.
  • Second, I don't think that this behavior is desirable for the most use-cases. Usually, the user would like to click on the ID of the object and go straight to some kind of object viewer that presents all relevant information in a nice form. Personally, I would remove this feature all together. However, maybe there is something I'm missing because I'm not quiet sure why it was done in the first place.

The code in question:

if (column.ucd) {
if (column.ucd.indexOf('meta.ref') > -1) {
if (column.ucd.indexOf('meta.note') > -1) {
column.meta = 'note';
} else if (column.ucd.indexOf('meta.image') > -1) {
column.meta = 'image';
} else if (column.ucd.indexOf('meta.file') > -1) {
column.meta = 'file';
} else if (column.ucd.indexOf('meta.ref.url') > -1) {
column.meta = 'link';
} else if (column.ucd.indexOf('meta.id') > -1) {
column.meta = 'datalink'
} else {
column.meta = 'reference';
}

@kimakan
Copy link
Contributor Author

kimakan commented Aug 28, 2024

I found another instance where the combination of the ucds meta.id and meta.ref leads to some behavior where I don't see the use for it.

if field.get('ucd'):
if 'meta.id' in field['ucd'] and 'meta.ref' in field['ucd']:
attrs.append('ID="datalinkID"')

Afaik, the attribute ID makes sense only if the record is referenced somewhere else in the same document using the attribute ref. It doesn't seem to be implemented in Daiquiri and as of now, I don't see the point.
Also, the current implementation does not adhere to the XML or VOTable standard. The ID must begin with a letter of underscore. Thus, Gaia's source_id is not a valid ID!

@jochenklar What do you think, can we remove this behavior in both cases?

@kimakan
Copy link
Contributor Author

kimakan commented Oct 1, 2024

Also, the current implementation does not adhere to the XML or VOTable standard. The ID must begin with a letter of underscore. Thus, Gaia's source_id is not a valid ID!

I stand corrected. The identifier name (ID) must begin with a letter or underscore. The ID value, such as Gaia's source_id, doesn't have to follow this requirements. Hence, datalinkID is a valid name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant