Project

General

Profile

Download (19.7 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
// $Id$
3

    
4
/**
5
 * Copyright (C) 2007 EDIT
6
 * European Distributed Institute of Taxonomy
7
 * http://www.e-taxonomy.eu
8
 *
9
 * The contents of this file are subject to the Mozilla Public License Version 1.1
10
 * See http://www.mozilla.org/MPL/MPL-1.1.html for the full license terms.
11
 */
12

    
13
/**
14
 * This function prints the lectotype citation with the correct layout
15
 * Lectotypes are renderized in the synonymy tab of a taxon if they exist
16
 * @param $typeDesignation_citation The lectotype citation to print
17
 * @return html valid string
18
 */
19
function type_designation_citation_layout($typeDesignation){
20

    
21
	$res = '';
22
	$citation = $typeDesignation->citation;
23
	$pages = $typeDesignation->citationMicroReference;
24
	if ($citation){
25
		//$type = $typeDesignation_citation->type;
26
		$year = substr($citation->datePublished->start, 0, 4);
27
		$author = $citation->authorTeam->titleCache;
28
		$res .= ' (designated by ';
29
		$res .= $author;
30
		$res .= ($year ? ' '.$year : '');
31
		$res .= ($pages ? ': '. $pages : '');
32
		//$res .= ')';
33
	}
34
	return $res;
35
}
36

    
37
function theme_cdm_typedesignations($typeDesignations = array()){
38
	/*
39
	 if(isset($renderTemplate['referencePart']['reference']) && $taxonName->nomenclaturalReference){
40
	 $microreference = null;
41
	 if(isset($renderTemplate['referencePart']['microreference'])){
42
	 $microreference = $taxonName->nomenclaturalMicroReference;
43
	 }
44
	 $citation = cdm_ws_get(CDM_WS_NOMENCLATURAL_REFERENCE_CITATION, array($typeDesignation->uuid), "microReference=".urlencode($microreference));
45
	 $citation = $citation->String;
46
	 */
47

    
48
	RenderHints::pushToRenderStack('typedesignations');
49
	//_add_js_cluetip();
50
	$out = '<ul class="typeDesignations">';
51
	$typeDesignation_footnotes = false;
52
	$is_lectotype = false;
53
	$specimenTypeDesignations = array();
54
	$separator = ',';
55
	foreach($typeDesignations as $typeDesignation){
56
		if($typeDesignation->class == 'SpecimenTypeDesignation'){
57
			// SpecimenTypeDesignations should be ordered. collect theme here only
58
			$specimenTypeDesignations[] = $typeDesignation;
59
		}else{ //it is a lectotype?
60
			if(strcmp($typeDesignation->typeStatus->titleCache, 'lectotype') == 0){
61
        $is_lectotype = true;
62
      }
63
			// it's a NameTypeDesignation
64
			if($typeDesignation->notDesignated){
65
				$out .= '<li class="nameTypeDesignation"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>: ' . t('not designated'). '</li>';
66
				//$out .= '<li class="nameTypeDesignation"><span class="status">Lectotype</span>: '.t('not designated'). '</li>';
67
			}else if($typeDesignation->typeName){
68
				$link_to_name_page = '?q=' . path_to_name($typeDesignation->typeName->uuid);
69
				$out .= '<li class="nameTypeDesignation"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>';
70
				if($typeDesignation->citation){
71
					$out .= type_designation_citation_layout($typeDesignation);
72
					//footnotes
73
					//$fkey_typeDesignation = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-typeDesignations-' . $typeDesignation->uuid, $typeDesignation->citation->titleCache);
74
					$fkey_typeDesignation = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-typeDesignations', $typeDesignation->citation->titleCache);
75
					$out .= theme('cdm_footnote_key', $fkey_typeDesignation, $separator, true, true) . ')';
76
				}
77
				if($typeDesignation->typeName->nomenclaturalReference){
78
					$referenceUri = url(path_to_reference($typeDesignation->typeName->nomenclaturalReference->uuid));
79
				}
80
				$out .= ': ' . theme('cdm_taxonName', $typeDesignation->typeName, $link_to_name_page, $referenceUri, true, true);
81
			}
82
		}
83
	}
84

    
85
	if(!empty($specimenTypeDesignations)){
86
		// sorting might be different for dataportals so this has to be parameterized
87
		usort($specimenTypeDesignations, "compare_specimenTypeDesignationStatus");
88
		foreach($specimenTypeDesignations as $std){
89
			$typeReference = '';
90
			//show citation only for Lectotype or Neotype
91
			$showCitation = isset($std->typeStatus) && ($std->typeStatus->uuid == UUID_NEOTYPE || $std->typeStatus->uuid == UUID_LECTOTYPE);
92
			if($showCitation && !empty($std->citation)){
93
				//$shortCitation = $std->citation->authorTeam->titleCache;
94

    
95
				$author_team = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $std->citation->uuid);
96
				$shortCitation = $author_team->titleCache;
97

    
98
				$shortCitation .= (strlen($shortCitation) > 0 ? ' ' : '' ). partialToYear($std->citation->datePublished->start);
99
				if(strlen($shortCitation) == 0){
100
					$shortCitation = theme('cdm_reference', $std->citation);
101
					$missingShortCitation = true;
102
				}
103

    
104
				$typeReference .= '&nbsp;(' . t('designated by');
105
				$typeReference .= '&nbsp;<span class="typeReference '.($missingShortCitation ? '' : 'cluetip').' no-print" title="'. htmlspecialchars('|'.theme('cdm_reference',$std->citation ).'|') .'">';
106
				$typeReference .= $shortCitation.'</span>';
107
				$typeReference .= ':'. $std->citationMicroReference .')';
108

    
109
				$_fkey2 = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-lectotypes', $std->citation->titleCache);
110
				$typeReference .= theme('cdm_footnote_key', $_fkey2, $separator, true, true);
111
			}
112

    
113
			$derivedUnitFacadeInstance = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, $std->typeSpecimen->uuid);
114

    
115
			$out .= '<li class="specimenTypeDesignation">';
116
			$out .= '<span class="status">'.(($std->typeStatus->representation_L10n) ? $std->typeStatus->representation_L10n : t('Type')) .$typeReference.'</span>: '.$derivedUnitFacadeInstance->titleCache;
117
			$out .= theme('cdm_specimen', $derivedUnitFacadeInstance);
118

    
119
			//footnotes for synonymy acronyms
120
			$_fkey = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-acronyms', $derivedUnitFacadeInstance->collection->titleCache);
121
			$out .= theme('cdm_footnote_key', $_fkey, $separator);
122
			$out .= '</li>';
123

    
124
			if (!empty($std->citation)){
125
				$render_footnote_lectotypes = true;
126
			 //$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-lectotypes');
127
			}
128
		}
129
	}
130

    
131
	$out .= '</ul>';
132
	//render the footnotes at the end of the page
133
	if ($render_footnote_lectotypes){
134
		$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-lectotypes');
135
	}
136
	$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-acronyms', 'li');
137
	$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-typeDesignations', 'li');
138
	//$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-typeDesignations-' . $typeDesignation->uuid, 'li');
139

    
140
	RenderHints::popFromRenderStack();
141
	return $out;
142
}
143

    
144

    
145
/**
146
 * FIXME this definitively has to be in another spot. just didn't know where to put it right now.
147
 * Compares the status of two SpecimenTypeDesignations
148
 * @param String $a 	a SpecimenTypeDesignations
149
 * @param String $b		another SpecimenTypeDesignations
150
 */
151
function compare_specimenTypeDesignationStatus($a, $b){
152
	/* this is the desired sort oder as of now:
153
	 * 	Holotype
154
	 * 	Isotype
155
	 * 	Lectotype
156
	 * 	Isolectotype
157
	 * 	Syntype
158
	 *
159
	 * TODO
160
	 * Basically, what we are trying to do is, we define an ordered array of TypeDesignation-states
161
	 * and use the index of this array for comparison. This array has to be filled with the cdm-
162
	 * TypeDesignation states and the order should be parameterisable inside the dataportal.
163
	 */
164
	// make that static for now
165
	$typeOrder = array('Holotype', 'Isotype', 'Lectotype', 'Isolectotype', 'Syntype');
166

    
167
	$aQuantifier = array_search($a->typeStatus->label, $typeOrder);
168
	$bQuantifier = array_search($b->typeStatus->label, $typeOrder);
169

    
170
	if ($aQuantifier == $bQuantifier) {
171
		// sort alphabetically
172
		return ($a->typeStatus->label < $b->typeStatus->label) ? -1 : 1;
173
	}
174
	return ($aQuantifier < $bQuantifier) ? -1 : 1;
175

    
176
}
177

    
178
function theme_cdm_nameRelationships($nameRelationships, $skipTypes = false){
179

    
180
	if(!$nameRelationships){
181
		return;
182
	}
183

    
184
	RenderHints::pushToRenderStack('nameRelationships');
185
	$footnoteListKey = 'nameRelationships';
186
	RenderHints::setFootnoteListKey($footnoteListKey);
187

    
188
	// group by relationship type
189
	$relationshipGroups = array();
190
	foreach($nameRelationships as $nameRelationship){
191
		if(!array_key_exists($nameRelationship->type->uuid, $relationshipGroups)){
192
			$relationshipGroups[$nameRelationship->type->uuid] = array();
193
		}
194
		$relationshipGroups[$nameRelationship->type->uuid][] = $nameRelationship;
195
	}
196

    
197
	// generate output
198
	$out = '';
199
	foreach($relationshipGroups as $group){
200
		$type = $group[0]->type;
201

    
202
		if(is_array($skipTypes) && in_array($type->uuid, $skipTypes)){
203
			continue;
204
		}
205

    
206
		$block->module = 'cdm_dataportal';
207
		$block->subject = t(ucfirst($type->inverseRepresentation_L10n));
208
		$block->delta = generalizeString(strtolower($type->inverseRepresentation_L10n));
209

    
210
		foreach($group as $relationship){
211
			$relatedNames[] = cdm_taggedtext2html($relationship->fromName->taggedName);
212
		}
213

    
214
		$block->content .= implode('; ', $relatedNames);
215
		$out .= theme('block', $block);
216
	}
217
	$out .= theme('cdm_footnotes', $footnoteListKey, 'li');
218

    
219
	RenderHints::popFromRenderStack();
220
	return $out;
221
}
222

    
223

    
224

    
225
function theme_cdm_homotypicSynonymLine($taxon){
226
	$out = '';
227
	$out .= '<li class="synonym">'.theme('cdm_related_taxon', $taxon, UUID_HOMOTYPIC_SYNONYM_OF).'</li>';
228

    
229
	return $out;
230
}
231

    
232
function theme_cdm_heterotypicSynonymyGroup($homotypicalGroup){
233

    
234
	RenderHints::pushToRenderStack('heterotypicSynonymyGroup');
235

    
236
	$out = '';
237
	$out = '<ul class="heterotypicSynonymyGroup">';
238
	$footnoteListKey = ( isset($homotypicalGroup[0]) ? $homotypicalGroup[0]->uuid : 'NULL');
239
	RenderHints::setFootnoteListKey($footnoteListKey);
240

    
241
	$is_first_entry = true;
242
	$typeDesignations = null;
243
	foreach($homotypicalGroup as $synonym){
244
		if($is_first_entry){
245
			$is_first_entry = false;
246
			$typeDesignations = cdm_ws_get(CDM_WS_PORTAL_NAME_TYPEDESIGNATIONS, $synonym->name->uuid);
247
			// is first list entry
248
			$out .= '<li class="firstentry synonym">'.theme('cdm_related_taxon',$synonym, UUID_HETEROTYPIC_SYNONYM_OF).'</li>';
249
		} else {
250
			$out .= '<li class="synonym">'.theme('cdm_related_taxon',$synonym, UUID_HOMOTYPIC_SYNONYM_OF).'</li>';
251
		}
252
	}
253
	//$test =  theme('cdm_annotation_footnotes', $footnoteListKey, 'li');
254
	//tuypedesignations footnotes
255

    
256
	if($typeDesignations){
257
		$out .= theme('cdm_typedesignations', $typeDesignations);
258

    
259
	}
260

    
261
	//annotation footnotes
262
	//$annotation_key = ( isset($homotypicalGroup[0]) ? $homotypicalGroup[0]->uuid : 'NULL');
263
	//$fkey_annotations = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-annotations-' . $annotation_key, $annotation_key);
264
	//$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-annotations-' . $annotation_key);
265
	$out .= theme('cdm_annotation_footnotes', $footnoteListKey, 'li');
266
	//$out .= theme('cdm_annotation_footnotes', $footnoteListKey);
267
	$out .= '</ul>';
268

    
269

    
270
	RenderHints::popFromRenderStack();
271
	return $out;
272
}
273

    
274

    
275

    
276
function theme_cdm_homotypicSynonymyGroup($synonymList, $prependedSynonyms = array()){
277

    
278
	RenderHints::pushToRenderStack('homotypicSynonymyGroup');
279

    
280
	$footnoteListKey = isset($prependedSynonyms[0]) ? $prependedSynonyms[0]->uuid : (isset($synonymList[0]) ? $synonymList[0]->uuid : 'NULL');
281
	$accepted_taxon_footnoteListKey = RenderHints::getFootnoteListKey();
282
	RenderHints::setFootnoteListKey($footnoteListKey);
283

    
284
	if(! is_array($synonymList) || count($synonymList) == 0){
285
		return;
286
	}
287

    
288
	$out = '<ul class="homotypicSynonyms">';
289

    
290
	if(!empty($prependedSynonyms)){
291
		foreach($prependedSynonyms as $taxon){
292
			$out .= '<li class="synonym">'.theme('cdm_related_taxon', $taxon, UUID_HOMOTYPIC_SYNONYM_OF).'</li>';
293
		}
294
	}
295

    
296
	foreach($synonymList as $synonym){
297
		$out .= '<li class="synonym">'.theme('cdm_related_taxon', $synonym, UUID_HOMOTYPIC_SYNONYM_OF).'</li>';
298
	}
299

    
300
	$typeDesignations = cdm_ws_get(CDM_WS_PORTAL_NAME_TYPEDESIGNATIONS, $synonymList[0]->name->uuid);
301
	if($typeDesignations){
302
		$out .= theme('cdm_typedesignations', $typeDesignations);
303
	}
304
  if($accepted_taxon_footnoteListKey){// to avoiding drupal warnings (#1830) why false???
305
  	 $out .= theme('cdm_footnotes', $accepted_taxon_footnoteListKey, 'li');
306
  }
307
	$out .= theme('cdm_annotation_footnotes', $footnoteListKey, 'li');
308
	$out .= '</ul>';
309

    
310
	RenderHints::popFromRenderStack();
311
	return $out;
312
}
313

    
314

    
315
function theme_cdm_taxonName($taxonName, $nameLink = NULL, $refenceLink = NULL, $show_annotations = true, $is_type_designation = false){
316

    
317
	$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink);
318
	$partDefinition = get_partDefinition($taxonName->class);
319

    
320
	// apply defintions to template
321
	foreach($renderTemplate as $part=>$uri){
322
		if(isset($partDefinition[$part])){
323
			$renderTemplate[$part] = $partDefinition[$part];
324
		}
325
		if(is_array($uri)){
326
			$renderTemplate[$part]['#uri'] = $uri['#uri'];
327
		}
328
	}
329

    
330
	$firstEntryIsValidNamePart = is_array($taxonName->taggedName)
331
	&& is_string($taxonName->taggedName[0]->text)
332
	&& $taxonName->taggedName[0]->text != ''
333
	&& $taxonName->taggedName[0]->type == 'name';
334

    
335
	// got to use second entry as first one, see ToDo comment below ...
336
	if($firstEntryIsValidNamePart){
337

    
338
		$taggedName = $taxonName->taggedName;
339

    
340
		$lastAuthorElementString = false;
341
		$hasNamePart_with_Authors = isset($renderTemplate['namePart']) && isset($renderTemplate['namePart']['authors']);
342
		$hasNameAuthorPart_with_Authors = isset($renderTemplate['nameAuthorPart']) && isset($renderTemplate['nameAuthorPart']['authors']);
343

    
344
		if(!($hasNamePart_with_Authors || $hasNameAuthorPart_with_Authors)){
345
			//      // find author and split off from name
346
			//      // TODO expecting to find the author as the last element
347
			//      if($taggedName[count($taggedName)- 1]->type == 'authors'){
348
			//        $authorTeam = $taggedName[count($taggedName)- 1]->text;
349
			//        unset($taggedName[count($taggedName)- 1]);
350
			//      }
351

    
352
			// remove all authors
353
			$taggedNameNew = array();
354
			foreach($taggedName as $element){
355
				if($element->type != 'authors'){
356
					$taggedNameNew[] = $element;
357
				} else {
358
					$lastAuthorElementString = $element->text;
359
				}
360
			}
361
			$taggedName = $taggedNameNew;
362

    
363
		}
364
		$name = '<span class="'.$taxonName->class.'">'.theme('cdm_taggedtext2html', $taggedName).'</span>';
365
	} else {
366
		$name = '<span class="'.$taxonName->class.'_titleCache">'.$taxonName->titleCache.'</span>';
367
	}
368

    
369
	// fill name into $renderTemplate
370
	array_setr('name', $name, $renderTemplate);
371

    
372
	//  // fill with authorTeam
373
	//  if($authorTeam){
374
	//    $authorTeamHtml = ' <span class="authorTeam">'.$authorTeam.'</span>';
375
	//    array_setr('authorTeam', $authorTeamHtml, $renderTemplate);
376
	//  }
377

    
378
	// fill with reference
379
	if(isset($renderTemplate['referencePart']) && !$is_type_designation){
380

    
381
		// [Eckhard]:"Komma nach dem Taxonnamen ist grunsätzlich falsch,
382
		// Komma nach dem Autornamen ist überall dort falsch, wo ein "in" folgt."
383
		if(isset($renderTemplate['referencePart']['reference']) && $taxonName->nomenclaturalReference){
384
			$microreference = null;
385
			if(isset($renderTemplate['referencePart']['microreference'])){
386
				$microreference = $taxonName->nomenclaturalMicroReference;
387
			}
388
			$citation = cdm_ws_get(CDM_WS_NOMENCLATURAL_REFERENCE_CITATION, array($taxonName->nomenclaturalReference->uuid), "microReference=".urlencode($microreference));
389
			$citation = $citation->String;
390
			// find preceding element of the refrence
391
			$precedingKey = get_preceding_contentElementKey('reference', $renderTemplate);
392
			if(str_beginsWith($citation, ", in")){
393
				$citation = substr($citation, 2);
394
				$separator = ' ';
395
			} else if(!str_beginsWith($citation, "in") && $precedingKey == 'authors'){
396
				$separator = ', ';
397
			} else {
398
				$separator = ' ';
399
			}
400

    
401
			$referenceArray['#separator'] = $separator;
402
			$referenceArray['#html'] = '<span class="reference">'.$citation.'</span>';
403
			array_setr('reference', $referenceArray, $renderTemplate);
404
		}
405

    
406
		// if authors have been removed from the name part the last named authorteam
407
		// should be added to the reference citation, otherwise, keep the separator
408
		// out of the reference
409
		if(isset($renderTemplate['referencePart']['authors']) && $lastAuthorElementString){
410
			// if the nomenclaturalReference cintation is not included in the reference part but diplay of the microreference
411
			// is whanted append the microreference to the authorTeam
412
			if(!isset($renderTemplate['referencePart']['reference']) && isset($renderTemplate['referencePart']['microreference'])){
413
				$separator = ": ";
414
				$citation = $taxonName->nomenclaturalMicroReference;
415
			}
416
			$referenceArray['#html'] = ' <span class="reference">'.$lastAuthorElementString.$separator.$citation.'</span>';
417
			array_setr('authors', $referenceArray, $renderTemplate);
418
		}
419

    
420
	}
421

    
422
	// fill with status
423
	if(array_setr('status', true, $renderTemplate)){
424
		if(isset($taxon->name->status[0])){
425
			foreach($taxon->name->status as $status){
426
				$statusHtml .= ', '.$status->type->representation_L10n;
427
			}
428
		}
429
		array_setr('status', ' <span class="nomenclatural_status">'.$statusHtml.'</span>', $renderTemplate);
430
	}
431

    
432
	// fill with protologues etc...
433
	if(array_setr('description', true, $renderTemplate)){
434
		$descriptions = cdm_ws_get(CDM_WS_PORTAL_NAME_DESCRIPTIONS, $taxonName->uuid);
435
		foreach($descriptions as $description){
436
			if(!empty($description)){
437
				foreach($description->elements as $description_element){
438
					$second_citation = '';
439
					if ($description_element->multilanguageText_L10n->text){
440
						$second_citation = '[& ' . $description_element->multilanguageText_L10n->text . '].';
441
					}
442
					$descriptionHtml .= $second_citation;
443
					$descriptionHtml .= theme("cdm_media", $description_element, array('application/pdf', 'image/png', 'image/jpeg', 'image/gif', 'text/html'));
444
				}
445
			}
446
		}
447
		array_setr('description', $descriptionHtml, $renderTemplate);
448
	}
449

    
450
	// render
451
	$out = '<span ref="/name/'.$taxonName->uuid.'">';
452

    
453
	foreach($renderTemplate as $partName=>$part){
454
		$separator = '';
455
		$partHtml = '';
456
		$uri = false;
457
		if(!is_array($part)){
458
			continue;
459
		}
460
		if(isset($part['#uri']) && is_string($part['#uri'])){
461
			$uri = $part['#uri'];
462
			unset($part['#uri']);
463
		}
464
		foreach($part as $key=>$content){
465
			$html = '';
466
			if(is_array($content)){
467
				$html = $content['#html'];
468
				$separator = $content['#separator'];
469
			} else if(is_string($content)){
470
				$html = $content;
471
			}
472
			$partHtml .= '<span class="'.$key.'">'.$html.'</span>';
473
		}
474
		if($uri){
475
			$out .= $separator.'<a href="'.$uri.'" class="'.$partName.'">'.$partHtml.'</a>';
476
		} else {
477
			$out .= $separator.$partHtml;
478
		}
479
	}
480
	$out .= '</span>';
481
	if ($show_annotations){
482
    //$out .= theme('cdm_annotations_as_footnotekeys', $taxonName);
483
	}
484
	return $out;
485
}
486

    
487
/**
488
 * Recursively searches the array for the $key and sets the given value
489
 * @param $key
490
 * @param $value
491
 * @param $array
492
 * @return true if the key has been found
493
 */
494
function &array_setr($key, $value, array &$array){
495
	foreach($array as $k=>&$v){
496
		if($key == $k){
497
			$v = $value;
498
			return $array;
499
		} else if(is_array($v)){
500
			$innerArray = array_setr($key, $value, $v);
501
			if($innerArray){
502
				return $array;
503
			}
504
		}
505
	}
506
	return null;
507
}
508

    
509
function &get_preceding_contentElement($contentElementKey, array &$renderTemplate){
510
	$precedingElement = null;
511
	foreach($renderTemplate as &$part){
512
		foreach($part as $key=>&$element){
513
			if($key == $contentElementKey){
514
				return $precedingElement;
515
			}
516
			$precedingElement = $element;
517
		}
518
	}
519
	return null;
520
}
521

    
522
function &get_preceding_contentElementKey($contentElementKey, array &$renderTemplate){
523
	$precedingKey = null;
524
	foreach($renderTemplate as &$part){
525
		if(is_array($part)){
526
			foreach($part as $key=>&$element){
527
				if($key == $contentElementKey){
528
					return $precedingKey;
529
				}
530
				if(!str_beginsWith($key, '#')){
531
					$precedingKey = $key;
532
				}
533
			}
534
		}
535
	}
536
	return null;
537
}
538

    
539

    
540

    
541

    
542

    
543

    
544

    
(4-4/8)