-
Notifications
You must be signed in to change notification settings - Fork 0
/
islandora_prepare_ingest.workflow_step.inc
201 lines (196 loc) · 6.35 KB
/
islandora_prepare_ingest.workflow_step.inc
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
/**
* @file
* Step info.
*
*
* Copyright 2017-2019 Leiden University Library
*
* This file is part of islandora_prepare_ingest.
*
* islandora_prepare_ingest is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Implements hook_workflow_step_info
*/
function islandora_prepare_ingest_workflow_step_info() {
$info = array();
$info['define_constant'] = array(
'name' => t('Define constant'),
'type group' => ' ' . t('Constants'),
'class name' => 'DefineConstantStep',
);
$info['read_file_names'] = array(
'name' => t('Add items by reading filenames'),
'type group' => t('Add items'),
'class name' => 'ReadFilenamesStep',
);
$info['add_key_template'] = array(
'name' => t('Add key with template based value'),
'type group' => t('Add key'),
'class name' => 'AddKeyTemplateStep',
);
$info['add_key_regexp'] = array(
'name' => t('Add key with regular expression based value'),
'type group' => t('Add key'),
'class name' => 'AddKeyRegExStep',
);
$info['add_key_counter'] = array(
'name' => t('Add key with counter value'),
'type group' => t('Add key'),
'class name' => 'AddKeyCounterStep',
);
$info['extract_keys_template'] = array(
'name' => t('Add key(s) by extracting values'),
'type group' => t('Add key'),
'class name' => 'AddKeysByExtractingStep',
);
$info['modify_key_value'] = array(
'name' => t('Modify key value'),
'type group' => t('Modify key'),
'class name' => 'ModifyKeyValueStep',
);
$info['make_directory'] = array(
'name' => t('Make directory'),
'type group' => t('Files and directories'),
'class name' => 'MakeDirectoryStep',
);
$info['write_file'] = array(
'name' => t('Write to file'),
'type group' => t('Files and directories'),
'class name' => 'WriteFileStep',
);
$info['copy_file'] = array(
'name' => t('Copy file'),
'type group' => t('Files and directories'),
'class name' => 'CopyFileStep',
);
$info['group_items'] = array(
'name' => t('Group items'),
'type group' => t('Sorting, filtering and grouping'),
'class name' => 'GroupItemsStep',
);
$info['filter_items'] = array(
'name' => t('Filter items'),
'type group' => t('Sorting, filtering and grouping'),
'class name' => 'FilterItemsStep',
);
$info['end_filter'] = array(
'name' => t('Filter end'),
'type group' => t('Sorting, filtering and grouping'),
'class name' => 'EndFilterItemsStep',
);
$info['parse_xml'] = array(
'name' => t('Add key with parsed XML'),
'type group' => array(t('Handling XML'), t('Add key')),
'class name' => 'ParseXmlStep',
);
$info['value_from_xml'] = array(
'name' => t('Add key from XML'),
'type group' => array(t('Handling XML'), t('Add key')),
'class name' => 'ValueFromXmlStep',
);
$info['xml_parts_from_xml'] = array(
'name' => t('Add items by extracting XML parts from XML'),
'type group' => array(t('Handling XML'), t('Add items')),
'class name' => 'ExtractPartsFromXmlStep',
);
$info['read_csv_file'] = array(
'name' => t('Add items by reading CSV/Excel file'),
'type group' => t('Add items'),
'class name' => 'ReadCsvFileStep',
);
$info['visual_group_start'] = array(
'name' => t('Visual group start'), // 2 spaces for sorting.
'type group' => t('Visual'),
'class name' => 'VisualGroupStartStep',
);
$info['visual_group_end'] = array(
'name' => t('Visual group end'),
'type group' => t('Visual'),
'class name' => 'VisualGroupEndStep',
);
$info['sort_items'] = array(
'name' => t('Sort items'),
'type group' => t('Sorting, filtering and grouping'),
'class name' => 'SortItemsStep',
);
$info['transform_xml'] = array(
'name' => t('Transform XML'),
'type group' => t('Handling XML'),
'class name' => 'TransformXmlStep',
);
$info['validate_xml'] = array(
'name' => t('Validate XML'),
'type group' => array(t('Validation'), t('Handling XML')),
'class name' => 'ValidateXmlStep',
);
$info['validate_basic_image'] = array(
'name' => t('Validate Basic Image'),
'type group' => t('Validation'),
'class name' => 'ValidateBasicImageStep',
);
$info['validate_large_image'] = array(
'name' => t('Validate Large Image'),
'type group' => t('Validation'),
'class name' => 'ValidateLargeImageStep',
);
$info['validate_book'] = array(
'name' => t('Validate Book'),
'type group' => t('Validation'),
'class name' => 'ValidateBookStep',
);
$info['validate_pdf'] = array(
'name' => t('Validate PDF'),
'type group' => t('Validation'),
'class name' => 'ValidatePDFStep',
);
$info['validate_compound'] = array(
'name' => t('Validate Compound'),
'type group' => t('Validation'),
'class name' => 'ValidateCompoundStep',
);
$info['filter_by_file'] = array(
'name' => t('Filter by file'),
'type group' => t('Sorting, filtering and grouping'),
'class name' => 'FilterByFileStatsStep',
);
$info['add_key_using_matching_item'] = array(
'name' => t('Add key using matching item'),
'type group' => t('Add key'),
'class name' => 'AddKeyUsingMatchingItemStep',
);
$info['write_to_csv_file'] = array(
'name' => t('Write to CSV file'),
'type group' => t('Files and directories'),
'class name' => 'WriteCsvFileStep',
);
$info['extract_archive'] = array(
'name' => t('Extract an archive'),
'type group' => t('Files and directories'),
'class name' => 'ExtractArchiveStep',
);
$info['add_key_from_file'] = array(
'name' => t('Add key from file'),
'type group' => t('Add key'),
'class name' => 'AddKeyFromFile',
);
$info['validate_newspaper'] = array(
'name' => t('Validate Newspaper'),
'type group' => t('Validation'),
'class name' => 'ValidateNewspaperStep',
);
return $info;
}