diff --git a/islandora/include/fields.inc b/islandora/include/fields.inc index 61e32a49..a1a8b8e0 100644 --- a/islandora/include/fields.inc +++ b/islandora/include/fields.inc @@ -84,7 +84,7 @@ function islandora_add_field_to_bundle($bundle_name, $field_name, $field_label, * @param array $field_definition * Field definition for the desired field. */ -function islandora_create_field($field_definition) { +function islandora_create_field(array $field_definition) { // If this gets called from an install hook, we can't guarantee the t's // existance. $t = get_t(); diff --git a/islandora/include/rdf_mapping.inc b/islandora/include/rdf_mapping.inc index 2230ddc8..1def7777 100644 --- a/islandora/include/rdf_mapping.inc +++ b/islandora/include/rdf_mapping.inc @@ -16,7 +16,7 @@ * @return array * The default RDF mapping for Islandora content types. */ -function islandora_get_default_rdf_mapping($bundle, $rdf_types) { +function islandora_get_default_rdf_mapping($bundle, array $rdf_types) { $default_rdf_types = array( 'ldp:RDFSource', 'ldp:Container', diff --git a/islandora/islandora.api.php b/islandora/islandora.api.php new file mode 100644 index 00000000..6ffc9638 --- /dev/null +++ b/islandora/islandora.api.php @@ -0,0 +1,23 @@ + array( + 'id' => 'MODS', + 'mimetype' => 'application/xml', + ), + ); +} diff --git a/islandora/islandora.module b/islandora/islandora.module index 7fab8321..6c65c741 100644 --- a/islandora/islandora.module +++ b/islandora/islandora.module @@ -62,6 +62,7 @@ function islandora_entity_load($entities, $type) { foreach ($entities as $entity) { if (strcmp($type, "node") == 0) { $entity->rdf_namespaces = rdf_get_namespaces(); + $entity->pcdm_file_mapping = module_invoke_all("pcdm_file_mapping"); } } } diff --git a/islandora_collection/islandora_collection.module b/islandora_collection/islandora_collection.module index 1401291c..38542f21 100644 --- a/islandora_collection/islandora_collection.module +++ b/islandora_collection/islandora_collection.module @@ -55,7 +55,6 @@ function islandora_collection_rdf_mapping() { */ function islandora_collection_node_postinsert($node) { if (isset($_SERVER['HTTP_IGNORE_HOOKS']) && strcmp(strtolower($_SERVER['HTTP_IGNORE_HOOKS']), "true") == 0) { - dd("IGNORING HOOK!"); return; } @@ -78,16 +77,13 @@ function islandora_collection_node_postinsert($node) { 'data' => json_encode($node), )); $response = httprl_send_request(); - dd($response); } /** * Implements hook_update(). */ function islandora_collection_node_postupdate($node) { - dd("FROM POST UPDATE HOOK"); if (isset($_SERVER['HTTP_IGNORE_HOOKS']) && strcmp(strtolower($_SERVER['HTTP_IGNORE_HOOKS']), "true") == 0) { - dd("IGNORING HOOK!"); return; } } diff --git a/islandora_mods/islandora_mods.module b/islandora_mods/islandora_mods.module index ff9b53dd..4dd43bb0 100644 --- a/islandora_mods/islandora_mods.module +++ b/islandora_mods/islandora_mods.module @@ -10,6 +10,7 @@ define('ISLANDORA_MODS_NAMESPACE_PREFIX', 'mods'); define('ISLANDORA_MODS_RDF_NAMESPACE', 'http://www.loc.gov/mods/modsrdf/v1#'); define('ISLANDORA_MODS_RDF_NAMESPACE_PREFIX', 'modsrdf'); define('ISLANDORA_MODS_FIELD', 'field_mods'); +define('ISLANDORA_MODS_FILE_ID', 'MODS'); /** * Implements hook_rdf_namespaces(). @@ -19,3 +20,15 @@ function islandora_mods_rdf_namespaces() { ISLANDORA_MODS_RDF_NAMESPACE_PREFIX => ISLANDORA_MODS_RDF_NAMESPACE, ); } + +/** + * Implements hook_pcdm_file_mapping(). + */ +function islandora_mods_pcdm_file_mapping() { + return array( + ISLANDORA_MODS_FIELD => array( + 'id' => ISLANDORA_MODS_FILE_ID, + 'mimetype' => 'application/xml', + ), + ); +}