Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 44 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Summon | |
0.00% |
0 / 44 |
|
0.00% |
0 / 2 |
650 | |
0.00% |
0 / 1 |
getEndnoteFormat | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
56 | |||
getRefWorksFormat | |
0.00% |
0 / 33 |
|
0.00% |
0 / 1 |
342 |
1 | <?php |
2 | |
3 | /** |
4 | * Summon support functions. |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2012. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2, |
12 | * as published by the Free Software Foundation. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * |
23 | * @category VuFind |
24 | * @package Summon |
25 | * @author Demian Katz <demian.katz@villanova.edu> |
26 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
27 | * @link https://vufind.org Main Page |
28 | */ |
29 | |
30 | namespace VuFind\View\Helper\Root; |
31 | |
32 | use Laminas\View\Helper\AbstractHelper; |
33 | |
34 | /** |
35 | * Summon support functions. |
36 | * |
37 | * @category VuFind |
38 | * @package Summon |
39 | * @author Demian Katz <demian.katz@villanova.edu> |
40 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
41 | * @link https://vufind.org Main Page |
42 | */ |
43 | class Summon extends AbstractHelper |
44 | { |
45 | /** |
46 | * Export support function to convert Summon format to EndNote format. |
47 | * |
48 | * @param string $format Summon format |
49 | * |
50 | * @return string |
51 | */ |
52 | public function getEndnoteFormat($format) |
53 | { |
54 | switch ($format) { |
55 | case 'Journal Article': |
56 | return 'Journal Article'; |
57 | case 'Book': |
58 | return 'Book'; |
59 | case 'Book Chapter': |
60 | return 'Book Section'; |
61 | case 'Conference Proceeding': |
62 | return 'Conference Paper'; |
63 | case 'Dissertation': |
64 | return 'Thesis'; |
65 | default: |
66 | return 'Generic'; |
67 | } |
68 | } |
69 | |
70 | /** |
71 | * Export support function to convert Summon format to RefWorks format. |
72 | * |
73 | * @param string $format Summon format |
74 | * |
75 | * @return string |
76 | */ |
77 | public function getRefWorksFormat($format) |
78 | { |
79 | switch ($format) { |
80 | case 'Book Chapter': |
81 | return 'Book, Section'; |
82 | case 'Book': |
83 | return 'Book, Whole'; |
84 | case 'eBook': |
85 | return 'Book, Whole'; |
86 | case 'Computer File': |
87 | return 'Computer Program'; |
88 | case 'Conference Proceeding': |
89 | return 'Conference Proceedings'; |
90 | case 'Dissertation': |
91 | return 'Dissertation/Thesis'; |
92 | case 'Journal Article': |
93 | return 'Journal Article'; |
94 | case 'Journal': |
95 | return 'Journal, Electronic'; |
96 | case 'Trade Publication Article': |
97 | return 'Magazine Article'; |
98 | case 'Map': |
99 | return 'Map'; |
100 | case 'Music Score': |
101 | return 'Music Score'; |
102 | case 'Newspaper Article': |
103 | return 'Newspaper Article'; |
104 | case 'Report': |
105 | return 'Report'; |
106 | case 'Audio Recording': |
107 | return 'Sound Recording'; |
108 | case 'Video Recording': |
109 | return 'Video/ DVD'; |
110 | case 'Web Resource': |
111 | return 'Web Page'; |
112 | default: |
113 | return 'Generic'; |
114 | } |
115 | } |
116 | } |