| author | ymh <ymh.work@gmail.com> |
| Fri, 09 Dec 2011 06:43:49 +0100 | |
| changeset 62 | 10be6b9e55e7 |
| parent 42 | 0e57c730bb18 |
| child 83 | e9f04298bdfa |
| permissions | -rwxr-xr-x |
| 2 | 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 |
||
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
14 |
use Doctrine\Common\Collections\ArrayCollection; |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
15 |
|
| 2 | 16 |
interface TagInterface { |
17 |
||
18 |
/** |
|
19 |
* Get id |
|
20 |
* |
|
21 |
* @return integer |
|
22 |
*/ |
|
23 |
function getId(); |
|
24 |
||
25 |
/** |
|
26 |
* Set label |
|
27 |
* |
|
28 |
* @param string $label |
|
29 |
*/ |
|
30 |
function setLabel($label); |
|
31 |
||
32 |
/** |
|
33 |
* Get label |
|
34 |
* |
|
35 |
* @return string |
|
36 |
*/ |
|
37 |
function getLabel(); |
|
38 |
||
39 |
/** |
|
40 |
* Set normalizedLabel |
|
41 |
* |
|
42 |
* @param string $normalizedLabel |
|
43 |
*/ |
|
44 |
function setNormalizedLabel($normalizedLabel); |
|
45 |
||
46 |
/** |
|
47 |
* Get normalizedLabel |
|
48 |
* |
|
49 |
* @return string |
|
50 |
*/ |
|
51 |
function getNormalizedLabel(); |
|
52 |
||
53 |
/** |
|
54 |
* Set originalLabel |
|
55 |
* |
|
56 |
* @param string $originalLabel |
|
57 |
*/ |
|
58 |
function setOriginalLabel($originalLabel); |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
59 |
|
| 2 | 60 |
/** |
61 |
* Get originalLabel |
|
62 |
* |
|
63 |
* @return string |
|
64 |
*/ |
|
65 |
function getOriginalLabel(); |
|
66 |
||
67 |
/** |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
68 |
* Set the alternative label |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
69 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
70 |
* @param string $alternativeLabel |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
71 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
72 |
function setAlternativeLabel($alternativeLabel); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
73 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
74 |
/** |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
75 |
* Get the alternative label. |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
76 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
77 |
* @return string |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
78 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
79 |
function getAlternativeLabel(); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
80 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
81 |
/** |
| 2 | 82 |
* Set alias |
83 |
* |
|
84 |
* @param string $alias |
|
85 |
*/ |
|
86 |
function setAlias($alias); |
|
87 |
||
88 |
/** |
|
89 |
* Get alias |
|
90 |
* |
|
91 |
* @return string |
|
92 |
*/ |
|
93 |
function getAlias(); |
|
94 |
||
95 |
/** |
|
96 |
* Set wikipediaUrl |
|
97 |
* |
|
98 |
* @param string $wikipediaUrl |
|
99 |
*/ |
|
100 |
function setWikipediaUrl($wikipediaUrl); |
|
101 |
||
102 |
/** |
|
103 |
* Get wikipediaUrl |
|
104 |
* |
|
105 |
* @return string |
|
106 |
*/ |
|
107 |
function getWikipediaUrl(); |
|
108 |
||
109 |
/** |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
110 |
* Set alternativeWikipediaUrl |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
111 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
112 |
* @param string $alternativeWikipediaUrl |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
113 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
114 |
function setAlternativeWikipediaUrl($alternativeWikipediaUrl); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
115 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
116 |
/** |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
117 |
* Get alternativeWikipediaUrl |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
118 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
119 |
* @return string |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
120 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
121 |
function getAlternativeWikipediaUrl(); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
122 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
123 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
124 |
/** |
| 2 | 125 |
* Set wikipediaPageId |
126 |
* |
|
127 |
* @param bigint $wikipediaPageId |
|
128 |
*/ |
|
129 |
function setWikipediaPageId($wikipediaPageId); |
|
130 |
||
131 |
/** |
|
132 |
* Get wikipediaPageId |
|
133 |
* |
|
134 |
* @return bigint |
|
135 |
*/ |
|
136 |
function getWikipediaPageId(); |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
137 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
138 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
139 |
/** |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
140 |
* Set aletrnativeWikipediaPageId |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
141 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
142 |
* @param bigint $alternativeWikipediaPageId |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
143 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
144 |
function setAlternativeWikipediaPageId($alternativeWikipediaPageId); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
145 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
146 |
/** |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
147 |
* Get alternativeWikipediaPageId |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
148 |
* |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
149 |
* @return bigint |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
150 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
151 |
function getAlternativeWikipediaPageId(); |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
152 |
|
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
153 |
|
| 2 | 154 |
|
155 |
/** |
|
156 |
* Set urlStatus |
|
157 |
* |
|
158 |
* @param smallint $urlStatus |
|
159 |
*/ |
|
160 |
function setUrlStatus($urlStatus); |
|
161 |
||
162 |
/** |
|
163 |
* Get urlStatus |
|
164 |
* |
|
165 |
* @return smallint |
|
166 |
*/ |
|
167 |
function getUrlStatus(); |
|
168 |
||
169 |
/** |
|
|
5
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
170 |
* Get UrlStatusText |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
171 |
* |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
172 |
* @return string |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
173 |
*/ |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
174 |
function getUrlStatusText(); |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
175 |
|
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
176 |
|
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
177 |
/** |
| 2 | 178 |
* Set dbpediaUri |
179 |
* |
|
180 |
* @param string $dbpediaUri |
|
181 |
*/ |
|
182 |
function setDbpediaUri($dbpediaUri); |
|
183 |
||
184 |
/** |
|
185 |
* Get dbpediaUri |
|
186 |
* |
|
187 |
* @return string |
|
188 |
*/ |
|
189 |
function getDbpediaUri(); |
|
190 |
||
191 |
/** |
|
192 |
* Set popularity |
|
193 |
* |
|
194 |
* @param integer $popularity |
|
195 |
*/ |
|
196 |
function setPopularity($popularity); |
|
197 |
||
198 |
/** |
|
199 |
* Get popularity |
|
200 |
* |
|
201 |
* @return integer |
|
202 |
*/ |
|
203 |
function getPopularity(); |
|
204 |
||
|
5
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
205 |
|
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
206 |
/** |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
207 |
* Set category |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
208 |
* |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
209 |
* @param object $category |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
210 |
*/ |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
211 |
function setCategory($category); |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
212 |
|
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
213 |
/** |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
214 |
* Get category |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
215 |
* |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
216 |
* @return object |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
217 |
*/ |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
218 |
function getCategory(); |
|
45378793512a
Correct tag insert + external id on doc
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
219 |
|
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
220 |
/** |
|
62
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
221 |
* return the utc time when this tag has been created |
|
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
222 |
*/ |
|
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
223 |
function getCreatedAt(); |
|
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
224 |
|
|
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
225 |
/** |
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
226 |
* Get Documents |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
227 |
* |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
228 |
* @return ArrayCollection |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
229 |
*/ |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
230 |
function getDocuments(); |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
231 |
|
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
232 |
/** |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
233 |
* Nullify category |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
234 |
* |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
235 |
*/ |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
236 |
function nullCategory(); |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
5
diff
changeset
|
237 |
|
| 2 | 238 |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
239 |
/** |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
240 |
* Set wikipedia info. |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
241 |
* @param $wikipedia_info |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
242 |
*/ |
|
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
243 |
function setWikipediaInfo($wikipedia_info); |
|
62
10be6b9e55e7
add creation timestamp on document tag and document tag
ymh <ymh.work@gmail.com>
parents:
42
diff
changeset
|
244 |
|
|
42
0e57c730bb18
Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
245 |
|
| 2 | 246 |
} |