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 | |
---|
49 | public Category() { |
---|
50 | categoriesFilles = new ArrayList<Category>(); |
---|
51 | categoriesMeres = new ArrayList<Category>(); |
---|
52 | } |
---|
53 | |
---|
54 | @Override |
---|
55 | public String toString() { |
---|
56 | return nom; |
---|
57 | } |
---|
58 | |
---|
59 | /** |
---|
60 | * @return the idCategoriesMeres |
---|
61 | */ |
---|
62 | public ArrayList<Integer> getIdCategoriesMeres() { |
---|
63 | return idCategoriesMeres; |
---|
64 | } |
---|
65 | |
---|
66 | /** |
---|
67 | * @param idCategoriesMeres the idCategoriesMeres to set |
---|
68 | */ |
---|
69 | public void setIdCategoriesMeres(ArrayList<Integer> idCategoriesMeres) { |
---|
70 | this.idCategoriesMeres = idCategoriesMeres; |
---|
71 | } |
---|
72 | |
---|
73 | /** |
---|
74 | * @return the identifiant |
---|
75 | */ |
---|
76 | public Integer getIdentifiant() { |
---|
77 | return identifiant; |
---|
78 | } |
---|
79 | |
---|
80 | /** |
---|
81 | * @param identifiant the identifiant to set |
---|
82 | */ |
---|
83 | public void setIdentifiant(Integer identifiant) { |
---|
84 | this.identifiant = identifiant; |
---|
85 | } |
---|
86 | |
---|
87 | /** |
---|
88 | * @return the urlCategory |
---|
89 | */ |
---|
90 | public String getUrlCategory() { |
---|
91 | return urlCategory; |
---|
92 | } |
---|
93 | |
---|
94 | /** |
---|
95 | * @param urlCategory the urlCategory to set |
---|
96 | */ |
---|
97 | public void setUrlCategory(String urlCategory) { |
---|
98 | this.urlCategory = urlCategory; |
---|
99 | } |
---|
100 | |
---|
101 | /** |
---|
102 | * @return the nbImages |
---|
103 | */ |
---|
104 | public Integer getNbImages() { |
---|
105 | return nbImages; |
---|
106 | } |
---|
107 | |
---|
108 | /** |
---|
109 | * @param nbImages the nbImages to set |
---|
110 | */ |
---|
111 | public void setNbImages(Integer nbImages) { |
---|
112 | this.nbImages = nbImages; |
---|
113 | } |
---|
114 | |
---|
115 | /** |
---|
116 | * @return the nbTotalImages |
---|
117 | */ |
---|
118 | public Integer getNbTotalImages() { |
---|
119 | return nbTotalImages; |
---|
120 | } |
---|
121 | |
---|
122 | /** |
---|
123 | * @param nbTotalImages the nbTotalImages to set |
---|
124 | */ |
---|
125 | public void setNbTotalImages(Integer nbTotalImages) { |
---|
126 | this.nbTotalImages = nbTotalImages; |
---|
127 | } |
---|
128 | |
---|
129 | /** |
---|
130 | * @return the categoriesFilles |
---|
131 | */ |
---|
132 | public ArrayList<Category> getCategoriesFilles() { |
---|
133 | return categoriesFilles; |
---|
134 | } |
---|
135 | |
---|
136 | /** |
---|
137 | * @param categoriesFilles the categoriesFilles to set |
---|
138 | */ |
---|
139 | public void setCategoriesFilles(ArrayList<Category> categoriesFilles) { |
---|
140 | this.categoriesFilles = categoriesFilles; |
---|
141 | } |
---|
142 | |
---|
143 | /** |
---|
144 | * @return the categoriesMeres |
---|
145 | */ |
---|
146 | public ArrayList<Category> getCategoriesMeres() { |
---|
147 | return categoriesMeres; |
---|
148 | } |
---|
149 | |
---|
150 | /** |
---|
151 | * @param categoriesMeres the categoriesMeres to set |
---|
152 | */ |
---|
153 | public void setCategoriesMeres(ArrayList<Category> categoriesMeres) { |
---|
154 | this.categoriesMeres = categoriesMeres; |
---|
155 | } |
---|
156 | |
---|
157 | /** |
---|
158 | * @return the nom |
---|
159 | */ |
---|
160 | public String getNom() { |
---|
161 | return nom; |
---|
162 | } |
---|
163 | |
---|
164 | /** |
---|
165 | * @param nom the nom to set |
---|
166 | */ |
---|
167 | public void setNom(String nom) { |
---|
168 | this.nom = nom; |
---|
169 | } |
---|
170 | |
---|
171 | /** |
---|
172 | * @return the element |
---|
173 | */ |
---|
174 | public Element getElement() { |
---|
175 | return element; |
---|
176 | } |
---|
177 | |
---|
178 | /** |
---|
179 | * @param element the element to set |
---|
180 | */ |
---|
181 | public void setElement(Element element) { |
---|
182 | this.element = element; |
---|
183 | } |
---|
184 | |
---|
185 | /** |
---|
186 | * @return the parentDirect |
---|
187 | */ |
---|
188 | public Integer getParentDirect() { |
---|
189 | return parentDirect; |
---|
190 | } |
---|
191 | |
---|
192 | /** |
---|
193 | * @param parentDirect the parentDirect to set |
---|
194 | */ |
---|
195 | public void setParentDirect(Integer parentDirect) { |
---|
196 | this.parentDirect = parentDirect; |
---|
197 | } |
---|
198 | |
---|
199 | } |
---|