|
1 <?php |
|
2 /* |
|
3 * This file is part of the WikiTagBundle package. |
|
4 * |
|
5 * (c) IRI <http://www.iri.centrepompidou.fr/> |
|
6 * |
|
7 * For the full copyright and license information, please view the LICENSE |
|
8 * file that was distributed with this source code. |
|
9 */ |
|
10 |
|
11 namespace IRI\Bundle\WikiTagBundle\Model; |
|
12 |
|
13 abstract class DocumentTag implements DocumentTagInterface { |
|
14 |
|
15 /** |
|
16 * @var integer $id |
|
17 */ |
|
18 protected $id; |
|
19 |
|
20 /** |
|
21 * @var integer $originalOrder |
|
22 */ |
|
23 protected $originalOrder; |
|
24 |
|
25 /** |
|
26 * @var integer $tagOrder |
|
27 */ |
|
28 protected $tagOrder; |
|
29 |
|
30 /** |
|
31 * @var float $indexNote |
|
32 */ |
|
33 protected $indexNote = 0.0; |
|
34 |
|
35 /** |
|
36 * @var bigint $wikipediaRevisionId |
|
37 */ |
|
38 protected $wikipediaRevisionId; |
|
39 |
|
40 /** |
|
41 * @var object $tag |
|
42 */ |
|
43 protected $tag; |
|
44 |
|
45 /** |
|
46 * @var object $document |
|
47 */ |
|
48 protected $document; |
|
49 |
|
50 |
|
51 /** |
|
52 * Get id |
|
53 * |
|
54 * @return integer |
|
55 */ |
|
56 public function getId() |
|
57 { |
|
58 return $this->id; |
|
59 } |
|
60 |
|
61 /** |
|
62 * Set originalOrder |
|
63 * |
|
64 * @param integer $originalOrder |
|
65 */ |
|
66 public function setOriginalOrder($originalOrder) |
|
67 { |
|
68 $this->originalOrder = $originalOrder; |
|
69 } |
|
70 |
|
71 /** |
|
72 * Get originalOrder |
|
73 * |
|
74 * @return integer |
|
75 */ |
|
76 public function getOriginalOrder() |
|
77 { |
|
78 return $this->originalOrder; |
|
79 } |
|
80 |
|
81 /** |
|
82 * Set tagOrder |
|
83 * |
|
84 * @param integer $tagOrder |
|
85 */ |
|
86 public function setTagOrder($tagOrder) |
|
87 { |
|
88 $this->tagOrder = $tagOrder; |
|
89 } |
|
90 |
|
91 /** |
|
92 * Get tagOrder |
|
93 * |
|
94 * @return integer |
|
95 */ |
|
96 public function getTagOrder() |
|
97 { |
|
98 return $this->tagOrder; |
|
99 } |
|
100 |
|
101 /** |
|
102 * Set indexNote |
|
103 * |
|
104 * @param float $indexNote |
|
105 */ |
|
106 public function setIndexNote($indexNote) |
|
107 { |
|
108 $this->indexNote = $indexNote; |
|
109 } |
|
110 |
|
111 /** |
|
112 * Get indexNote |
|
113 * |
|
114 * @return float |
|
115 */ |
|
116 public function getIndexNote() |
|
117 { |
|
118 return $this->indexNote; |
|
119 } |
|
120 |
|
121 /** |
|
122 * Set wikipediaRevisionId |
|
123 * |
|
124 * @param bigint $wikipediaRevisionId |
|
125 */ |
|
126 public function setWikipediaRevisionId($wikipediaRevisionId) |
|
127 { |
|
128 $this->wikipediaRevisionId = $wikipediaRevisionId; |
|
129 } |
|
130 |
|
131 /** |
|
132 * Get wikipediaRevisionId |
|
133 * |
|
134 * @return bigint |
|
135 */ |
|
136 public function getWikipediaRevisionId() |
|
137 { |
|
138 return $this->wikipediaRevisionId; |
|
139 } |
|
140 |
|
141 /** |
|
142 * Set tag |
|
143 * |
|
144 * @param object $tag |
|
145 */ |
|
146 public function setTag($tag) |
|
147 { |
|
148 $this->tag = $tag; |
|
149 } |
|
150 |
|
151 /** |
|
152 * Get tag |
|
153 * |
|
154 * @return object |
|
155 */ |
|
156 public function getTag() |
|
157 { |
|
158 return $this->tag; |
|
159 } |
|
160 |
|
161 /** |
|
162 * Set document |
|
163 * |
|
164 * @param object $document |
|
165 */ |
|
166 public function setDocument($document) |
|
167 { |
|
168 $this->document = $document; |
|
169 } |
|
170 |
|
171 /** |
|
172 * Get document |
|
173 * |
|
174 * @return object |
|
175 */ |
|
176 public function getDocument() |
|
177 { |
|
178 return $this->document; |
|
179 } |
|
180 |
|
181 /** |
|
182 * Get wikipedia_version_permalink |
|
183 * |
|
184 * @return string |
|
185 */ |
|
186 public function getWikipediaVersionPermalink() |
|
187 { |
|
188 $WIKIPEDIA_VERSION_PERMALINK_TEMPLATE = "http://fr.wikipedia.org/w/index.php?oldid="; |
|
189 return $WIKIPEDIA_VERSION_PERMALINK_TEMPLATE.$this->wikipediaRevisionId; |
|
190 } |
|
191 |
|
192 } |