1 | package fr.mael.jiwigo.om; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | |
---|
5 | import org.jdom.Element; |
---|
6 | |
---|
7 | /** |
---|
8 | Copyright (c) 2010, Mael |
---|
9 | All rights reserved. |
---|
10 | |
---|
11 | Redistribution and use in source and binary forms, with or without |
---|
12 | modification, are permitted provided that the following conditions are met: |
---|
13 | * Redistributions of source code must retain the above copyright |
---|
14 | notice, this list of conditions and the following disclaimer. |
---|
15 | * Redistributions in binary form must reproduce the above copyright |
---|
16 | notice, this list of conditions and the following disclaimer in the |
---|
17 | documentation and/or other materials provided with the distribution. |
---|
18 | * Neither the name of jiwigo nor the |
---|
19 | names of its contributors may be used to endorse or promote products |
---|
20 | derived from this software without specific prior written permission. |
---|
21 | |
---|
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
---|
23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
---|
24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
---|
25 | DISCLAIMED. IN NO EVENT SHALL Mael BE LIABLE FOR ANY |
---|
26 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
---|
27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
---|
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
---|
29 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
---|
30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
---|
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
32 | |
---|
33 | * @author mael |
---|
34 | * |
---|
35 | */ |
---|
36 | public class Category { |
---|
37 | |
---|
38 | private ArrayList<Integer> idCategoriesMeres; |
---|
39 | private Integer identifiant; |
---|
40 | private String urlCategory; |
---|
41 | private Integer nbImages; |
---|
42 | private Integer nbTotalImages; |
---|
43 | private ArrayList<Category> categoriesFilles; |
---|
44 | private ArrayList<Category> categoriesMeres; |
---|
45 | private String nom; |
---|
46 | private Element element; |
---|
47 | private Integer parentDirect; |
---|
48 | private Integer level; |
---|
49 | |
---|
50 | public Category() { |
---|
51 | categoriesFilles = new ArrayList<Category>(); |
---|
52 | categoriesMeres = new ArrayList<Category>(); |
---|
53 | } |
---|
54 | |
---|
55 | @Override |
---|
56 | public String toString() { |
---|
57 | return nom; |
---|
58 | } |
---|
59 | |
---|
60 | /** |
---|
61 | * @return the idCategoriesMeres |
---|
62 | */ |
---|
63 | public ArrayList<Integer> getIdCategoriesMeres() { |
---|
64 | return idCategoriesMeres; |
---|
65 | } |
---|
66 | |
---|
67 | /** |
---|
68 | * @param idCategoriesMeres the idCategoriesMeres to set |
---|
69 | */ |
---|
70 | public void setIdCategoriesMeres(ArrayList<Integer> idCategoriesMeres) { |
---|
71 | this.idCategoriesMeres = idCategoriesMeres; |
---|
72 | } |
---|
73 | |
---|
74 | /** |
---|
75 | * @return the identifiant |
---|
76 | */ |
---|
77 | public Integer getIdentifiant() { |
---|
78 | return identifiant; |
---|
79 | } |
---|
80 | |
---|
81 | /** |
---|
82 | * @param identifiant the identifiant to set |
---|
83 | */ |
---|
84 | public void setIdentifiant(Integer identifiant) { |
---|
85 | this.identifiant = identifiant; |
---|
86 | } |
---|
87 | |
---|
88 | /** |
---|
89 | * @return the urlCategory |
---|
90 | */ |
---|
91 | public String getUrlCategory() { |
---|
92 | return urlCategory; |
---|
93 | } |
---|
94 | |
---|
95 | /** |
---|
96 | * @param urlCategory the urlCategory to set |
---|
97 | */ |
---|
98 | public void setUrlCategory(String urlCategory) { |
---|
99 | this.urlCategory = urlCategory; |
---|
100 | } |
---|
101 | |
---|
102 | /** |
---|
103 | * @return the nbImages |
---|
104 | */ |
---|
105 | public Integer getNbImages() { |
---|
106 | return nbImages; |
---|
107 | } |
---|
108 | |
---|
109 | /** |
---|
110 | * @param nbImages the nbImages to set |
---|
111 | */ |
---|
112 | public void setNbImages(Integer nbImages) { |
---|
113 | this.nbImages = nbImages; |
---|
114 | } |
---|
115 | |
---|
116 | /** |
---|
117 | * @return the nbTotalImages |
---|
118 | */ |
---|
119 | public Integer getNbTotalImages() { |
---|
120 | return nbTotalImages; |
---|
121 | } |
---|
122 | |
---|
123 | /** |
---|
124 | * @param nbTotalImages the nbTotalImages to set |
---|
125 | */ |
---|
126 | public void setNbTotalImages(Integer nbTotalImages) { |
---|
127 | this.nbTotalImages = nbTotalImages; |
---|
128 | } |
---|
129 | |
---|
130 | /** |
---|
131 | * @return the categoriesFilles |
---|
132 | */ |
---|
133 | public ArrayList<Category> getCategoriesFilles() { |
---|
134 | return categoriesFilles; |
---|
135 | } |
---|
136 | |
---|
137 | /** |
---|
138 | * @param categoriesFilles the categoriesFilles to set |
---|
139 | */ |
---|
140 | public void setCategoriesFilles(ArrayList<Category> categoriesFilles) { |
---|
141 | this.categoriesFilles = categoriesFilles; |
---|
142 | } |
---|
143 | |
---|
144 | /** |
---|
145 | * @return the categoriesMeres |
---|
146 | */ |
---|
147 | public ArrayList<Category> getCategoriesMeres() { |
---|
148 | return categoriesMeres; |
---|
149 | } |
---|
150 | |
---|
151 | /** |
---|
152 | * @param categoriesMeres the categoriesMeres to set |
---|
153 | */ |
---|
154 | public void setCategoriesMeres(ArrayList<Category> categoriesMeres) { |
---|
155 | this.categoriesMeres = categoriesMeres; |
---|
156 | } |
---|
157 | |
---|
158 | /** |
---|
159 | * @return the nom |
---|
160 | */ |
---|
161 | public String getNom() { |
---|
162 | return nom; |
---|
163 | } |
---|
164 | |
---|
165 | /** |
---|
166 | * @param nom the nom to set |
---|
167 | */ |
---|
168 | public void setNom(String nom) { |
---|
169 | this.nom = nom; |
---|
170 | } |
---|
171 | |
---|
172 | /** |
---|
173 | * @return the element |
---|
174 | */ |
---|
175 | public Element getElement() { |
---|
176 | return element; |
---|
177 | } |
---|
178 | |
---|
179 | /** |
---|
180 | * @param element the element to set |
---|
181 | */ |
---|
182 | public void setElement(Element element) { |
---|
183 | this.element = element; |
---|
184 | } |
---|
185 | |
---|
186 | /** |
---|
187 | * @return the parentDirect |
---|
188 | */ |
---|
189 | public Integer getParentDirect() { |
---|
190 | return parentDirect; |
---|
191 | } |
---|
192 | |
---|
193 | /** |
---|
194 | * @param parentDirect the parentDirect to set |
---|
195 | */ |
---|
196 | public void setParentDirect(Integer parentDirect) { |
---|
197 | this.parentDirect = parentDirect; |
---|
198 | } |
---|
199 | |
---|
200 | public Integer getLevel() { |
---|
201 | return level; |
---|
202 | } |
---|
203 | |
---|
204 | public void setLevel(Integer level) { |
---|
205 | this.level = level; |
---|
206 | } |
---|
207 | |
---|
208 | } |
---|