KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportdefinitions > DimensionProperty


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4  * Schema.
5  * $Id$
6  */

7
8 package com.calipso.reportgenerator.reportdefinitions;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType;
15 import com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType;
16 import java.io.IOException JavaDoc;
17 import java.io.Reader JavaDoc;
18 import java.io.Serializable JavaDoc;
19 import java.io.Writer JavaDoc;
20 import java.util.Enumeration JavaDoc;
21 import java.util.Vector JavaDoc;
22 import org.exolab.castor.xml.MarshalException;
23 import org.exolab.castor.xml.Marshaller;
24 import org.exolab.castor.xml.Unmarshaller;
25 import org.exolab.castor.xml.ValidationException;
26 import org.xml.sax.ContentHandler JavaDoc;
27
28 /**
29  * Class DimensionProperty.
30  *
31  * @version $Revision$ $Date$
32  */

33 public class DimensionProperty implements java.io.Serializable JavaDoc {
34
35
36       //--------------------------/
37
//- Class/Member Variables -/
38
//--------------------------/
39

40     /**
41      * Field _dimensionName
42      */

43     private java.lang.String JavaDoc _dimensionName;
44
45     /**
46      * Field _width
47      */

48     private int _width;
49
50     /**
51      * keeps track of state for field: _width
52      */

53     private boolean _has_width;
54
55     /**
56      * Field _location
57      */

58     private com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType _location;
59
60     /**
61      * Field _order
62      */

63     private com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType _order;
64
65     /**
66      * Field _ubication
67      */

68     private int _ubication;
69
70     /**
71      * keeps track of state for field: _ubication
72      */

73     private boolean _has_ubication;
74
75     /**
76      * Field _rankMetricName
77      */

78     private java.lang.String JavaDoc _rankMetricName;
79
80     /**
81      * Field _excludeValueList
82      */

83     private java.util.Vector JavaDoc _excludeValueList;
84
85
86       //----------------/
87
//- Constructors -/
88
//----------------/
89

90     public DimensionProperty() {
91         super();
92         _excludeValueList = new Vector JavaDoc();
93     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionProperty()
94

95
96       //-----------/
97
//- Methods -/
98
//-----------/
99

100     /**
101      * Method addExcludeValue
102      *
103      * @param vExcludeValue
104      */

105     public void addExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
106         throws java.lang.IndexOutOfBoundsException JavaDoc
107     {
108         _excludeValueList.addElement(vExcludeValue);
109     } //-- void addExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
110

111     /**
112      * Method addExcludeValue
113      *
114      * @param index
115      * @param vExcludeValue
116      */

117     public void addExcludeValue(int index, com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
118         throws java.lang.IndexOutOfBoundsException JavaDoc
119     {
120         _excludeValueList.insertElementAt(vExcludeValue, index);
121     } //-- void addExcludeValue(int, com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
122

123     /**
124      * Method deleteUbication
125      */

126     public void deleteUbication()
127     {
128         this._has_ubication= false;
129     } //-- void deleteUbication()
130

131     /**
132      * Method deleteWidth
133      */

134     public void deleteWidth()
135     {
136         this._has_width= false;
137     } //-- void deleteWidth()
138

139     /**
140      * Method enumerateExcludeValue
141      */

142     public java.util.Enumeration JavaDoc enumerateExcludeValue()
143     {
144         return _excludeValueList.elements();
145     } //-- java.util.Enumeration enumerateExcludeValue()
146

147     /**
148      * Method getDimensionNameReturns the value of field
149      * 'dimensionName'.
150      *
151      * @return the value of field 'dimensionName'.
152      */

153     public java.lang.String JavaDoc getDimensionName()
154     {
155         return this._dimensionName;
156     } //-- java.lang.String getDimensionName()
157

158     /**
159      * Method getExcludeValue
160      *
161      * @param index
162      */

163     public com.calipso.reportgenerator.reportdefinitions.ExcludeValue getExcludeValue(int index)
164         throws java.lang.IndexOutOfBoundsException JavaDoc
165     {
166         //-- check bounds for index
167
if ((index < 0) || (index > _excludeValueList.size())) {
168             throw new IndexOutOfBoundsException JavaDoc();
169         }
170         
171         return (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) _excludeValueList.elementAt(index);
172     } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue getExcludeValue(int)
173

174     /**
175      * Method getExcludeValue
176      */

177     public com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] getExcludeValue()
178     {
179         int size = _excludeValueList.size();
180         com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] mArray = new com.calipso.reportgenerator.reportdefinitions.ExcludeValue[size];
181         for (int index = 0; index < size; index++) {
182             mArray[index] = (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) _excludeValueList.elementAt(index);
183         }
184         return mArray;
185     } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] getExcludeValue()
186

187     /**
188      * Method getExcludeValueCount
189      */

190     public int getExcludeValueCount()
191     {
192         return _excludeValueList.size();
193     } //-- int getExcludeValueCount()
194

195     /**
196      * Method getLocationReturns the value of field 'location'.
197      *
198      * @return the value of field 'location'.
199      */

200     public com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType getLocation()
201     {
202         return this._location;
203     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType getLocation()
204

205     /**
206      * Method getOrderReturns the value of field 'order'.
207      *
208      * @return the value of field 'order'.
209      */

210     public com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType getOrder()
211     {
212         return this._order;
213     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType getOrder()
214

215     /**
216      * Method getRankMetricNameReturns the value of field
217      * 'rankMetricName'.
218      *
219      * @return the value of field 'rankMetricName'.
220      */

221     public java.lang.String JavaDoc getRankMetricName()
222     {
223         return this._rankMetricName;
224     } //-- java.lang.String getRankMetricName()
225

226     /**
227      * Method getUbicationReturns the value of field 'ubication'.
228      *
229      * @return the value of field 'ubication'.
230      */

231     public int getUbication()
232     {
233         return this._ubication;
234     } //-- int getUbication()
235

236     /**
237      * Method getWidthReturns the value of field 'width'.
238      *
239      * @return the value of field 'width'.
240      */

241     public int getWidth()
242     {
243         return this._width;
244     } //-- int getWidth()
245

246     /**
247      * Method hasUbication
248      */

249     public boolean hasUbication()
250     {
251         return this._has_ubication;
252     } //-- boolean hasUbication()
253

254     /**
255      * Method hasWidth
256      */

257     public boolean hasWidth()
258     {
259         return this._has_width;
260     } //-- boolean hasWidth()
261

262     /**
263      * Method isValid
264      */

265     public boolean isValid()
266     {
267         try {
268             validate();
269         }
270         catch (org.exolab.castor.xml.ValidationException vex) {
271             return false;
272         }
273         return true;
274     } //-- boolean isValid()
275

276     /**
277      * Method marshal
278      *
279      * @param out
280      */

281     public void marshal(java.io.Writer JavaDoc out)
282         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
283     {
284         
285         Marshaller.marshal(this, out);
286     } //-- void marshal(java.io.Writer)
287

288     /**
289      * Method marshal
290      *
291      * @param handler
292      */

293     public void marshal(org.xml.sax.ContentHandler JavaDoc handler)
294         throws java.io.IOException JavaDoc, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
295     {
296         
297         Marshaller.marshal(this, handler);
298     } //-- void marshal(org.xml.sax.ContentHandler)
299

300     /**
301      * Method removeAllExcludeValue
302      */

303     public void removeAllExcludeValue()
304     {
305         _excludeValueList.removeAllElements();
306     } //-- void removeAllExcludeValue()
307

308     /**
309      * Method removeExcludeValue
310      *
311      * @param index
312      */

313     public com.calipso.reportgenerator.reportdefinitions.ExcludeValue removeExcludeValue(int index)
314     {
315         java.lang.Object JavaDoc obj = _excludeValueList.elementAt(index);
316         _excludeValueList.removeElementAt(index);
317         return (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) obj;
318     } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue removeExcludeValue(int)
319

320     /**
321      * Method setDimensionNameSets the value of field
322      * 'dimensionName'.
323      *
324      * @param dimensionName the value of field 'dimensionName'.
325      */

326     public void setDimensionName(java.lang.String JavaDoc dimensionName)
327     {
328         this._dimensionName = dimensionName;
329     } //-- void setDimensionName(java.lang.String)
330

331     /**
332      * Method setExcludeValue
333      *
334      * @param index
335      * @param vExcludeValue
336      */

337     public void setExcludeValue(int index, com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
338         throws java.lang.IndexOutOfBoundsException JavaDoc
339     {
340         //-- check bounds for index
341
if ((index < 0) || (index > _excludeValueList.size())) {
342             throw new IndexOutOfBoundsException JavaDoc();
343         }
344         _excludeValueList.setElementAt(vExcludeValue, index);
345     } //-- void setExcludeValue(int, com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
346

347     /**
348      * Method setExcludeValue
349      *
350      * @param excludeValueArray
351      */

352     public void setExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] excludeValueArray)
353     {
354         //-- copy array
355
_excludeValueList.removeAllElements();
356         for (int i = 0; i < excludeValueArray.length; i++) {
357             _excludeValueList.addElement(excludeValueArray[i]);
358         }
359     } //-- void setExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
360

361     /**
362      * Method setLocationSets the value of field 'location'.
363      *
364      * @param location the value of field 'location'.
365      */

366     public void setLocation(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType location)
367     {
368         this._location = location;
369     } //-- void setLocation(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType)
370

371     /**
372      * Method setOrderSets the value of field 'order'.
373      *
374      * @param order the value of field 'order'.
375      */

376     public void setOrder(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType order)
377     {
378         this._order = order;
379     } //-- void setOrder(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType)
380

381     /**
382      * Method setRankMetricNameSets the value of field
383      * 'rankMetricName'.
384      *
385      * @param rankMetricName the value of field 'rankMetricName'.
386      */

387     public void setRankMetricName(java.lang.String JavaDoc rankMetricName)
388     {
389         this._rankMetricName = rankMetricName;
390     } //-- void setRankMetricName(java.lang.String)
391

392     /**
393      * Method setUbicationSets the value of field 'ubication'.
394      *
395      * @param ubication the value of field 'ubication'.
396      */

397     public void setUbication(int ubication)
398     {
399         this._ubication = ubication;
400         this._has_ubication = true;
401     } //-- void setUbication(int)
402

403     /**
404      * Method setWidthSets the value of field 'width'.
405      *
406      * @param width the value of field 'width'.
407      */

408     public void setWidth(int width)
409     {
410         this._width = width;
411         this._has_width = true;
412     } //-- void setWidth(int)
413

414     /**
415      * Method unmarshal
416      *
417      * @param reader
418      */

419     public static com.calipso.reportgenerator.reportdefinitions.DimensionProperty unmarshal(java.io.Reader JavaDoc reader)
420         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
421     {
422         return (com.calipso.reportgenerator.reportdefinitions.DimensionProperty) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.DimensionProperty.class, reader);
423     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionProperty unmarshal(java.io.Reader)
424

425     /**
426      * Method validate
427      */

428     public void validate()
429         throws org.exolab.castor.xml.ValidationException
430     {
431         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
432         validator.validate(this);
433     } //-- void validate()
434

435 }
436
Popular Tags