001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: /* @generated Thu Sep 27 15:21:47 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/glm/src/org/cougaar/glm/ldm/asset/alpprops.def - DO NOT HAND EDIT */
028: /** Implementation of ReportSchedulePG.
029: * @see ReportSchedulePG
030: * @see NewReportSchedulePG
031: **/package org.cougaar.glm.ldm.asset;
032:
033: import org.cougaar.planning.ldm.measure.*;
034: import org.cougaar.planning.ldm.asset.*;
035: import org.cougaar.planning.ldm.plan.*;
036: import java.util.*;
037:
038: import org.cougaar.glm.ldm.plan.*;
039: import org.cougaar.glm.ldm.oplan.*;
040: import org.cougaar.glm.ldm.policy.*;
041: import org.cougaar.core.mts.MessageAddress;
042: import org.cougaar.glm.execution.common.InventoryReport;
043:
044: import java.io.ObjectOutputStream;
045: import java.io.ObjectInputStream;
046: import java.io.IOException;
047: import java.beans.PropertyDescriptor;
048: import java.beans.IndexedPropertyDescriptor;
049:
050: public class ReportSchedulePGImpl extends java.beans.SimpleBeanInfo
051: implements NewReportSchedulePG, Cloneable {
052: public ReportSchedulePGImpl() {
053: }
054:
055: // Slots
056:
057: private java.util.GregorianCalendar theBase;
058:
059: public java.util.GregorianCalendar getBase() {
060: return theBase;
061: }
062:
063: public void setBase(java.util.GregorianCalendar Base) {
064: theBase = Base;
065: }
066:
067: private int theStep;
068:
069: public int getStep() {
070: return theStep;
071: }
072:
073: public void setStep(int Step) {
074: theStep = Step;
075: }
076:
077: private int theJitter;
078:
079: public int getJitter() {
080: return theJitter;
081: }
082:
083: public void setJitter(int Jitter) {
084: theJitter = Jitter;
085: }
086:
087: public ReportSchedulePGImpl(ReportSchedulePG original) {
088: theBase = original.getBase();
089: theStep = original.getStep();
090: theJitter = original.getJitter();
091: }
092:
093: public boolean equals(Object other) {
094:
095: if (!(other instanceof ReportSchedulePG)) {
096: return false;
097: }
098:
099: ReportSchedulePG otherReportSchedulePG = (ReportSchedulePG) other;
100:
101: if (getBase() == null) {
102: if (otherReportSchedulePG.getBase() != null) {
103: return false;
104: }
105: } else if (!(getBase().equals(otherReportSchedulePG.getBase()))) {
106: return false;
107: }
108:
109: if (!(getStep() == otherReportSchedulePG.getStep())) {
110: return false;
111: }
112:
113: if (!(getJitter() == otherReportSchedulePG.getJitter())) {
114: return false;
115: }
116:
117: return true;
118: }
119:
120: public boolean hasDataQuality() {
121: return false;
122: }
123:
124: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
125: return null;
126: }
127:
128: // static inner extension class for real DataQuality Support
129: public final static class DQ extends ReportSchedulePGImpl implements
130: org.cougaar.planning.ldm.dq.NewHasDataQuality {
131: public DQ() {
132: super ();
133: }
134:
135: public DQ(ReportSchedulePG original) {
136: super (original);
137: }
138:
139: public Object clone() {
140: return new DQ(this );
141: }
142:
143: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
144:
145: public boolean hasDataQuality() {
146: return (_dq != null);
147: }
148:
149: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
150: return _dq;
151: }
152:
153: public void setDataQuality(
154: org.cougaar.planning.ldm.dq.DataQuality dq) {
155: _dq = dq;
156: }
157:
158: private void writeObject(ObjectOutputStream out)
159: throws IOException {
160: out.defaultWriteObject();
161: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
162: out.writeObject(_dq);
163: }
164:
165: private void readObject(ObjectInputStream in)
166: throws ClassNotFoundException, IOException {
167: in.defaultReadObject();
168: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
169: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
170: .readObject();
171: }
172:
173: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
174: static {
175: try {
176: properties[0] = new PropertyDescriptor("dataQuality",
177: DQ.class, "getDataQuality", null);
178: } catch (Exception e) {
179: e.printStackTrace();
180: }
181: }
182:
183: public PropertyDescriptor[] getPropertyDescriptors() {
184: PropertyDescriptor[] pds = super .properties;
185: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
186: + properties.length];
187: System.arraycopy(pds, 0, ps, 0, pds.length);
188: System.arraycopy(properties, 0, ps, pds.length,
189: properties.length);
190: return ps;
191: }
192: }
193:
194: private transient ReportSchedulePG _locked = null;
195:
196: public PropertyGroup lock(Object key) {
197: if (_locked == null)
198: _locked = new _Locked(key);
199: return _locked;
200: }
201:
202: public PropertyGroup lock() {
203: return lock(null);
204: }
205:
206: public NewPropertyGroup unlock(Object key) {
207: return this ;
208: }
209:
210: public Object clone() throws CloneNotSupportedException {
211: return new ReportSchedulePGImpl(ReportSchedulePGImpl.this );
212: }
213:
214: public PropertyGroup copy() {
215: try {
216: return (PropertyGroup) clone();
217: } catch (CloneNotSupportedException cnse) {
218: return null;
219: }
220: }
221:
222: public Class getPrimaryClass() {
223: return primaryClass;
224: }
225:
226: public String getAssetGetMethod() {
227: return assetGetter;
228: }
229:
230: public String getAssetSetMethod() {
231: return assetSetter;
232: }
233:
234: private final static PropertyDescriptor properties[] = new PropertyDescriptor[3];
235: static {
236: try {
237: properties[0] = new PropertyDescriptor("Base",
238: ReportSchedulePG.class, "getBase", null);
239: properties[1] = new PropertyDescriptor("Step",
240: ReportSchedulePG.class, "getStep", null);
241: properties[2] = new PropertyDescriptor("Jitter",
242: ReportSchedulePG.class, "getJitter", null);
243: } catch (Exception e) {
244: org.cougaar.util.log.Logging.getLogger(
245: ReportSchedulePG.class)
246: .error("Caught exception", e);
247: }
248: }
249:
250: public PropertyDescriptor[] getPropertyDescriptors() {
251: return properties;
252: }
253:
254: private final class _Locked extends java.beans.SimpleBeanInfo
255: implements ReportSchedulePG, Cloneable, LockedPG {
256: private transient Object theKey = null;
257:
258: _Locked(Object key) {
259: if (this .theKey == null)
260: this .theKey = key;
261: }
262:
263: public _Locked() {
264: }
265:
266: public PropertyGroup lock() {
267: return this ;
268: }
269:
270: public PropertyGroup lock(Object o) {
271: return this ;
272: }
273:
274: public NewPropertyGroup unlock(Object key)
275: throws IllegalAccessException {
276: if (theKey.equals(key)) {
277: return ReportSchedulePGImpl.this ;
278: } else {
279: throw new IllegalAccessException(
280: "unlock: mismatched internal and provided keys!");
281: }
282: }
283:
284: public PropertyGroup copy() {
285: try {
286: return (PropertyGroup) clone();
287: } catch (CloneNotSupportedException cnse) {
288: return null;
289: }
290: }
291:
292: public Object clone() throws CloneNotSupportedException {
293: return new ReportSchedulePGImpl(ReportSchedulePGImpl.this );
294: }
295:
296: public boolean equals(Object object) {
297: return ReportSchedulePGImpl.this .equals(object);
298: }
299:
300: public java.util.GregorianCalendar getBase() {
301: return ReportSchedulePGImpl.this .getBase();
302: }
303:
304: public int getStep() {
305: return ReportSchedulePGImpl.this .getStep();
306: }
307:
308: public int getJitter() {
309: return ReportSchedulePGImpl.this .getJitter();
310: }
311:
312: public final boolean hasDataQuality() {
313: return ReportSchedulePGImpl.this .hasDataQuality();
314: }
315:
316: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
317: return ReportSchedulePGImpl.this .getDataQuality();
318: }
319:
320: public Class getPrimaryClass() {
321: return primaryClass;
322: }
323:
324: public String getAssetGetMethod() {
325: return assetGetter;
326: }
327:
328: public String getAssetSetMethod() {
329: return assetSetter;
330: }
331:
332: public PropertyDescriptor[] getPropertyDescriptors() {
333: return properties;
334: }
335:
336: public Class getIntrospectionClass() {
337: return ReportSchedulePGImpl.class;
338: }
339:
340: }
341:
342: }
|