Islandora / documentation

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

Design RDF Resource Entity in Drupal #334

Closed dannylamb closed 8 years ago

dannylamb commented 8 years ago

We need a plan for modeling a Fedora RDFResource in Drupal as an entity.

Think in terms of what class to extend and what base fields it would have. What would the annotation look like?

Depends on #336

DiegoPino commented 8 years ago

Just to get us started:

This one defines a custom content Entity for our resources: https://github.com/DiegoPino/claw-drupal8/blob/master/src/Entity/FedoraResource.php

based on that and https://github.com/DiegoPino/claw-drupal8/blob/master/src/Entity/FedoraResourceType.php we define this config entities that install two types

https://github.com/DiegoPino/claw-drupal8/tree/master/config/install

Also in the same folder an example of rdf mapping config

So we need to:

We need to preserve Node functionality which can be done at least in two ways:

  1. Make base Fedora_resource a subclass of Class Node and/or usingNodeInterface
  2. Use our fedora_resource entities as referred (entity reference field) entities inside a normal Drupal node type(custom content type that enforces at least one fedora_resource). This could be also be interpreted as an ORE ReM! (so the normal Drupal 8 node links to custom fedora resource ones, like and index and can be uses "as it is" in many other contributed modules).

I would suggest before final modelling/coding we try to get some examples working using just bundled fields (user configurable ones) based on this base structures. The code is still very simple and of course needs more refinement, some new methods and swapping the storage class.

bryjbrown commented 8 years ago

I would add that embedded RDFa in the display template should be high priority. Having the metadata be machine-readable inside the page lays the groundwork for third party apps like Zotero or Google Scholar.

I'm less familiar with microdata/microformats and if they're still a thing, but having as much machine-readable data as possible seems like a decent guiding principle.

Ditto for accessibility.

DiegoPino commented 8 years ago

@bryjbrown: rdfa is already working in drupal8 so that is luckily solved, every rdf mapped property gets and rdfa entry in the normal html view (look at the rdf module for details).

acoburn commented 8 years ago

This comment / proposal may also be relevant to this discussion: https://github.com/Islandora-CLAW/CLAW/issues/341#issuecomment-242100676

dannylamb commented 8 years ago

Closing since sprint is over. We can open another ticket to 'revisit' this concept later if required.