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 SupplyPG.
029: * @see SupplyPG
030: * @see NewSupplyPG
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 SupplyPGImpl extends java.beans.SimpleBeanInfo implements
051: NewSupplyPG, Cloneable {
052: public SupplyPGImpl() {
053: }
054:
055: // Slots
056:
057: private Mass theClass1HandleMassPerDay;
058:
059: public Mass getClass1HandleMassPerDay() {
060: return theClass1HandleMassPerDay;
061: }
062:
063: public void setClass1HandleMassPerDay(
064: Mass class_1_handle_mass_per_day) {
065: theClass1HandleMassPerDay = class_1_handle_mass_per_day;
066: }
067:
068: private Mass theClass2HandleMassPerDay;
069:
070: public Mass getClass2HandleMassPerDay() {
071: return theClass2HandleMassPerDay;
072: }
073:
074: public void setClass2HandleMassPerDay(
075: Mass class_2_handle_mass_per_day) {
076: theClass2HandleMassPerDay = class_2_handle_mass_per_day;
077: }
078:
079: private Mass theClass3pHandleMassPerDay;
080:
081: public Mass getClass3pHandleMassPerDay() {
082: return theClass3pHandleMassPerDay;
083: }
084:
085: public void setClass3pHandleMassPerDay(
086: Mass class_3p_handle_mass_per_day) {
087: theClass3pHandleMassPerDay = class_3p_handle_mass_per_day;
088: }
089:
090: private Mass theClass4bHandleMassPerDay;
091:
092: public Mass getClass4bHandleMassPerDay() {
093: return theClass4bHandleMassPerDay;
094: }
095:
096: public void setClass4bHandleMassPerDay(
097: Mass class_4b_handle_mass_per_day) {
098: theClass4bHandleMassPerDay = class_4b_handle_mass_per_day;
099: }
100:
101: private Mass theClass4HandleMassPerDay;
102:
103: public Mass getClass4HandleMassPerDay() {
104: return theClass4HandleMassPerDay;
105: }
106:
107: public void setClass4HandleMassPerDay(
108: Mass class_4_handle_mass_per_day) {
109: theClass4HandleMassPerDay = class_4_handle_mass_per_day;
110: }
111:
112: private Mass theClass5TransloadMassPerDay;
113:
114: public Mass getClass5TransloadMassPerDay() {
115: return theClass5TransloadMassPerDay;
116: }
117:
118: public void setClass5TransloadMassPerDay(
119: Mass class_5_transload_mass_per_day) {
120: theClass5TransloadMassPerDay = class_5_transload_mass_per_day;
121: }
122:
123: private Mass theClass7HandleMassPerDay;
124:
125: public Mass getClass7HandleMassPerDay() {
126: return theClass7HandleMassPerDay;
127: }
128:
129: public void setClass7HandleMassPerDay(
130: Mass class_7_handle_mass_per_day) {
131: theClass7HandleMassPerDay = class_7_handle_mass_per_day;
132: }
133:
134: private Mass theClass9HandleMassPerDay;
135:
136: public Mass getClass9HandleMassPerDay() {
137: return theClass9HandleMassPerDay;
138: }
139:
140: public void setClass9HandleMassPerDay(
141: Mass class_9_handle_mass_per_day) {
142: theClass9HandleMassPerDay = class_9_handle_mass_per_day;
143: }
144:
145: public SupplyPGImpl(SupplyPG original) {
146: theClass1HandleMassPerDay = original
147: .getClass1HandleMassPerDay();
148: theClass2HandleMassPerDay = original
149: .getClass2HandleMassPerDay();
150: theClass3pHandleMassPerDay = original
151: .getClass3pHandleMassPerDay();
152: theClass4bHandleMassPerDay = original
153: .getClass4bHandleMassPerDay();
154: theClass4HandleMassPerDay = original
155: .getClass4HandleMassPerDay();
156: theClass5TransloadMassPerDay = original
157: .getClass5TransloadMassPerDay();
158: theClass7HandleMassPerDay = original
159: .getClass7HandleMassPerDay();
160: theClass9HandleMassPerDay = original
161: .getClass9HandleMassPerDay();
162: }
163:
164: public boolean equals(Object other) {
165:
166: if (!(other instanceof SupplyPG)) {
167: return false;
168: }
169:
170: SupplyPG otherSupplyPG = (SupplyPG) other;
171:
172: if (getClass1HandleMassPerDay() == null) {
173: if (otherSupplyPG.getClass1HandleMassPerDay() != null) {
174: return false;
175: }
176: } else if (!(getClass1HandleMassPerDay().equals(otherSupplyPG
177: .getClass1HandleMassPerDay()))) {
178: return false;
179: }
180:
181: if (getClass2HandleMassPerDay() == null) {
182: if (otherSupplyPG.getClass2HandleMassPerDay() != null) {
183: return false;
184: }
185: } else if (!(getClass2HandleMassPerDay().equals(otherSupplyPG
186: .getClass2HandleMassPerDay()))) {
187: return false;
188: }
189:
190: if (getClass3pHandleMassPerDay() == null) {
191: if (otherSupplyPG.getClass3pHandleMassPerDay() != null) {
192: return false;
193: }
194: } else if (!(getClass3pHandleMassPerDay().equals(otherSupplyPG
195: .getClass3pHandleMassPerDay()))) {
196: return false;
197: }
198:
199: if (getClass4bHandleMassPerDay() == null) {
200: if (otherSupplyPG.getClass4bHandleMassPerDay() != null) {
201: return false;
202: }
203: } else if (!(getClass4bHandleMassPerDay().equals(otherSupplyPG
204: .getClass4bHandleMassPerDay()))) {
205: return false;
206: }
207:
208: if (getClass4HandleMassPerDay() == null) {
209: if (otherSupplyPG.getClass4HandleMassPerDay() != null) {
210: return false;
211: }
212: } else if (!(getClass4HandleMassPerDay().equals(otherSupplyPG
213: .getClass4HandleMassPerDay()))) {
214: return false;
215: }
216:
217: if (getClass5TransloadMassPerDay() == null) {
218: if (otherSupplyPG.getClass5TransloadMassPerDay() != null) {
219: return false;
220: }
221: } else if (!(getClass5TransloadMassPerDay()
222: .equals(otherSupplyPG.getClass5TransloadMassPerDay()))) {
223: return false;
224: }
225:
226: if (getClass7HandleMassPerDay() == null) {
227: if (otherSupplyPG.getClass7HandleMassPerDay() != null) {
228: return false;
229: }
230: } else if (!(getClass7HandleMassPerDay().equals(otherSupplyPG
231: .getClass7HandleMassPerDay()))) {
232: return false;
233: }
234:
235: if (getClass9HandleMassPerDay() == null) {
236: if (otherSupplyPG.getClass9HandleMassPerDay() != null) {
237: return false;
238: }
239: } else if (!(getClass9HandleMassPerDay().equals(otherSupplyPG
240: .getClass9HandleMassPerDay()))) {
241: return false;
242: }
243:
244: return true;
245: }
246:
247: public boolean hasDataQuality() {
248: return false;
249: }
250:
251: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
252: return null;
253: }
254:
255: // static inner extension class for real DataQuality Support
256: public final static class DQ extends SupplyPGImpl implements
257: org.cougaar.planning.ldm.dq.NewHasDataQuality {
258: public DQ() {
259: super ();
260: }
261:
262: public DQ(SupplyPG original) {
263: super (original);
264: }
265:
266: public Object clone() {
267: return new DQ(this );
268: }
269:
270: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
271:
272: public boolean hasDataQuality() {
273: return (_dq != null);
274: }
275:
276: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
277: return _dq;
278: }
279:
280: public void setDataQuality(
281: org.cougaar.planning.ldm.dq.DataQuality dq) {
282: _dq = dq;
283: }
284:
285: private void writeObject(ObjectOutputStream out)
286: throws IOException {
287: out.defaultWriteObject();
288: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
289: out.writeObject(_dq);
290: }
291:
292: private void readObject(ObjectInputStream in)
293: throws ClassNotFoundException, IOException {
294: in.defaultReadObject();
295: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
296: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
297: .readObject();
298: }
299:
300: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
301: static {
302: try {
303: properties[0] = new PropertyDescriptor("dataQuality",
304: DQ.class, "getDataQuality", null);
305: } catch (Exception e) {
306: e.printStackTrace();
307: }
308: }
309:
310: public PropertyDescriptor[] getPropertyDescriptors() {
311: PropertyDescriptor[] pds = super .properties;
312: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
313: + properties.length];
314: System.arraycopy(pds, 0, ps, 0, pds.length);
315: System.arraycopy(properties, 0, ps, pds.length,
316: properties.length);
317: return ps;
318: }
319: }
320:
321: private transient SupplyPG _locked = null;
322:
323: public PropertyGroup lock(Object key) {
324: if (_locked == null)
325: _locked = new _Locked(key);
326: return _locked;
327: }
328:
329: public PropertyGroup lock() {
330: return lock(null);
331: }
332:
333: public NewPropertyGroup unlock(Object key) {
334: return this ;
335: }
336:
337: public Object clone() throws CloneNotSupportedException {
338: return new SupplyPGImpl(SupplyPGImpl.this );
339: }
340:
341: public PropertyGroup copy() {
342: try {
343: return (PropertyGroup) clone();
344: } catch (CloneNotSupportedException cnse) {
345: return null;
346: }
347: }
348:
349: public Class getPrimaryClass() {
350: return primaryClass;
351: }
352:
353: public String getAssetGetMethod() {
354: return assetGetter;
355: }
356:
357: public String getAssetSetMethod() {
358: return assetSetter;
359: }
360:
361: private final static PropertyDescriptor properties[] = new PropertyDescriptor[8];
362: static {
363: try {
364: properties[0] = new PropertyDescriptor(
365: "class_1_handle_mass_per_day", SupplyPG.class,
366: "getClass1HandleMassPerDay", null);
367: properties[1] = new PropertyDescriptor(
368: "class_2_handle_mass_per_day", SupplyPG.class,
369: "getClass2HandleMassPerDay", null);
370: properties[2] = new PropertyDescriptor(
371: "class_3p_handle_mass_per_day", SupplyPG.class,
372: "getClass3pHandleMassPerDay", null);
373: properties[3] = new PropertyDescriptor(
374: "class_4b_handle_mass_per_day", SupplyPG.class,
375: "getClass4bHandleMassPerDay", null);
376: properties[4] = new PropertyDescriptor(
377: "class_4_handle_mass_per_day", SupplyPG.class,
378: "getClass4HandleMassPerDay", null);
379: properties[5] = new PropertyDescriptor(
380: "class_5_transload_mass_per_day", SupplyPG.class,
381: "getClass5TransloadMassPerDay", null);
382: properties[6] = new PropertyDescriptor(
383: "class_7_handle_mass_per_day", SupplyPG.class,
384: "getClass7HandleMassPerDay", null);
385: properties[7] = new PropertyDescriptor(
386: "class_9_handle_mass_per_day", SupplyPG.class,
387: "getClass9HandleMassPerDay", null);
388: } catch (Exception e) {
389: org.cougaar.util.log.Logging.getLogger(SupplyPG.class)
390: .error("Caught exception", e);
391: }
392: }
393:
394: public PropertyDescriptor[] getPropertyDescriptors() {
395: return properties;
396: }
397:
398: private final class _Locked extends java.beans.SimpleBeanInfo
399: implements SupplyPG, Cloneable, LockedPG {
400: private transient Object theKey = null;
401:
402: _Locked(Object key) {
403: if (this .theKey == null)
404: this .theKey = key;
405: }
406:
407: public _Locked() {
408: }
409:
410: public PropertyGroup lock() {
411: return this ;
412: }
413:
414: public PropertyGroup lock(Object o) {
415: return this ;
416: }
417:
418: public NewPropertyGroup unlock(Object key)
419: throws IllegalAccessException {
420: if (theKey.equals(key)) {
421: return SupplyPGImpl.this ;
422: } else {
423: throw new IllegalAccessException(
424: "unlock: mismatched internal and provided keys!");
425: }
426: }
427:
428: public PropertyGroup copy() {
429: try {
430: return (PropertyGroup) clone();
431: } catch (CloneNotSupportedException cnse) {
432: return null;
433: }
434: }
435:
436: public Object clone() throws CloneNotSupportedException {
437: return new SupplyPGImpl(SupplyPGImpl.this );
438: }
439:
440: public boolean equals(Object object) {
441: return SupplyPGImpl.this .equals(object);
442: }
443:
444: public Mass getClass1HandleMassPerDay() {
445: return SupplyPGImpl.this .getClass1HandleMassPerDay();
446: }
447:
448: public Mass getClass2HandleMassPerDay() {
449: return SupplyPGImpl.this .getClass2HandleMassPerDay();
450: }
451:
452: public Mass getClass3pHandleMassPerDay() {
453: return SupplyPGImpl.this .getClass3pHandleMassPerDay();
454: }
455:
456: public Mass getClass4bHandleMassPerDay() {
457: return SupplyPGImpl.this .getClass4bHandleMassPerDay();
458: }
459:
460: public Mass getClass4HandleMassPerDay() {
461: return SupplyPGImpl.this .getClass4HandleMassPerDay();
462: }
463:
464: public Mass getClass5TransloadMassPerDay() {
465: return SupplyPGImpl.this .getClass5TransloadMassPerDay();
466: }
467:
468: public Mass getClass7HandleMassPerDay() {
469: return SupplyPGImpl.this .getClass7HandleMassPerDay();
470: }
471:
472: public Mass getClass9HandleMassPerDay() {
473: return SupplyPGImpl.this .getClass9HandleMassPerDay();
474: }
475:
476: public final boolean hasDataQuality() {
477: return SupplyPGImpl.this .hasDataQuality();
478: }
479:
480: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
481: return SupplyPGImpl.this .getDataQuality();
482: }
483:
484: public Class getPrimaryClass() {
485: return primaryClass;
486: }
487:
488: public String getAssetGetMethod() {
489: return assetGetter;
490: }
491:
492: public String getAssetSetMethod() {
493: return assetSetter;
494: }
495:
496: public PropertyDescriptor[] getPropertyDescriptors() {
497: return properties;
498: }
499:
500: public Class getIntrospectionClass() {
501: return SupplyPGImpl.class;
502: }
503:
504: }
505:
506: }
|