forked from btmash/islandora_entity_bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
islandora_entity_bridge.install
65 lines (61 loc) · 1.62 KB
/
islandora_entity_bridge.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* @file
* Install file for the Islandora Entity Bridge.
*/
/**
* Implements hook_schema().
*/
function islandora_entity_bridge_schema() {
$schema = array();
$schema['islandora_entity_bridge_mapping'] = array(
'description' => 'Mapping Serial ID to Islandora ID',
'fields' => array(
'iebid' => array(
'description' => 'The primary Drupal identifier for an Islandora Entity.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pid' => array(
'description' => 'The primary Fedora object identifier for an Islandora Entity.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'type' => array(
'description' => 'The content model type of this Fedora object.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
'label' => array(
'description' => 'The label of this Fedora object.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'state' => array(
'description' => 'XML indicating whether the object is published, inactive, or deleted.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
),
'indexes' => array('state' => array('state'), 'type' => array('type')),
'unique keys' => array(
'pid' => array('pid'),
),
'primary key' => array('iebid'),
);
return $schema;
}
/*
* ALL OBJECTS WITH STATUS
SELECT ?object ?title ?state
FROM <#ri>
WHERE {
?object <fedora-model:label> ?title .
?object <fedora-model:state> ?state
}
*/