Overview
Transforms generic dcterms:relation in JSON-LD into specific RDF predicates based on your relationship nodes and role terms.
Requirements
- Role taxonomy: add a Text field
field_rdf_propertyto hold each term’s predicate IRI (e.g.schema:translationOfWork). - Relationship content types: include a
field_role(to Role terms) and one or morefield_to_*reference fields. - JSON-LD enabled for Node in REST (
?_format=jsonldorAccept: application/ld+json).
Setup
- Add
field_rdf_propertyto Structure → Taxonomy → Role → Manage fields. - Copy the module to
modules/custom/relation_extend/and ensurerelation_extend.info.ymldepends onserializationandjsonld. - Enable modules:
drush en serialization jsonld relation_extend -y drush cr