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 CargoFacilityPG.
029: * @see CargoFacilityPG
030: * @see NewCargoFacilityPG
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 CargoFacilityPGImpl extends java.beans.SimpleBeanInfo
051: implements NewCargoFacilityPG, Cloneable {
052: public CargoFacilityPGImpl() {
053: }
054:
055: // Slots
056:
057: private Area theCoveredStagingArea;
058:
059: public Area getCoveredStagingArea() {
060: return theCoveredStagingArea;
061: }
062:
063: public void setCoveredStagingArea(Area covered_staging_area) {
064: theCoveredStagingArea = covered_staging_area;
065: }
066:
067: private Area theOpenStagingArea;
068:
069: public Area getOpenStagingArea() {
070: return theOpenStagingArea;
071: }
072:
073: public void setOpenStagingArea(Area open_staging_area) {
074: theOpenStagingArea = open_staging_area;
075: }
076:
077: private long theThroughputContainersPerDay;
078:
079: public long getThroughputContainersPerDay() {
080: return theThroughputContainersPerDay;
081: }
082:
083: public void setThroughputContainersPerDay(
084: long throughput_containers_per_day) {
085: theThroughputContainersPerDay = throughput_containers_per_day;
086: }
087:
088: private long theThroughputPalletsPerDay;
089:
090: public long getThroughputPalletsPerDay() {
091: return theThroughputPalletsPerDay;
092: }
093:
094: public void setThroughputPalletsPerDay(
095: long throughput_pallets_per_day) {
096: theThroughputPalletsPerDay = throughput_pallets_per_day;
097: }
098:
099: public CargoFacilityPGImpl(CargoFacilityPG original) {
100: theCoveredStagingArea = original.getCoveredStagingArea();
101: theOpenStagingArea = original.getOpenStagingArea();
102: theThroughputContainersPerDay = original
103: .getThroughputContainersPerDay();
104: theThroughputPalletsPerDay = original
105: .getThroughputPalletsPerDay();
106: }
107:
108: public boolean equals(Object other) {
109:
110: if (!(other instanceof CargoFacilityPG)) {
111: return false;
112: }
113:
114: CargoFacilityPG otherCargoFacilityPG = (CargoFacilityPG) other;
115:
116: if (getCoveredStagingArea() == null) {
117: if (otherCargoFacilityPG.getCoveredStagingArea() != null) {
118: return false;
119: }
120: } else if (!(getCoveredStagingArea()
121: .equals(otherCargoFacilityPG.getCoveredStagingArea()))) {
122: return false;
123: }
124:
125: if (getOpenStagingArea() == null) {
126: if (otherCargoFacilityPG.getOpenStagingArea() != null) {
127: return false;
128: }
129: } else if (!(getOpenStagingArea().equals(otherCargoFacilityPG
130: .getOpenStagingArea()))) {
131: return false;
132: }
133:
134: if (!(getThroughputContainersPerDay() == otherCargoFacilityPG
135: .getThroughputContainersPerDay())) {
136: return false;
137: }
138:
139: if (!(getThroughputPalletsPerDay() == otherCargoFacilityPG
140: .getThroughputPalletsPerDay())) {
141: return false;
142: }
143:
144: return true;
145: }
146:
147: public boolean hasDataQuality() {
148: return false;
149: }
150:
151: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
152: return null;
153: }
154:
155: // static inner extension class for real DataQuality Support
156: public final static class DQ extends CargoFacilityPGImpl implements
157: org.cougaar.planning.ldm.dq.NewHasDataQuality {
158: public DQ() {
159: super ();
160: }
161:
162: public DQ(CargoFacilityPG original) {
163: super (original);
164: }
165:
166: public Object clone() {
167: return new DQ(this );
168: }
169:
170: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
171:
172: public boolean hasDataQuality() {
173: return (_dq != null);
174: }
175:
176: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
177: return _dq;
178: }
179:
180: public void setDataQuality(
181: org.cougaar.planning.ldm.dq.DataQuality dq) {
182: _dq = dq;
183: }
184:
185: private void writeObject(ObjectOutputStream out)
186: throws IOException {
187: out.defaultWriteObject();
188: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
189: out.writeObject(_dq);
190: }
191:
192: private void readObject(ObjectInputStream in)
193: throws ClassNotFoundException, IOException {
194: in.defaultReadObject();
195: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
196: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
197: .readObject();
198: }
199:
200: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
201: static {
202: try {
203: properties[0] = new PropertyDescriptor("dataQuality",
204: DQ.class, "getDataQuality", null);
205: } catch (Exception e) {
206: e.printStackTrace();
207: }
208: }
209:
210: public PropertyDescriptor[] getPropertyDescriptors() {
211: PropertyDescriptor[] pds = super .properties;
212: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
213: + properties.length];
214: System.arraycopy(pds, 0, ps, 0, pds.length);
215: System.arraycopy(properties, 0, ps, pds.length,
216: properties.length);
217: return ps;
218: }
219: }
220:
221: private transient CargoFacilityPG _locked = null;
222:
223: public PropertyGroup lock(Object key) {
224: if (_locked == null)
225: _locked = new _Locked(key);
226: return _locked;
227: }
228:
229: public PropertyGroup lock() {
230: return lock(null);
231: }
232:
233: public NewPropertyGroup unlock(Object key) {
234: return this ;
235: }
236:
237: public Object clone() throws CloneNotSupportedException {
238: return new CargoFacilityPGImpl(CargoFacilityPGImpl.this );
239: }
240:
241: public PropertyGroup copy() {
242: try {
243: return (PropertyGroup) clone();
244: } catch (CloneNotSupportedException cnse) {
245: return null;
246: }
247: }
248:
249: public Class getPrimaryClass() {
250: return primaryClass;
251: }
252:
253: public String getAssetGetMethod() {
254: return assetGetter;
255: }
256:
257: public String getAssetSetMethod() {
258: return assetSetter;
259: }
260:
261: private final static PropertyDescriptor properties[] = new PropertyDescriptor[4];
262: static {
263: try {
264: properties[0] = new PropertyDescriptor(
265: "covered_staging_area", CargoFacilityPG.class,
266: "getCoveredStagingArea", null);
267: properties[1] = new PropertyDescriptor("open_staging_area",
268: CargoFacilityPG.class, "getOpenStagingArea", null);
269: properties[2] = new PropertyDescriptor(
270: "throughput_containers_per_day",
271: CargoFacilityPG.class,
272: "getThroughputContainersPerDay", null);
273: properties[3] = new PropertyDescriptor(
274: "throughput_pallets_per_day",
275: CargoFacilityPG.class,
276: "getThroughputPalletsPerDay", null);
277: } catch (Exception e) {
278: org.cougaar.util.log.Logging.getLogger(
279: CargoFacilityPG.class).error("Caught exception", e);
280: }
281: }
282:
283: public PropertyDescriptor[] getPropertyDescriptors() {
284: return properties;
285: }
286:
287: private final class _Locked extends java.beans.SimpleBeanInfo
288: implements CargoFacilityPG, Cloneable, LockedPG {
289: private transient Object theKey = null;
290:
291: _Locked(Object key) {
292: if (this .theKey == null)
293: this .theKey = key;
294: }
295:
296: public _Locked() {
297: }
298:
299: public PropertyGroup lock() {
300: return this ;
301: }
302:
303: public PropertyGroup lock(Object o) {
304: return this ;
305: }
306:
307: public NewPropertyGroup unlock(Object key)
308: throws IllegalAccessException {
309: if (theKey.equals(key)) {
310: return CargoFacilityPGImpl.this ;
311: } else {
312: throw new IllegalAccessException(
313: "unlock: mismatched internal and provided keys!");
314: }
315: }
316:
317: public PropertyGroup copy() {
318: try {
319: return (PropertyGroup) clone();
320: } catch (CloneNotSupportedException cnse) {
321: return null;
322: }
323: }
324:
325: public Object clone() throws CloneNotSupportedException {
326: return new CargoFacilityPGImpl(CargoFacilityPGImpl.this );
327: }
328:
329: public boolean equals(Object object) {
330: return CargoFacilityPGImpl.this .equals(object);
331: }
332:
333: public Area getCoveredStagingArea() {
334: return CargoFacilityPGImpl.this .getCoveredStagingArea();
335: }
336:
337: public Area getOpenStagingArea() {
338: return CargoFacilityPGImpl.this .getOpenStagingArea();
339: }
340:
341: public long getThroughputContainersPerDay() {
342: return CargoFacilityPGImpl.this
343: .getThroughputContainersPerDay();
344: }
345:
346: public long getThroughputPalletsPerDay() {
347: return CargoFacilityPGImpl.this
348: .getThroughputPalletsPerDay();
349: }
350:
351: public final boolean hasDataQuality() {
352: return CargoFacilityPGImpl.this .hasDataQuality();
353: }
354:
355: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
356: return CargoFacilityPGImpl.this .getDataQuality();
357: }
358:
359: public Class getPrimaryClass() {
360: return primaryClass;
361: }
362:
363: public String getAssetGetMethod() {
364: return assetGetter;
365: }
366:
367: public String getAssetSetMethod() {
368: return assetSetter;
369: }
370:
371: public PropertyDescriptor[] getPropertyDescriptors() {
372: return properties;
373: }
374:
375: public Class getIntrospectionClass() {
376: return CargoFacilityPGImpl.class;
377: }
378:
379: }
380:
381: }
|