001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType;
015: import com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType;
016: import java.io.IOException;
017: import java.io.Reader;
018: import java.io.Serializable;
019: import java.io.Writer;
020: import java.util.Enumeration;
021: import java.util.Vector;
022: import org.exolab.castor.xml.MarshalException;
023: import org.exolab.castor.xml.Marshaller;
024: import org.exolab.castor.xml.Unmarshaller;
025: import org.exolab.castor.xml.ValidationException;
026: import org.xml.sax.ContentHandler;
027:
028: /**
029: * Class DimensionProperty.
030: *
031: * @version $Revision$ $Date$
032: */
033: public class DimensionProperty implements java.io.Serializable {
034:
035: //--------------------------/
036: //- Class/Member Variables -/
037: //--------------------------/
038:
039: /**
040: * Field _dimensionName
041: */
042: private java.lang.String _dimensionName;
043:
044: /**
045: * Field _width
046: */
047: private int _width;
048:
049: /**
050: * keeps track of state for field: _width
051: */
052: private boolean _has_width;
053:
054: /**
055: * Field _location
056: */
057: private com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType _location;
058:
059: /**
060: * Field _order
061: */
062: private com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType _order;
063:
064: /**
065: * Field _ubication
066: */
067: private int _ubication;
068:
069: /**
070: * keeps track of state for field: _ubication
071: */
072: private boolean _has_ubication;
073:
074: /**
075: * Field _rankMetricName
076: */
077: private java.lang.String _rankMetricName;
078:
079: /**
080: * Field _excludeValueList
081: */
082: private java.util.Vector _excludeValueList;
083:
084: //----------------/
085: //- Constructors -/
086: //----------------/
087:
088: public DimensionProperty() {
089: super ();
090: _excludeValueList = new Vector();
091: } //-- com.calipso.reportgenerator.reportdefinitions.DimensionProperty()
092:
093: //-----------/
094: //- Methods -/
095: //-----------/
096:
097: /**
098: * Method addExcludeValue
099: *
100: * @param vExcludeValue
101: */
102: public void addExcludeValue(
103: com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
104: throws java.lang.IndexOutOfBoundsException {
105: _excludeValueList.addElement(vExcludeValue);
106: } //-- void addExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
107:
108: /**
109: * Method addExcludeValue
110: *
111: * @param index
112: * @param vExcludeValue
113: */
114: public void addExcludeValue(
115: int index,
116: com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
117: throws java.lang.IndexOutOfBoundsException {
118: _excludeValueList.insertElementAt(vExcludeValue, index);
119: } //-- void addExcludeValue(int, com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
120:
121: /**
122: * Method deleteUbication
123: */
124: public void deleteUbication() {
125: this ._has_ubication = false;
126: } //-- void deleteUbication()
127:
128: /**
129: * Method deleteWidth
130: */
131: public void deleteWidth() {
132: this ._has_width = false;
133: } //-- void deleteWidth()
134:
135: /**
136: * Method enumerateExcludeValue
137: */
138: public java.util.Enumeration enumerateExcludeValue() {
139: return _excludeValueList.elements();
140: } //-- java.util.Enumeration enumerateExcludeValue()
141:
142: /**
143: * Method getDimensionNameReturns the value of field
144: * 'dimensionName'.
145: *
146: * @return the value of field 'dimensionName'.
147: */
148: public java.lang.String getDimensionName() {
149: return this ._dimensionName;
150: } //-- java.lang.String getDimensionName()
151:
152: /**
153: * Method getExcludeValue
154: *
155: * @param index
156: */
157: public com.calipso.reportgenerator.reportdefinitions.ExcludeValue getExcludeValue(
158: int index) throws java.lang.IndexOutOfBoundsException {
159: //-- check bounds for index
160: if ((index < 0) || (index > _excludeValueList.size())) {
161: throw new IndexOutOfBoundsException();
162: }
163:
164: return (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) _excludeValueList
165: .elementAt(index);
166: } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue getExcludeValue(int)
167:
168: /**
169: * Method getExcludeValue
170: */
171: public com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] getExcludeValue() {
172: int size = _excludeValueList.size();
173: com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] mArray = new com.calipso.reportgenerator.reportdefinitions.ExcludeValue[size];
174: for (int index = 0; index < size; index++) {
175: mArray[index] = (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) _excludeValueList
176: .elementAt(index);
177: }
178: return mArray;
179: } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] getExcludeValue()
180:
181: /**
182: * Method getExcludeValueCount
183: */
184: public int getExcludeValueCount() {
185: return _excludeValueList.size();
186: } //-- int getExcludeValueCount()
187:
188: /**
189: * Method getLocationReturns the value of field 'location'.
190: *
191: * @return the value of field 'location'.
192: */
193: public com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType getLocation() {
194: return this ._location;
195: } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType getLocation()
196:
197: /**
198: * Method getOrderReturns the value of field 'order'.
199: *
200: * @return the value of field 'order'.
201: */
202: public com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType getOrder() {
203: return this ._order;
204: } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType getOrder()
205:
206: /**
207: * Method getRankMetricNameReturns the value of field
208: * 'rankMetricName'.
209: *
210: * @return the value of field 'rankMetricName'.
211: */
212: public java.lang.String getRankMetricName() {
213: return this ._rankMetricName;
214: } //-- java.lang.String getRankMetricName()
215:
216: /**
217: * Method getUbicationReturns the value of field 'ubication'.
218: *
219: * @return the value of field 'ubication'.
220: */
221: public int getUbication() {
222: return this ._ubication;
223: } //-- int getUbication()
224:
225: /**
226: * Method getWidthReturns the value of field 'width'.
227: *
228: * @return the value of field 'width'.
229: */
230: public int getWidth() {
231: return this ._width;
232: } //-- int getWidth()
233:
234: /**
235: * Method hasUbication
236: */
237: public boolean hasUbication() {
238: return this ._has_ubication;
239: } //-- boolean hasUbication()
240:
241: /**
242: * Method hasWidth
243: */
244: public boolean hasWidth() {
245: return this ._has_width;
246: } //-- boolean hasWidth()
247:
248: /**
249: * Method isValid
250: */
251: public boolean isValid() {
252: try {
253: validate();
254: } catch (org.exolab.castor.xml.ValidationException vex) {
255: return false;
256: }
257: return true;
258: } //-- boolean isValid()
259:
260: /**
261: * Method marshal
262: *
263: * @param out
264: */
265: public void marshal(java.io.Writer out)
266: throws org.exolab.castor.xml.MarshalException,
267: org.exolab.castor.xml.ValidationException {
268:
269: Marshaller.marshal(this , out);
270: } //-- void marshal(java.io.Writer)
271:
272: /**
273: * Method marshal
274: *
275: * @param handler
276: */
277: public void marshal(org.xml.sax.ContentHandler handler)
278: throws java.io.IOException,
279: org.exolab.castor.xml.MarshalException,
280: org.exolab.castor.xml.ValidationException {
281:
282: Marshaller.marshal(this , handler);
283: } //-- void marshal(org.xml.sax.ContentHandler)
284:
285: /**
286: * Method removeAllExcludeValue
287: */
288: public void removeAllExcludeValue() {
289: _excludeValueList.removeAllElements();
290: } //-- void removeAllExcludeValue()
291:
292: /**
293: * Method removeExcludeValue
294: *
295: * @param index
296: */
297: public com.calipso.reportgenerator.reportdefinitions.ExcludeValue removeExcludeValue(
298: int index) {
299: java.lang.Object obj = _excludeValueList.elementAt(index);
300: _excludeValueList.removeElementAt(index);
301: return (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) obj;
302: } //-- com.calipso.reportgenerator.reportdefinitions.ExcludeValue removeExcludeValue(int)
303:
304: /**
305: * Method setDimensionNameSets the value of field
306: * 'dimensionName'.
307: *
308: * @param dimensionName the value of field 'dimensionName'.
309: */
310: public void setDimensionName(java.lang.String dimensionName) {
311: this ._dimensionName = dimensionName;
312: } //-- void setDimensionName(java.lang.String)
313:
314: /**
315: * Method setExcludeValue
316: *
317: * @param index
318: * @param vExcludeValue
319: */
320: public void setExcludeValue(
321: int index,
322: com.calipso.reportgenerator.reportdefinitions.ExcludeValue vExcludeValue)
323: throws java.lang.IndexOutOfBoundsException {
324: //-- check bounds for index
325: if ((index < 0) || (index > _excludeValueList.size())) {
326: throw new IndexOutOfBoundsException();
327: }
328: _excludeValueList.setElementAt(vExcludeValue, index);
329: } //-- void setExcludeValue(int, com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
330:
331: /**
332: * Method setExcludeValue
333: *
334: * @param excludeValueArray
335: */
336: public void setExcludeValue(
337: com.calipso.reportgenerator.reportdefinitions.ExcludeValue[] excludeValueArray) {
338: //-- copy array
339: _excludeValueList.removeAllElements();
340: for (int i = 0; i < excludeValueArray.length; i++) {
341: _excludeValueList.addElement(excludeValueArray[i]);
342: }
343: } //-- void setExcludeValue(com.calipso.reportgenerator.reportdefinitions.ExcludeValue)
344:
345: /**
346: * Method setLocationSets the value of field 'location'.
347: *
348: * @param location the value of field 'location'.
349: */
350: public void setLocation(
351: com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType location) {
352: this ._location = location;
353: } //-- void setLocation(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType)
354:
355: /**
356: * Method setOrderSets the value of field 'order'.
357: *
358: * @param order the value of field 'order'.
359: */
360: public void setOrder(
361: com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType order) {
362: this ._order = order;
363: } //-- void setOrder(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType)
364:
365: /**
366: * Method setRankMetricNameSets the value of field
367: * 'rankMetricName'.
368: *
369: * @param rankMetricName the value of field 'rankMetricName'.
370: */
371: public void setRankMetricName(java.lang.String rankMetricName) {
372: this ._rankMetricName = rankMetricName;
373: } //-- void setRankMetricName(java.lang.String)
374:
375: /**
376: * Method setUbicationSets the value of field 'ubication'.
377: *
378: * @param ubication the value of field 'ubication'.
379: */
380: public void setUbication(int ubication) {
381: this ._ubication = ubication;
382: this ._has_ubication = true;
383: } //-- void setUbication(int)
384:
385: /**
386: * Method setWidthSets the value of field 'width'.
387: *
388: * @param width the value of field 'width'.
389: */
390: public void setWidth(int width) {
391: this ._width = width;
392: this ._has_width = true;
393: } //-- void setWidth(int)
394:
395: /**
396: * Method unmarshal
397: *
398: * @param reader
399: */
400: public static com.calipso.reportgenerator.reportdefinitions.DimensionProperty unmarshal(
401: java.io.Reader reader)
402: throws org.exolab.castor.xml.MarshalException,
403: org.exolab.castor.xml.ValidationException {
404: return (com.calipso.reportgenerator.reportdefinitions.DimensionProperty) Unmarshaller
405: .unmarshal(
406: com.calipso.reportgenerator.reportdefinitions.DimensionProperty.class,
407: reader);
408: } //-- com.calipso.reportgenerator.reportdefinitions.DimensionProperty unmarshal(java.io.Reader)
409:
410: /**
411: * Method validate
412: */
413: public void validate()
414: throws org.exolab.castor.xml.ValidationException {
415: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
416: validator.validate(this );
417: } //-- void validate()
418:
419: }
|