Browse Source

Issue 430 (#13)

* Add a Collection bundle for FedoraResource

* update rdf mapping

* field type changes, add enforced module
pull/756/head
Natkeeran 8 years ago committed by dannylamb
parent
commit
d233f40650
  1. 14
      islandora_collection/composer.json
  2. 25
      islandora_collection/config/install/field.field.fedora_resource.collection.field_description.yml
  3. 30
      islandora_collection/config/install/field.field.fedora_resource.collection.field_memberof.yml
  4. 21
      islandora_collection/config/install/field.storage.fedora_resource.field_description.yml
  5. 22
      islandora_collection/config/install/field.storage.fedora_resource.field_memberof.yml
  6. 9
      islandora_collection/config/install/islandora.fedora_resource_type.collection.yml
  7. 47
      islandora_collection/config/install/rdf.mapping.fedora_resource_type.collection.yml
  8. 5
      islandora_collection/islandora_collection.info.yml
  9. 24
      islandora_collection/islandora_collection.module

14
islandora_collection/composer.json

@ -0,0 +1,14 @@
{
"name": "drupal/islandora_collection",
"type": "drupal-module",
"description": "Islandora Collection",
"keywords": ["Drupal"],
"license": "GPL-2.0+",
"homepage": "https://www.drupal.org/project/islandora_collection",
"minimum-stability": "dev",
"support": {
"issues": "http://drupal.org/project/issues/islandora_collection",
"source": "http://cgit.drupalcode.org/islandora_collection"
},
"require": { }
}

25
islandora_collection/config/install/field.field.fedora_resource.collection.field_description.yml

@ -0,0 +1,25 @@
langcode: en
status: true
dependencies:
config:
- field.storage.fedora_resource.field_description
- islandora.fedora_resource_type.collection
enforced:
module:
- islandora_collection
module:
- text
id: fedora_resource.collection.field_description
field_name: field_description
entity_type: fedora_resource
bundle: collection
label: description
description: 'Description about the collection'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
display_summary: false
field_type: text_with_summary

30
islandora_collection/config/install/field.field.fedora_resource.collection.field_memberof.yml

@ -0,0 +1,30 @@
langcode: en
status: true
dependencies:
config:
- field.storage.fedora_resource.field_memberof
- islandora.fedora_resource_type.collection
enforced:
module:
- islandora_collection
id: fedora_resource.collection5.field_memberof
field_name: field_memberof
entity_type: fedora_resource
bundle: collection
label: memberOf
description: 'Other collections or bundles this collection is member of.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:fedora_resource'
handler_settings:
target_bundles:
collection: collection
sort:
field: _none
auto_create: false
auto_create_bundle: ''
field_type: entity_reference

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

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

22
islandora_collection/config/install/field.storage.fedora_resource.field_memberof.yml

@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
module:
- islandora
enforced:
module:
- islandora_collection
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
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

9
islandora_collection/config/install/islandora.fedora_resource_type.collection.yml

@ -0,0 +1,9 @@
langcode: en
status: true
dependencies:
enforced:
module:
- islandora_collection
id: collection
label: Collection
description: 'Islandora Collection'

47
islandora_collection/config/install/rdf.mapping.fedora_resource_type.collection.yml

@ -0,0 +1,47 @@
langcode: en
status: true
dependencies:
config:
- islandora.fedora_resource_type.collection
module:
- islandora
enforced:
module:
- islandora_collection
id: fedora_resource.collection
targetEntityType: fedora_resource
bundle: collection
types:
- 'schema:Thing'
- 'ldp:RDFSource'
- 'ldp:Container'
fieldMappings:
field_description:
properties:
- 'dc:description'
field_memberof:
properties:
- 'dc:isPartOf'
name:
properties:
- 'dc:title'
- 'rdf:label'
created:
properties:
- 'schema:dateCreated'
- 'dc:created'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
changed:
properties:
- 'schema:dateModified'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
rdf_type:
properties:
- 'rdf:type'
uid:
properties:
- 'schema:author'
mapping_type: rel

5
islandora_collection/islandora_collection.info.yml

@ -0,0 +1,5 @@
name: islandora_collection
type: module
description: Islandora Collection
core: 8.x
package: islandora

24
islandora_collection/islandora_collection.module

@ -0,0 +1,24 @@
<?php
/**
* @file
* Contains islandora_collection.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function islandora_collection_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the islandora_collection module.
case 'help.page.islandora_collection':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Islandora Collection') . '</p>';
return $output;
default:
}
}
Loading…
Cancel
Save