Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
103 stars 71 forks source link

Provide CRUD forms for editing RDF mappings? #1529

Open mjordan opened 4 years ago

mjordan commented 4 years ago

RDF mappings are stored as configuration entities. Therefore, it should be possible to write a module that allow site admins to perform CRUD tasks on them. https://www.drupal.org/docs/drupal-apis/configuration-api/creating-a-configuration-entity-type describes how to create an edit controller for doing that. Anybody suggest why we shouldn't provide user-facing tools for managing RDF mappings?

seth-shaw-unlv commented 4 years ago

It is totally do-able. We've chatted about it before on #862.

There is the existing rdfui module although it hasn't been updated in 3 years. I think the limitation on that module was that it was Schema.org centric. I suppose someone (not me) could volunteer to take over that project and bring it up to where we need it to be?

mjordan commented 4 years ago

@seth-shaw-unlv thanks for the reminder about that discussion.

I just tried to enable the rdfui module via drush and it 'sploded:

PHP Fatal error: Cannot use Drupal\Component\Utility\String as String because 'String' is a special class name in /var/www/html/drupal/web/modules/contrib/rdfui/src/Form/FieldMappings.php on line 11 [warning] Drush command terminated abnormally.

Given that it hasn't been updated in almost 4 years, I wonder if anyone has ever been able to enable it.

seth-shaw-unlv commented 4 years ago

I enabled it a looooong time ago but not for very long. So it kinda worked at some point?

Ah, the age old question of refurbishing a fixer-upper or building a-new.....

dannylamb commented 4 years ago

It did totally work at some point in time. Though I've long forgotten the UI/UX. Would be nice to poke at it and see.

We've talked about this a lot. There's even a labs project with a bunch of community use cases: https://github.com/Islandora-Labs/rdfux It'd be worth exploring these again and seeing what's relevant and what's a moonshot.

I've certainly gone down a few paths looking at this at various points in time. It's not a super complicated config entity, but the different bits come in many different shapes. Last time I gave up I told myself next time I'd try doing it with webform and a custom handler just for productivity's sake.

mjordan commented 4 years ago

I was imagining that we could alter a content type field's "Edit" form to include a widget containing the RDF mapping and then persist whatever is in that field to the mapping config entity. But that's probably overly simplistic.

rosiel commented 4 years ago

Notes from I8 Call: resurrecting the rdfui may not be worth it? Look at the linked_data_field for an example of a pluggable config