Browse Source

Config for https://github.com/Islandora-CLAW/CLAW/issues/618 (#59)

* Committing to test on clean box.

* Updates from testing

* Bootstrapping tests with a bundle and mapping for jsonld contexts

* Checkstyle and rdf mapping for thumbnail media entity

* Clobbering whitespace

* Re-exporting and REST plugins

* Using just dc

* Adding changed and created dates for thumbnail rdf mapping.

* TN is a ThumbnailImage

* Rules for media write operations.  Indexing media in triplestore now.

* Found two that lingered after uninstalling module.

* This ain't no playground.

* Membership view
pull/756/head
dannylamb 8 years ago committed by Nick Ruest
parent
commit
fc7faecdc6
  1. 66
      config/install/core.entity_form_display.fedora_resource.rdf_source.default.yml
  2. 41
      config/install/core.entity_form_display.media.tn.default.yml
  3. 36
      config/install/core.entity_form_display.media.tn.inline.yml
  4. 13
      config/install/core.entity_form_mode.media.inline.yml
  5. 37
      config/install/core.entity_view_display.media.tn.content.yml
  6. 76
      config/install/core.entity_view_display.media.tn.default.yml
  7. 14
      config/install/core.entity_view_mode.media.content.yml
  8. 30
      config/install/field.field.fedora_resource.rdf_source.field_ldp_contains.yml
  9. 23
      config/install/field.field.media.tn.field_height.yml
  10. 41
      config/install/field.field.media.tn.field_image.yml
  11. 22
      config/install/field.field.media.tn.field_mimetype.yml
  12. 26
      config/install/field.field.media.tn.field_width.yml
  13. 21
      config/install/field.storage.fedora_resource.field_description.yml
  14. 11
      config/install/field.storage.fedora_resource.field_memberof.yml
  15. 23
      config/install/field.storage.fedora_resource.field_tn.yml
  16. 26
      config/install/field.storage.media.field_file.yml
  17. 23
      config/install/field.storage.media.field_height.yml
  18. 2
      config/install/field.storage.media.field_image.yml
  19. 24
      config/install/field.storage.media.field_mimetype.yml
  20. 23
      config/install/field.storage.media.field_width.yml
  21. 11
      config/install/islandora.fedora_resource_type.non_rdf_source.yml
  22. 11
      config/install/islandora.fedora_resource_type.rdf_source.yml
  23. 22
      config/install/media_entity.bundle.tn.yml
  24. 47
      config/install/rdf.mapping.fedora_resource_type.non_rdf_source.yml
  25. 37
      config/install/rdf.mapping.media.tn.yml
  26. 12
      config/install/rest.resource.entity.fedora_resource.yml
  27. 24
      config/install/rest.resource.entity.media.yml
  28. 53
      config/install/rules.reaction.broadcast_media_create_event.yml
  29. 53
      config/install/rules.reaction.broadcast_media_delete_event.yml
  30. 53
      config/install/rules.reaction.broadcast_media_update_event.yml
  31. 216
      config/install/views.view.membership_view.yml
  32. 2
      islandora.info.yml
  33. 1
      islandora.module
  34. 20
      src/Entity/FedoraResource.php
  35. 24
      src/Tests/Web/JsonldContextGeneratorWebTest.php

66
config/install/core.entity_form_display.fedora_resource.rdf_source.default.yml

@ -1,66 +0,0 @@
uuid: ab918e50-21f9-42b3-b490-42fee6177162
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
config:
- field.field.fedora_resource.rdf_source.field_ldp_contains
- islandora.fedora_resource_type.rdf_source
_core:
default_config_hash: jDTpzFJD_PoXr0W008d5FvJV65oGCh89KANvALcy_O4
id: fedora_resource.rdf_source.default
targetEntityType: fedora_resource
bundle: rdf_source
mode: default
content:
fedora_has_parent:
type: entity_reference_autocomplete
weight: 2
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
third_party_settings: { }
field_ldp_contains:
type: entity_reference_autocomplete
weight: 3
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
third_party_settings: { }
langcode:
type: language_select
weight: 4
settings: { }
third_party_settings: { }
name:
type: string_textfield
weight: 0
settings:
size: 60
placeholder: ''
third_party_settings: { }
promote:
type: boolean_checkbox
settings:
display_label: true
weight: 5
third_party_settings: { }
sticky:
type: boolean_checkbox
settings:
display_label: true
weight: 6
third_party_settings: { }
user_id:
type: entity_reference_autocomplete
weight: 1
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
third_party_settings: { }
hidden: { }

41
config/install/core.entity_form_display.media.tn.default.yml

@ -0,0 +1,41 @@
uuid: 9a8e59ea-6372-4dd8-8643-4afcaa583185
langcode: en
status: true
dependencies:
config:
- field.field.media.tn.field_height
- field.field.media.tn.field_image
- field.field.media.tn.field_mimetype
- field.field.media.tn.field_width
- image.style.thumbnail
- media_entity.bundle.tn
enforced:
module:
- islandora
module:
- image
id: media.tn.default
targetEntityType: media
bundle: tn
mode: default
content:
field_image:
weight: 1
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
type: image_image
name:
type: string_textfield
weight: 0
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
field_height: true
field_mimetype: true
field_width: true
uid: true

36
config/install/core.entity_form_display.media.tn.inline.yml

@ -0,0 +1,36 @@
uuid: 7102e88a-f6ea-40db-9bbc-9ac31b1f99a3
langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.media.inline
- field.field.media.tn.field_height
- field.field.media.tn.field_image
- field.field.media.tn.field_mimetype
- field.field.media.tn.field_width
- image.style.thumbnail
- media_entity.bundle.tn
enforced:
module:
- islandora
module:
- image
id: media.tn.inline
targetEntityType: media
bundle: tn
mode: inline
content:
field_image:
weight: 0
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
type: image_image
hidden:
created: true
field_height: true
field_mimetype: true
field_width: true
name: true
uid: true

13
config/install/core.entity_form_mode.media.inline.yml

@ -0,0 +1,13 @@
uuid: 2cea66e8-8a46-4292-906c-24d85f6b8c04
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
module:
- media_entity
id: media.inline
label: Inline
targetEntityType: media
cache: true

37
config/install/core.entity_view_display.media.tn.content.yml

@ -0,0 +1,37 @@
uuid: cf7d61f8-9098-49c7-a46f-0f6d26692c0e
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.content
- field.field.media.tn.field_height
- field.field.media.tn.field_image
- field.field.media.tn.field_mimetype
- field.field.media.tn.field_width
- media_entity.bundle.tn
enforced:
module:
- islandora
module:
- image
id: media.tn.content
targetEntityType: media
bundle: tn
mode: content
content:
field_image:
weight: 0
label: above
settings:
image_style: ''
image_link: ''
third_party_settings: { }
type: image
hidden:
created: true
field_height: true
field_mimetype: true
field_width: true
name: true
thumbnail: true
uid: true

76
config/install/core.entity_view_display.media.tn.default.yml

@ -0,0 +1,76 @@
uuid: dae6d069-ea8a-48eb-9d7f-44f10b38dff8
langcode: en
status: true
dependencies:
config:
- field.field.media.tn.field_height
- field.field.media.tn.field_image
- field.field.media.tn.field_mimetype
- field.field.media.tn.field_width
- media_entity.bundle.tn
enforced:
module:
- islandora
module:
- image
- user
id: media.tn.default
targetEntityType: media
bundle: tn
mode: default
content:
created:
label: hidden
type: timestamp
weight: 2
settings:
date_format: medium
custom_date_format: ''
timezone: ''
third_party_settings: { }
field_height:
weight: 6
label: above
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
type: number_integer
field_image:
weight: 3
label: above
settings:
image_style: ''
image_link: ''
third_party_settings: { }
type: image
field_mimetype:
weight: 4
label: above
settings:
link_to_entity: false
third_party_settings: { }
type: string
field_width:
weight: 5
label: above
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
type: number_integer
name:
label: hidden
type: string
weight: 0
settings:
link_to_entity: false
third_party_settings: { }
uid:
label: hidden
type: author
weight: 1
settings: { }
third_party_settings: { }
hidden:
thumbnail: true

14
config/install/core.entity_view_mode.media.content.yml

@ -0,0 +1,14 @@
uuid: 72d426d5-5788-4a12-828b-31d7176e9e30
langcode: en
status: true
dependencies:
module:
- media_entity
- islandora
enforced:
module:
- islandora
id: media.content
label: Content
targetEntityType: media
cache: true

30
config/install/field.field.fedora_resource.rdf_source.field_ldp_contains.yml

@ -1,30 +0,0 @@
uuid: 29ea11d1-4267-4bc1-bdc0-550e58833c0b
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
config:
- field.storage.fedora_resource.field_ldp_contains
- islandora.fedora_resource_type.rdf_source
_core:
default_config_hash: y-E4uXZywn0AAVWULpj46kKRevLvEFQup5pLJ2J9jsk
id: fedora_resource.rdf_source.field_ldp_contains
field_name: field_ldp_contains
entity_type: fedora_resource
bundle: rdf_source
label: 'ldp:contains'
description: 'Contains Fedora Resource.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: views
handler_settings:
view:
view_name: fedora_entities_reference
display_name: entity_reference_1
arguments: { }
field_type: entity_reference

23
config/install/field.field.media.tn.field_height.yml

@ -0,0 +1,23 @@
uuid: 64ecf3f3-8aad-4794-a9cc-ea2320885fea
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_height
- media_entity.bundle.tn
id: media.tn.field_height
field_name: field_height
entity_type: media
bundle: tn
label: Height
description: 'Thumbnail height'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: ''
suffix: ''
field_type: integer

41
config/install/field.field.media.tn.field_image.yml

@ -0,0 +1,41 @@
uuid: 3e86756e-0782-4514-86f8-97d26ec6985d
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_image
- media_entity.bundle.tn
enforced:
module:
- islandora
module:
- image
id: media.tn.field_image
field_name: field_image
entity_type: media
bundle: tn
label: Image
description: 'Thumbnail contents'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: true
title_field: false
title_field_required: false
default_image:
uuid: ''
alt: ''
title: ''
width: null
height: null
handler: 'default:file'
handler_settings: { }
field_type: image

22
config/install/field.field.media.tn.field_mimetype.yml

@ -0,0 +1,22 @@
uuid: dd6d11c2-912c-49c4-a88b-66263a800727
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_mimetype
- media_entity.bundle.tn
enforced:
module:
- islandora
id: media.tn.field_mimetype
field_name: field_mimetype
entity_type: media
bundle: tn
label: Mimetype
description: 'Thumbnail mimetype'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: string

26
config/install/field.field.media.tn.field_width.yml

@ -0,0 +1,26 @@
uuid: 1f18aa08-5384-4880-892d-947eb1c3b457
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_width
- media_entity.bundle.tn
enforced:
module:
- islandora
id: media.tn.field_width
field_name: field_width
entity_type: media
bundle: tn
label: Width
description: 'Thumbnail width'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: ''
suffix: ''
field_type: integer

21
config/install/field.storage.fedora_resource.field_description.yml

@ -0,0 +1,21 @@
langcode: en
status: true
dependencies:
module:
- islandora
enforced:
module:
- islandora
id: fedora_resource.field_description
field_name: field_description
entity_type: fedora_resource
type: string_long
settings:
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

11
config/install/field.storage.fedora_resource.field_ldp_contains.yml → config/install/field.storage.fedora_resource.field_memberof.yml

@ -1,21 +1,20 @@
uuid: d40c0b76-1a6d-4dd2-8f0b-2945e30d2832
langcode: en
status: true
dependencies:
module:
- islandora
enforced:
module:
- islandora
_core:
default_config_hash: jkwDP8hekY3eWzIrEN4yinGftfXZlArUaz7PsiU6BcM
id: fedora_resource.field_ldp_contains
field_name: field_ldp_contains
id: fedora_resource.field_memberof
field_name: field_memberof
entity_type: fedora_resource
type: entity_reference
settings:
target_type: fedora_resource
module: core
locked: false
cardinality: -1
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false

23
config/install/field.storage.fedora_resource.field_tn.yml

@ -0,0 +1,23 @@
uuid: 70d43fa1-2c63-42a7-86ca-9ccaa1d0ac6d
langcode: en
status: true
dependencies:
module:
- islandora
- media_entity
enforced:
module:
- islandora
id: fedora_resource.field_tn
field_name: field_tn
entity_type: fedora_resource
type: entity_reference
settings:
target_type: media
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

26
config/install/field.storage.media.field_file.yml

@ -0,0 +1,26 @@
uuid: 3187338b-84ab-4ad4-9396-0600ed7cc6d6
langcode: en
status: true
dependencies:
module:
- file
- media_entity
enforced:
module:
- islandora
id: media.field_file
field_name: field_file
entity_type: media
type: file
settings:
display_field: true
display_default: false
uri_scheme: public
target_type: file
module: file
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

23
config/install/field.storage.media.field_height.yml

@ -0,0 +1,23 @@
uuid: 68e445be-834e-4a03-b5f3-46e4d3214660
langcode: en
status: true
dependencies:
module:
- media_entity
enforced:
module:
- islandora
id: media.field_height
field_name: field_height
entity_type: media
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

2
config/install/field.storage.media.field_image.yml

@ -9,6 +9,8 @@ dependencies:
- file
- image
- media_entity
_core:
default_config_hash: MX6T38DOi1q6LSZEP_PsH6mWEBZv-ncKCgfYVjQDvlY
id: media.field_image
field_name: field_image
entity_type: media

24
config/install/field.storage.media.field_mimetype.yml

@ -0,0 +1,24 @@
uuid: ac5aa8aa-4672-498c-b814-2e4d477b8a75
langcode: en
status: true
dependencies:
module:
- media_entity
enforced:
module:
- islandora
id: media.field_mimetype
field_name: field_mimetype
entity_type: media
type: string
settings:
max_length: 255
is_ascii: false
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

23
config/install/field.storage.media.field_width.yml

@ -0,0 +1,23 @@
uuid: 3d8f21ae-673c-4569-b7be-6352068e5fcb
langcode: en
status: true
dependencies:
module:
- media_entity
enforced:
module:
- islandora
id: media.field_width
field_name: field_width
entity_type: media
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

11
config/install/islandora.fedora_resource_type.non_rdf_source.yml

@ -1,11 +0,0 @@
uuid: 68d5a1cb-e493-4e9d-adad-21229a41ac68
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
_core:
default_config_hash: KgkkNCMXV1urHhxyo7wuwYPWaEAnyLAXvwrRnZWDmtw
id: non_rdf_source
label: 'Non RDF Source'

11
config/install/islandora.fedora_resource_type.rdf_source.yml

@ -1,11 +0,0 @@
uuid: af1cb3d8-2c1f-4ca1-a1c2-b1173704807f
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
_core:
default_config_hash: 61Pa7qgwWd8HBTCgoxF3RxTsvCBcmHNhfg5k8FPqEpQ
id: rdf_source
label: 'RDF Source'

22
config/install/media_entity.bundle.tn.yml

@ -0,0 +1,22 @@
uuid: 76912590-fe79-472d-9025-3538a6dfb5cb
langcode: en
status: true
dependencies:
module:
- media_entity_image
enforced:
module:
- islandora
id: tn
label: TN
description: 'Thumbnail image file'
type: image
queue_thumbnail_downloads: false
new_revision: false
type_configuration:
source_field: field_image
gather_exif: false
field_map:
mime: field_mimetype
width: field_width
height: field_height

47
config/install/rdf.mapping.fedora_resource_type.non_rdf_source.yml

@ -1,47 +0,0 @@
uuid: 58d7388f-c602-4a03-9c63-aed54b8d2b7e
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
config:
- islandora.fedora_resource_type.non_rdf_source
_core:
default_config_hash: HoZxZHzZDjK45CfvxQaCJCn6eqr9Ve2FxcqtLlYf-RI
id: fedora_resource.non_rdf_source
targetEntityType: fedora_resource
bundle: non_rdf_source
types:
- 'schema:Thing'
- 'ldp:NonRDFSource'
fieldMappings:
name:
properties:
- 'dc11:title'
- 'rdf:label'
created:
properties:
- 'schema:dateCreated'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
changed:
properties:
- 'schema:dateModified'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
rdf_type:
properties:
- 'rdf:type'
user_id:
properties:
- 'schema:author'
mapping_type: rel
fedora_has_parent:
properties:
- 'fedora:hasParent'
mapping_type: rel
ldp_contains:
properties:
- 'ldp:contains'
mapping_type: rel

37
config/install/rdf.mapping.fedora_resource_type.rdf_source.yml → config/install/rdf.mapping.media.tn.yml

@ -2,25 +2,29 @@ uuid: 77e9e71f-f67f-438f-80eb-bb5fa931a5ec
langcode: en
status: true
dependencies:
config:
- media_entity.bundle.tn
enforced:
module:
- islandora
config:
- islandora.fedora_resource_type.rdf_source
module:
- media_entity
_core:
default_config_hash: SXB_6Qvx5WtM-zrkkgEOjok1YGMeyjn9Zsa7ymV2MbM
id: fedora_resource.rdf_source
targetEntityType: fedora_resource
bundle: rdf_source
default_config_hash: 6L5MoXE-kIJb53NSl9cSQBFoyZNG1DWL8CFOSV60yMk
id: media.tn
targetEntityType: media
bundle: tn
types:
- 'schema:Thing'
- 'ldp:RDFSource'
- 'ldp:Container'
- 'use:ThumbnailImage'
fieldMappings:
name:
properties:
- 'dc11:title'
- 'dc:title'
- 'rdf:label'
field_image:
properties:
- 'iana:describes'
mapping_type: rel
created:
properties:
- 'schema:dateCreated'
@ -31,18 +35,7 @@ fieldMappings:
- 'schema:dateModified'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
rdf_type:
properties:
- 'rdf:type'
user_id:
uid:
properties:
- 'schema:author'
mapping_type: rel
fedora_has_parent:
properties:
- 'fedora:hasParent'
mapping_type: rel
ldp_contains:
properties:
- 'ldp:contains'
mapping_type: rel

12
config/install/rest.resource.entity.fedora_resource.yml

@ -2,15 +2,17 @@ uuid: f29f59d6-ed21-46cf-84e2-42141255b0de
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
module:
- basic_auth
- islandora
- jsonld
- jwt
- serialization
- user
enforced:
module:
- islandora
_core:
default_config_hash: ByaS2KNrlkozt1uLxjOhK6_GNxwV3iIhvXHNqdMZGo8
id: entity.fedora_resource
plugin_id: 'entity:fedora_resource'
granularity: method
@ -19,6 +21,6 @@ configuration:
supported_formats:
- jsonld
- json
- xml
supported_auth:
- jwt_auth
- cookie

24
config/install/rest.resource.entity.media.yml

@ -0,0 +1,24 @@
uuid: 08836232-8f53-422b-97bd-4394a9660480
langcode: en
status: true
dependencies:
module:
- jsonld
- jwt
- media_entity
- serialization
- user
enforced:
module:
- islandora
id: entity.media
plugin_id: 'entity:media'
granularity: method
configuration:
GET:
supported_formats:
- jsonld
- json
supported_auth:
- jwt_auth
- cookie

53
config/install/rules.reaction.broadcast_media_create_event.yml

@ -0,0 +1,53 @@
uuid: c4447a0b-a2a8-4f32-947b-fbe1094632d5
langcode: en
status: true
dependencies:
module:
- islandora
- rules
enforced:
module:
- islandora
id: broadcast_media_create_event
label: 'Broadcast Media Create Event'
events:
-
event_name: 'rules_entity_insert:media'
description: 'Broadcasts a ''Create'' event when a user creates a new Media.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 3294a215-25d9-4bfe-9e84-745f381107c5
conditions:
id: rules_and
uuid: 6dbe3930-7d39-4927-890e-4af4e8fb57fc
conditions: { }
actions:
id: rules_action_set
uuid: 470ed84d-b33f-4ff4-a584-481605bc826c
actions:
-
id: rules_action
uuid: 59b35164-5e52-4664-afe1-86e8f3bda01d
context_values: { }
context_mapping:
entity: media
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_create_event_generator
-
id: rules_action
uuid: f7880d70-1411-4c60-a065-a7d187b604db
context_values:
recipients:
- 'activemq:queue:islandora-indexing-triplestore'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast

53
config/install/rules.reaction.broadcast_media_delete_event.yml

@ -0,0 +1,53 @@
uuid: 33b8afa6-1507-4f04-acc9-5a18ca2b0ccc
langcode: en
status: true
dependencies:
module:
- islandora
- rules
enforced:
module:
- islandora
id: broadcast_media_delete_event
label: 'Broadcast Media Delete Event'
events:
-
event_name: 'rules_entity_delete:media'
description: 'Broadcasts a ''Delete'' event when a user deletes a Media.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 40abb71f-da16-49c3-8646-19921e911b7e
conditions:
id: rules_and
uuid: 34e4e2d6-f6be-4644-ba30-b434b7f2f82b
conditions: { }
actions:
id: rules_action_set
uuid: 4032fcca-f4ab-471e-afa0-f53e2148848d
actions:
-
id: rules_action
uuid: 8d9547b4-477d-4442-b8b6-2d677cf79d1d
context_values: { }
context_mapping:
entity: media
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_delete_event_generator
-
id: rules_action
uuid: 371b1104-1aa6-4b3d-82cf-e27168e664ae
context_values:
recipients:
- 'activemq:queue:islandora-indexing-triplestore'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast

53
config/install/rules.reaction.broadcast_media_update_event.yml

@ -0,0 +1,53 @@
uuid: d58d3327-38d2-400b-91a0-3b00b3870121
langcode: en
status: true
dependencies:
module:
- islandora
- rules
enforced:
module:
- islandora
id: broadcast_media_update_event
label: 'Broadcast Media Update Event'
events:
-
event_name: 'rules_entity_update:media'
description: 'Broadcasts an ''Update'' event when a user updates a Media.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 9974766d-92df-4d92-9ba4-e5ae5dce02fd
conditions:
id: rules_and
uuid: faf52a5f-beba-4b09-ac0a-f19f0d23cc52
conditions: { }
actions:
id: rules_action_set
uuid: 7e0df904-755c-4c89-899b-9bb6212d5c6e
actions:
-
id: rules_action
uuid: bd3da549-41b5-4d92-9dbd-6dee9d35fadd
context_values: { }
context_mapping:
entity: media
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_update_event_generator
-
id: rules_action
uuid: 6aa1f15c-3a39-4af5-b577-81fa7081de62
context_values:
recipients:
- 'activemq:queue:islandora-indexing-triplestore'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast

216
config/install/views.view.membership_view.yml

@ -0,0 +1,216 @@
uuid: 84f7671f-475f-4b91-98d5-42182389414c
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.fedora_resource.teaser
enforced:
module:
- islandora
module:
- islandora
- user
_core:
default_config_hash: he4YnarZrhrqUnqtFXImn2pESaJQdTTWmFPyapSRwoM
id: membership_view
label: 'Membership View'
module: views
description: 'Displays a list of member resources'
tag: ''
base_table: fedora_resource_field_data
base_field: id
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'view published fedora resource entities'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: default
options:
row_class: ''
default_row_class: true
uses_fields: false
row:
type: 'entity:fedora_resource'
options:
relationship: none
view_mode: teaser
fields:
name:
id: name
table: fedora_resource_field_data
field: name
entity_type: fedora_resource
entity_field: name
label: ''
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
html: false
hide_empty: false
empty_zero: false
settings:
link_to_entity: true
plugin_id: field
relationship: none
group_type: group
admin_label: ''
exclude: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_alter_empty: true
click_sort_column: value
type: string
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
filters: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
field_memberof_target_id:
id: field_memberof_target_id
table: fedora_resource__field_memberof
field: field_memberof_target_id
relationship: none
group_type: group
admin_label: ''
default_action: empty
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
plugin_id: numeric
display_extenders: { }
title: Members
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user.permissions
tags: { }
page:
display_plugin: page
id: page
display_title: Members
position: 2
display_options:
display_extenders: { }
path: fedora_resource/%fedora_resource/members
menu:
type: tab
title: Members
description: 'A list of members of this resource'
expanded: false
parent: ''
weight: -1
context: '0'
menu_name: main
tab_options:
type: none
title: ''
description: ''
weight: 0
display_description: 'Members of {{ name }}'
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user.permissions
tags: { }

2
islandora.info.yml

@ -1,7 +1,7 @@
# This .info.yml files provides the basic information about our module to Drupal
# More: https://www.drupal.org/node/2000204
name: 'islandora'
description: "Drupal 8 islandora claw playground"
description: "Islandora Core"
type: module
package: islandora
core: 8.x

1
islandora.module

@ -84,6 +84,7 @@ function islandora_rdf_namespaces() {
'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
'islandora' => 'http://islandora.ca/CLAW/',
'pcdm' => 'http://pcdm.org/models#',
'use' => 'http://pcdm.org/use#',
];
}

20
src/Entity/FedoraResource.php

@ -345,6 +345,7 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
// Removing from form and display until we get behaviour sorted out.
$fields['fedora_has_parent'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Fedora has Parent'))
->setDescription(t('Parent Fedora Resource.'))
@ -353,23 +354,8 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac
->setSetting('handler', 'default')
->setDefaultValueCallback('\Drupal\islandora\Entity\FedoraResource::getFedoraRoot')
->setTranslatable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'settings' => [
'match_operator' => 'CONTAINS',
'size' => '60',
'autocomplete_type' => 'tags',
'placeholder' => '',
],
])
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
->setDisplayConfigurable('form', FALSE)
->setDisplayConfigurable('view', FALSE);
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))

24
src/Tests/Web/JsonldContextGeneratorWebTest.php

@ -3,6 +3,8 @@
namespace Drupal\islandora\Tests\Web;
use Drupal\Core\Url;
use Drupal\islandora\Entity\FedoraResourceType;
use Drupal\rdf\Entity\RdfMapping;
/**
* Implements WEB tests for Context routing response in various scenarios.
@ -30,6 +32,28 @@ class JsonldContextGeneratorWebTest extends IslandoraWebTestBase {
*/
public function setUp() {
parent::setUp();
// Create a bundle to test.
$rdf_source = FedoraResourceType::create([
'id' => 'rdf_source',
'label' => 'RdfSource',
]);
$rdf_source->save();
// Give it a basic rdf mapping.
$rdf_source_mapping = RdfMapping::create([
'id' => 'fedora_resourcce.rdf_source',
'targetEntityType' => 'fedora_resource',
'bundle' => 'rdf_source',
'types' => ['schema:Thing'],
'fieldMappings' => [
'name' => [
'properties' => ['dc11:title'],
],
],
]);
$rdf_source_mapping->save();
$this->user = $this->drupalCreateUser([
'administer site configuration',
'view published fedora resource entities',

Loading…
Cancel
Save