forked from Daniel-KM/Omeka-plugin-ArkAndNoid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArkPlugin.php
701 lines (626 loc) · 24.8 KB
/
ArkPlugin.php
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
<?php
/**
* Ark
*
* Creates and manages unique, universel and persistent ark identifiers.
*
* @copyright Daniel Berthereau, 2015-2018
* @license http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*/
/**
* The Ark plugin.
* @package Omeka\Plugins\Ark
*/
class ArkPlugin extends Omeka_Plugin_AbstractPlugin
{
/**
* @var array This plugin's hooks.
*/
protected $_hooks = array(
'initialize',
'install',
'upgrade',
'uninstall',
'config_form',
'config',
'define_routes',
'after_save_collection',
'after_save_item',
// TODO Save ark for files?
);
/**
* @var array This plugin's filters.
*/
protected $_filters = array(
'ark_format_names',
'ark_format_qualifiers',
'filterDisplayCollectionDublinCoreIdentifier' => array('Display', 'Collection', 'Dublin Core', 'Source'),
'filterDisplayItemDublinCoreIdentifier' => array('Display', 'Item', 'Dublin Core', 'Identifier'),
);
/**
* @var array This plugin's options.
*/
protected $_options = array(
'ark_protocol' => 'ark:',
// 12345 means example and 99999 means test.
'ark_naan' => '12345',
'ark_naa' => 'example.org',
'ark_subnaa' => 'sub',
'ark_web_root' => WEB_ROOT,
'ark_format_name' => 'noid',
'ark_noid_database' => '',
'ark_noid_template' => '.zek',
'ark_id_prefix' => '',
'ark_id_prefix_collection' => '',
'ark_id_prefix_item' => '',
'ark_id_suffix' => '',
'ark_id_suffix_collection' => '',
'ark_id_suffix_item' => '',
'ark_id_length' => 4,
'ark_id_pad' => '0',
'ark_id_salt' => 'RaNdOm SaLt',
'ark_id_previous_salts' => '',
'ark_id_alphabet' => 'alphanumeric_no_vowel',
'ark_id_control_key' => true,
'ark_command' => '',
'ark_format_qualifier' => 'order',
'ark_file_variants' => 'original fullsize thumbnail square_thumbnail',
'ark_note' => '',
'ark_policy_statement' => 'erc-support:
who: Our Institution
what: Permanent: Stable Content:
when: 20160101
where: http://example.com/ark:/99999/',
// From the policy statement of the California Digital Library.
'ark_policy_main' => 'Our institution assigns identifiers within the ARK domain under the NAAN 99999 and according to the following principles:
* No ARK shall be re-assigned; that is, once an ARK-to-object association has been made public, that association shall be considered unique into the indefinite future.
* To help them age and travel well, the Name part of our institution-assigned ARKs shall contain no widely recognizable semantic information (to the extent possible).
* Our institution-assigned ARKs shall be generated with a terminal check character that guarantees them against single character errors and transposition errors.',
'ark_use_public' => true,
'ark_use_admin' => false,
'ark_display_public' => '<a href="WEB_ROOT/%1$s">%1$s</a>',
'ark_display_admin' => '<a href="WEB_ROOT/admin/%1$s">%1$s</a>',
'ark_routes_ini' => false,
);
/**
* Add the translations and shortcode.
*/
public function hookInitialize()
{
add_translation_source(dirname(__FILE__) . '/languages');
add_shortcode('ark', array($this, 'shortcodeArk'));
}
/**
* Installs the plugin.
*/
public function hookInstall()
{
$length = 32;
$this->_options['ark_salt'] = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
$this->_options['ark_display_public'] = str_replace('WEB_ROOT', WEB_ROOT, $this->_options['ark_display_public']);
$this->_options['ark_display_admin'] = str_replace('WEB_ROOT', WEB_ROOT, $this->_options['ark_display_admin']);
$this->_options['ark_noid_database'] = FILES_DIR . DIRECTORY_SEPARATOR . 'arkandnoid';
$this->_installOptions();
}
/**
* Upgrade the plugin.
*/
public function hookUpgrade($args)
{
$oldVersion = $args['old_version'];
$newVersion = $args['new_version'];
$db = $this->_db;
if (version_compare($oldVersion, '2.4', '<')) {
delete_option('ark_allow_short_urls');
set_option('ark_protocol', $this->_options['ark_protocol']);
set_option('ark_naa', $this->_options['naa']);
set_option('ark_subnaa', $this->_options['subnaa']);
set_option('ark_noid_database', FILES_DIR . DIRECTORY_SEPARATOR . 'arkandnoid');
set_option('ark_noid_template', $this->_options['ark_noid_template']);
set_option('ark_id_prefix', get_option('ark_prefix'));
delete_option('ark_prefix');
set_option('ark_id_prefix_collection', get_option('ark_prefix_collection'));
delete_option('ark_prefix_collection');
set_option('ark_id_prefix_item', get_option('ark_prefix_item'));
delete_option('ark_prefix_item');
set_option('ark_id_suffix', get_option('ark_suffix'));
delete_option('ark_suffix');
set_option('ark_id_suffix_collection', get_option('ark_suffix_collection'));
delete_option('ark_suffix_collection');
set_option('ark_id_suffix_item', get_option('ark_suffix_item'));
delete_option('ark_suffix_item');
set_option('ark_id_length', get_option('ark_length'));
delete_option('ark_length');
set_option('ark_id_pad', get_option('ark_pad'));
delete_option('ark_pad');
set_option('ark_id_salt', get_option('ark_salt'));
delete_option('ark_salt');
set_option('ark_id_previous_salts', get_option('ark_previous_salts'));
delete_option('ark_previous_salts');
set_option('ark_id_alphabet', get_option('ark_alphabet'));
delete_option('ark_alphabet');
set_option('ark_id_control_key', get_option('ark_control_key'));
delete_option('ark_control_key');
}
if (version_compare($oldVersion, '2.5.1', '<')) {
set_option('ark_web_root', $this->_options['ark_web_root']);
}
}
/**
* Uninstalls the plugin.
*/
public function hookUninstall()
{
$this->_uninstallOptions();
}
/**
* Shows plugin configuration page.
*/
public function hookConfigForm($args)
{
$view = get_view();
echo $view->partial(
'plugins/ark-config-form.php',
array(
'format_names' => $this->_getListOfFormats('ark_format_names'),
'format_qualifiers' => $this->_getListOfFormats('ark_format_qualifiers'),
'isDatabaseCreated' => $this->_isDatabaseCreated(),
'isNoidReady' => get_option('ark_format_name') == 'noid' && $this->_isDatabaseCreated(),
)
);
}
/**
* Saves plugin configuration page.
*
* @param array Options set in the config form.
*/
public function hookConfig($args)
{
$post = $args['post'];
// Fill the disabled fields to avoid notices.
$post['ark_protocol'] = isset($post['ark_protocol']) ? $post['ark_protocol'] : get_option('ark_protocol');
$post['ark_naan'] = isset($post['ark_naan']) ? $post['ark_naan'] : get_option('ark_naan');
$post['ark_naa'] = isset($post['ark_naa']) ? $post['ark_naa'] : get_option('ark_naa');
$post['ark_subnaa'] = isset($post['ark_subnaa']) ? $post['ark_subnaa'] : get_option('ark_subnaa');
$post['ark_noid_database'] = isset($post['ark_noid_database']) ? $post['ark_noid_database'] : get_option('ark_noid_database');
$post['ark_noid_template'] = isset($post['ark_noid_template']) ? $post['ark_noid_template'] : get_option('ark_noid_template');
$post['ark_web_root'] = empty($post['ark_web_root']) ? $this->_options['ark_web_root'] : $post['ark_web_root'];
// Special check for prefix/suffix.
$format = $post['ark_format_name'];
// Check the parameters for the format.
$format = $post['ark_format_name'];
$parameters = array(
'protocol' => $post['ark_protocol'],
'naan' => $post['ark_naan'],
'naa' => $post['ark_naa'],
'subnaa' => $post['ark_subnaa'],
// Parameters for Noid.
'database' => $post['ark_noid_database'],
'template' => $post['ark_noid_template'],
// Parameters for Omeka Id.
'prefix' => $post['ark_id_prefix'] . $post['ark_id_prefix_collection'] . $post['ark_id_prefix_item'],
'suffix' => $post['ark_id_suffix'] . $post['ark_id_suffix_collection'] . $post['ark_id_suffix_item'],
'length' => $post['ark_id_length'],
'pad' => $post['ark_id_pad'],
'salt' => $post['ark_id_salt'],
'alphabet' => $post['ark_id_alphabet'],
'control_key' => $post['ark_id_control_key'],
// Parameters for Command.
'command' => $post['ark_command'],
// This value is used only to check if a zero may be prepended for
// collections with the Omeka Id format.
'identifix' => $post['ark_id_prefix_collection'] === $post['ark_id_prefix_item']
&& $post['ark_id_suffix_collection'] === $post['ark_id_suffix_item'],
);
try {
$processor = $this->_getArkProcessor($format, null, $parameters);
} catch (Ark_ArkException $e) {
throw new Omeka_Validate_Exception($e->getMessage());
}
// Check if the database is created for the format Noid.
if ($post['ark_format_name'] == 'noid') {
if (!empty($post['ark_create_database'])) {
if ($processor->isDatabaseCreated()) {
throw new Omeka_Validate_Exception(__('The database exists already: remove it manually or change the path to create a new one.'));
}
$result = $processor->createDatabase();
if ($result !== true) {
throw new Omeka_Validate_Exception(__('The database cannot be created: %s', $result));
}
}
// Check if the database exists.
elseif (!$processor->isDatabaseCreated()) {
throw new Omeka_Validate_Exception(__('With format "Noid", the database should be created: check the box "Create the database".'));
}
// Nothing to do else: the database should be created.
}
// Save the previous salt if needed.
$salt = get_option('ark_id_salt');
$previousSalts = get_option('ark_id_previous_salts');
// Clean the file variants.
$post['ark_file_variants'] = preg_replace('/\s+/', ' ', trim($post['ark_file_variants']));
foreach ($this->_options as $optionKey => $optionValue) {
if (isset($post[$optionKey])) {
set_option($optionKey, $post[$optionKey]);
}
}
// Save the previous salt if needed.
$newSalt = get_option('ark_id_salt');
if ($newSalt !== $salt && strlen($newSalt) > 0) {
set_option('ark_id_previous_salts', $previousSalts . PHP_EOL . $newSalt);
}
}
/**
* Defines routes.
*/
public function hookDefineRoutes($args)
{
$router = $args['router'];
if (get_option('ark_routes_ini')) {
$router->addConfig(new Zend_Config_Ini(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'routes.ini', 'routes'));
return;
}
$protocol = get_option('ark_protocol');
if (empty($protocol)) {
return;
}
// Routes is different with "ark", because there is a naan.
if ($protocol == 'ark:') {
$naan = get_option('ark_naan');
if (empty($naan)) {
return;
}
$router->addRoute('ark_policy', new Zend_Controller_Router_Route(
"$protocol/$naan/",
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'policy',
'naan' => $naan,
)));
// Two non standard routes for ark.
$router->addRoute('ark_policy_short', new Zend_Controller_Router_Route(
'ark/policy',
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'policy',
'naan' => $naan,
)));
$router->addRoute('ark_policy_ark', new Zend_Controller_Router_Route(
"$protocol/policy",
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'policy',
'naan' => $naan,
)));
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
//modification for SPOKEdb legacy URLs without NAAN included
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if (strpos($actual_link, 'xt7') !== false){
if (strpos($actual_link, 'ark:/16417/') !== false) {
$protocolBase = "ark:/$naan";
} else if (strpos($actual_link, 'ark:/16417/') == false) {
$protocolBase = "";
}
} else {
$protocolBase = "ark:/$naan";
}
//end of modification for SPOKEdb legacy URLs
//$protocolBase = "ark:/$naan";
}
// Routes for non-arks unique identifiers.
else {
$router->addRoute('ark_policy', new Zend_Controller_Router_Route(
$protocol . '/policy',
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'policy',
'naan' => $naan,
)));
$protocolBase = $protocol;
}
$router->addRoute('ark_id', new Zend_Controller_Router_Route(
"$protocolBase/:name/:qualifier",
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'index',
'naan' => $naan,
'qualifier' => '',
),
array(
'name' => '\w+',
)));
// A regex is needed, because a variant is separated by a ".", not a
// "/".
$router->addRoute('ark_file_variant', new Zend_Controller_Router_Route_Regex(
$protocolBase . '/(\w+)/(.*)\.(' . str_replace(' ', '|', get_option('ark_file_variants')) . ')',
array(
'module' => 'ark',
'controller' => 'index',
'action' => 'index',
'naan' => $naan,
),
array(
1 => 'name',
2 => 'qualifier',
3 => 'variant',
),
"$protocolBase/%s/%s.%s"
));
}
/**
* Create or check an ark when a collection is saved, with the id.
*/
public function hookAfterSaveCollection($args)
{
$this->_addArk($args['record']);
}
/**
* Create or check an ark when an item is saved, with the id.
*/
public function hookAfterSaveItem($args)
{
$this->_addArk($args['record']);
}
/**
* Add an ark to a record, if needed.
*
* @param Omeka_Record_AbstractRecord $record
* @return void
*/
protected function _addArk($record)
{
// Check if an ark exists (no automatic change or update), else create.
$ark = get_view()->ark($record);
if (empty($ark)) {
$format = get_option('ark_format_name');
$recordType = get_class($record);
try {
$ark = $this->_getArkProcessor($format, $recordType);
} catch (Ark_ArkException $e) {
_log('[Ark&Noid] ' . __($e->getMessage()));
throw $e;
}
$ark = $ark->create($record);
if ($ark) {
$element = $record->getElement('Dublin Core', 'Identifier');
$elementText = new ElementText();
$elementText->element_id = $element->id;
$elementText->record_type = $recordType;
$elementText->record_id = $record->id;
$elementText->html = false;
$elementText->setText($ark);
$elementText->save();
}
}
}
/**
* Add the formats that are available for names.
*
* @param array $formatNames Array of formats for names.
* @return array Filtered formats array.
*/
public function filterArkFormatNames($formatNames)
{
// Available default formats in the plugin.
$formatNames['noid'] = array(
'class' => 'Ark_Name_Noid',
'description' => __('Noid for php'),
);
$formatNames['omeka_id'] = array(
'class' => 'Ark_Name_OmekaId',
'description' => __('Omeka Id derivative'),
);
$formatNames['command'] = array(
'class' => 'Ark_Name_Command',
'description' => __('Command, like noid for perl'),
);
return $formatNames;
}
/**
* Add the formats that are available for qualifiers.
*
* @param array $formatQualifiers Array of formats for qualifiers.
* @return array Filtered formats array.
*/
public function filterArkFormatQualifiers($formatQualifiers)
{
// Available default formats in the plugin.
$formatQualifiers['omeka_id'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Omeka Id'),
);
$formatQualifiers['order'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Order'),
);
$formatQualifiers['filename'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Omeka filename'),
);
$formatQualifiers['filename_without_extension'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Omeka filename without extension'),
);
$formatQualifiers['original_filename'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Original filename'),
);
$formatQualifiers['original_filename_without_extension'] = array(
'class' => 'Ark_Qualifier_Internal',
'description' => __('Original filename without extension'),
);
return $formatQualifiers;
}
/**
* Get the simple list of formats (name and description).
*
* @param string $filter Name of the filter.
* @return array Associative array of the name and description of formats.
*/
protected function _getListOfFormats($filter)
{
$values = apply_filters($filter, array());
foreach ($values as $name => &$value) {
if (class_exists($value['class'])) {
$value = $value['description'];
}
else {
unset($values[$name]);
}
}
return $values;
}
/**
* Determine if a local base is used and already created (Noid for php).
*
* @return boolean
*/
protected function _isDatabaseCreated()
{
$format = get_option('ark_format_name');
if ($format == 'noid') {
$database = get_option('ark_noid_database');
if (!empty($database)) {
$processor = $this->_getArkProcessor($format);
return $processor->isDatabaseCreated();
}
}
return false;
}
/**
* Filter for metadata.
*
* @param string $text
* @param array $args
* @return string
*/
public function filterDisplayCollectionDublinCoreIdentifier($text, $args)
{
return $this->_displayArkIdentifier($text, $args);
}
/**
* Filter for metadata.
*
* @param string $text
* @param array $args
* @return string
*/
public function filterDisplayItemDublinCoreIdentifier($text, $args)
{
return $this->_displayArkIdentifier($text, $args);
}
/**
* Filter the ark to display an url.
*
* @param string $text
* @param array $args
* @return string The filtered ark.
*/
protected function _displayArkIdentifier($text, $args)
{
$arkDisplay = is_admin_theme()
? get_option('ark_display_admin')
: get_option('ark_display_public');
if (empty($arkDisplay)) {
return $text;
}
// Ark is the slowest check, so it's done later.
$ark = get_view()->ark($args['record']);
if ($text != $ark) {
return $text;
}
return sprintf($arkDisplay, $text);
}
/**
* Shortcode to display the ark of a record.
*
* @param array $args
* @param Omeka_View $view
* @return string
*/
public function shortcodeArk($args, $view)
{
// Check required arguments
if (empty($args['record_id'])) {
return '';
}
$recordId = (integer) $args['record_id'];
$recordType = isset($args['record_type']) ? $args['record_type'] : 'Item';
$recordType = ucfirst(strtolower($recordType));
// Quick checks.
$record = get_record_by_id($recordType, $recordId);
if (!$record) {
return '';
}
// Get display values (link or text).
$display = isset($args['display']) ? $args['display'] : null;
return $view->ark($record, $display);
}
/**
* Return the selected processor or throw an error.
*
* @param string $format
* @param string|null $recordType
* @return Ark_Name_Abstract class.
*/
protected function _getArkProcessor($format, $recordType = null, $parameters = array())
{
$formats = apply_filters('ark_format_names', array());
// Check the selected format (avoid issue for extra plugin class).
if (!isset($formats[$format])) {
throw new Ark_ArkException(__('Ark format for names "%s" is missing.', $format));
}
$class = $formats[$format]['class'];
if (!class_exists($class)) {
throw new Ark_ArkException(__('Ark class "%s" is missing.', $class));
}
if (empty($parameters)) {
// A check is automatically done internally.
if (is_null($recordType)) {
$prefix = get_option('ark_id_prefix') . get_option('ark_id_prefix_collection') . get_option('ark_id_prefix_item') ;
$suffix = get_option('ark_id_suffix') . get_option('ark_id_suffix_collection') . get_option('ark_id_suffix_item');
}
// Adding an ark to a specific record.
else {
$recordType = strtolower($recordType);
$prefix = get_option('ark_id_prefix') . get_option('ark_id_prefix_' . $recordType);
$suffix = get_option('ark_id_suffix') . get_option('ark_id_suffix_' . $recordType);
}
$identifix = get_option('ark_id_prefix_collection') === get_option('ark_id_prefix_item')
&& get_option('ark_id_suffix_collection') === get_option('ark_id_suffix_item');
$parameters = array(
'protocol' => get_option('ark_protocol'),
'naan' => get_option('ark_naan'),
'naa' => get_option('ark_naa'),
'subnaa' => get_option('ark_subnaa'),
// Parameters for Noid.
'database' => get_option('ark_noid_database'),
'template' => get_option('ark_noid_template'),
// Parameters for Omeka Id.
'prefix' => $prefix,
'suffix' => $suffix,
'length' => get_option('ark_id_length'),
'pad' => get_option('ark_id_pad'),
'salt' => get_option('ark_id_salt'),
'alphabet' => get_option('ark_id_alphabet'),
'control_key' => get_option('ark_id_control_key'),
// Parameters for Command.
'command' => get_option('ark_command'),
// This value is used only to check if a zero may be prepended
// for collections with the Omeka Id format.
'identifix' => $identifix,
);
}
try {
$arkProcessor = new $class($parameters);
} catch (Ark_ArkException $e) {
throw new Ark_ArkException(__('Parameters are incorrect: %s', $e->getMessage()));
}
return $arkProcessor;
}
}