Drupal modules for browsing and managing Fedora-based digital repositories.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.4 KiB

JSON-LD Context generator (#33) * JSON-LD Context generator Base pull, service, interface and class. Needs testing. DCS should be solved already * Missing an @ * Wrong Cache backend service injected * make sure the bundle has mapping * Testing routes to make debugging easier * phpstorm, leave my indentation alone! * phpcs for test controller * Changes, lots of them * Exceptions thrown all around (and documented * “Try/Catch” where relevant * Logger channel for ISLANDORA, useful for all CLAW * Exceptions are being cached * Naive field types of json-ld term definitions for context. Kinda poor mans rdf map for fields * Docs, docs. * Route Controller now responds with application/ld+json, means don’t wait for HTML! * Concerns addressed TODO: need new tests. * Web tests! Don’t run via UI (buggy) https://www.drupal.org/node/2745123 Do this ```Shell sudo -u www-data php core/scripts/run-tests.sh --verbose --class "Drupal\islandora\Tests\Web\JsonldContextGeneratorWebTest" ``` * Coding standards * Coding standards and Cache Now caching happens on the response and on the method. Best of both worlds. ```Shell curl -i http://localhost:8000/fedora_resource_context/rdf_source HTTP/1.1 200 OK Date: Tue, 21 Mar 2017 19:19:03 GMT Server: Apache/2.4.18 (Ubuntu) Cache-Control: must-revalidate, no-cache, private X-Powered-By: Islandora CLAW API X-Drupal-Dynamic-Cache: MISS X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 8 (https://www.drupal.org) X-Debug-Token: 7d33c2 X-Debug-Token-Link: /admin/reports/profiler/view/7d33c2 X-Drupal-Cache: HIT Content-Length: 229 Content-Type: application/ld+json {"@context":{"schema":"http://schema.org/","schema:dateModified":{"@type ":"xsd:dateTime"},"schema:dateCreated":{"@type":"xsd:dateTime"},"fedora" :"http://fedora.info/definitions/v4/repository#","fedora:hasParent":{"@t ype":"@id"}}} ```` and after cache clear (or changing user permissions or even an entity type def associated to the requested rdfmapping) ```Shell HTTP/1.1 200 OK Date: Tue, 21 Mar 2017 19:20:49 GMT Server: Apache/2.4.18 (Ubuntu) Cache-Control: must-revalidate, no-cache, private X-Powered-By: Islandora CLAW API X-Drupal-Dynamic-Cache: MISS X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 8 (https://www.drupal.org) X-Debug-Token: acc399 X-Debug-Token-Link: /admin/reports/profiler/view/acc399 X-Drupal-Cache: MISS Content-Length: 229 Content-Type: application/ld+json ```` * Short notion array.. should be named “bracket structure…” * We should run tests on our own server... * lets try with 127.0.0.1 * testing travis changes (#1) * fixes not working Drupal/drush integration on Travis-CI * Kernel tests * 400 is 1 less than 401 * restore notifications * Fixes type in TODO * Jared rocks * Debug statement not needed Was not outputting anyway * Namespace change Addressing @dhlamb namespace change
8 years ago
# Menu list of Islandora configuration forms
system.admin_config_islandora:
path: '/admin/config/islandora'
defaults:
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
_title: 'Islandora'
requirements:
_permission: 'access administration pages'
# Core Islandora configuration form
system.islandora_settings:
path: '/admin/config/islandora/core'
defaults:
_form: '\Drupal\islandora\Form\IslandoraSettingsForm'
_title: 'Islandora Settings'
requirements:
_permission: 'administer site configuration'
JSON-LD Context generator (#33) * JSON-LD Context generator Base pull, service, interface and class. Needs testing. DCS should be solved already * Missing an @ * Wrong Cache backend service injected * make sure the bundle has mapping * Testing routes to make debugging easier * phpstorm, leave my indentation alone! * phpcs for test controller * Changes, lots of them * Exceptions thrown all around (and documented * “Try/Catch” where relevant * Logger channel for ISLANDORA, useful for all CLAW * Exceptions are being cached * Naive field types of json-ld term definitions for context. Kinda poor mans rdf map for fields * Docs, docs. * Route Controller now responds with application/ld+json, means don’t wait for HTML! * Concerns addressed TODO: need new tests. * Web tests! Don’t run via UI (buggy) https://www.drupal.org/node/2745123 Do this ```Shell sudo -u www-data php core/scripts/run-tests.sh --verbose --class "Drupal\islandora\Tests\Web\JsonldContextGeneratorWebTest" ``` * Coding standards * Coding standards and Cache Now caching happens on the response and on the method. Best of both worlds. ```Shell curl -i http://localhost:8000/fedora_resource_context/rdf_source HTTP/1.1 200 OK Date: Tue, 21 Mar 2017 19:19:03 GMT Server: Apache/2.4.18 (Ubuntu) Cache-Control: must-revalidate, no-cache, private X-Powered-By: Islandora CLAW API X-Drupal-Dynamic-Cache: MISS X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 8 (https://www.drupal.org) X-Debug-Token: 7d33c2 X-Debug-Token-Link: /admin/reports/profiler/view/7d33c2 X-Drupal-Cache: HIT Content-Length: 229 Content-Type: application/ld+json {"@context":{"schema":"http://schema.org/","schema:dateModified":{"@type ":"xsd:dateTime"},"schema:dateCreated":{"@type":"xsd:dateTime"},"fedora" :"http://fedora.info/definitions/v4/repository#","fedora:hasParent":{"@t ype":"@id"}}} ```` and after cache clear (or changing user permissions or even an entity type def associated to the requested rdfmapping) ```Shell HTTP/1.1 200 OK Date: Tue, 21 Mar 2017 19:20:49 GMT Server: Apache/2.4.18 (Ubuntu) Cache-Control: must-revalidate, no-cache, private X-Powered-By: Islandora CLAW API X-Drupal-Dynamic-Cache: MISS X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 8 (https://www.drupal.org) X-Debug-Token: acc399 X-Debug-Token-Link: /admin/reports/profiler/view/acc399 X-Drupal-Cache: MISS Content-Length: 229 Content-Type: application/ld+json ```` * Short notion array.. should be named “bracket structure…” * We should run tests on our own server... * lets try with 127.0.0.1 * testing travis changes (#1) * fixes not working Drupal/drush integration on Travis-CI * Kernel tests * 400 is 1 less than 401 * restore notifications * Fixes type in TODO * Jared rocks * Debug statement not needed Was not outputting anyway * Namespace change Addressing @dhlamb namespace change
8 years ago
# RDF properties report
system.islandora_rdf_mappings:
path: '/admin/reports/islandora/rdf_mappings'
defaults:
_controller: '\Drupal\islandora\Controller\RdfMappingsReportController::main'
_title: 'Field and term RDF mappings'
requirements:
_permission: 'administer site configuration'
islandora.add_member_to_node_page:
path: '/node/{node}/members/add'
defaults:
_controller: '\Drupal\islandora\Controller\ManageMembersController::addToNodePage'
_title_callback: '\Drupal\islandora\Controller\ManageMembersController::addTitle'
entity_type_id: node
options:
_admin_route: 'true'
requirements:
_entity_create_any_access: 'node'
islandora.upload_children:
path: '/node/{node}/members/upload'
defaults:
_form: '\Drupal\islandora\Form\AddChildrenForm'
_title: 'Upload Children'
options:
_admin_route: 'TRUE'
requirements:
_access: 'TRUE'
#_permssion: 'create node,create media'
islandora.add_media_to_node_page:
path: '/node/{node}/media/add'
defaults:
_controller: '\Drupal\islandora\Controller\ManageMediaController::addToNodePage'
_title_callback: '\Drupal\islandora\Controller\ManageMediaController::addTitle'
entity_type_id: media
options:
_admin_route: 'true'
requirements:
_entity_create_any_access: 'media'
islandora.upload_media:
path: '/node/{node}/media/upload'
defaults:
_form: '\Drupal\islandora\Form\AddMediaForm'
_title: 'Add media'
options:
_admin_route: 'TRUE'
requirements:
_custom_access: '\Drupal\islandora\Form\AddMediaForm::access'
islandora.media_source_update:
path: '/media/{media}/source'
defaults:
_controller: '\Drupal\islandora\Controller\MediaSourceController::put'
methods: [PUT]
requirements:
_permission: 'update media'
options:
_auth: ['basic_auth', 'cookie', 'jwt_auth']
islandora.media_source_put_to_node:
path: '/node/{node}/media/{media_type}/{taxonomy_term}'
defaults:
_controller: '\Drupal\islandora\Controller\MediaSourceController::putToNode'
methods: [PUT]
requirements:
_custom_access: '\Drupal\islandora\Controller\MediaSourceController::putToNodeAccess'
options:
_auth: ['basic_auth', 'cookie', 'jwt_auth']
islandora.attach_file_to_media:
path: '/media/add_derivative/{media}/{destination_field}'
defaults:
_controller: '\Drupal\islandora\Controller\MediaSourceController::attachToMedia'
methods: [GET, PUT]
requirements:
_custom_access: '\Drupal\islandora\Controller\MediaSourceController::attachToMediaAccess'
options:
_auth: ['basic_auth', 'cookie', 'jwt_auth']
no_cache: 'TRUE'
parameters:
media:
type: entity:media
islandora.confirm_delete_media_and_file:
path: '/media/delete_with_files'
defaults:
_form: 'Drupal\islandora\Form\ConfirmDeleteMediaAndFile'
requirements:
4 years ago
_permission: 'administer media+delete any media'