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 EquipmentOHReadinessPG.
029: * @see EquipmentOHReadinessPG
030: * @see NewEquipmentOHReadinessPG
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 EquipmentOHReadinessPGImpl extends
051: java.beans.SimpleBeanInfo implements NewEquipmentOHReadinessPG,
052: Cloneable {
053: public EquipmentOHReadinessPGImpl() {
054: }
055:
056: // Slots
057:
058: private Map theReadiness;
059:
060: public Map getReadiness() {
061: return theReadiness;
062: }
063:
064: public void setReadiness(Map readiness) {
065: theReadiness = readiness;
066: }
067:
068: public EquipmentOHReadinessPGImpl(EquipmentOHReadinessPG original) {
069: theReadiness = original.getReadiness();
070: }
071:
072: public boolean equals(Object other) {
073:
074: if (!(other instanceof EquipmentOHReadinessPG)) {
075: return false;
076: }
077:
078: EquipmentOHReadinessPG otherEquipmentOHReadinessPG = (EquipmentOHReadinessPG) other;
079:
080: if (getReadiness() == null) {
081: if (otherEquipmentOHReadinessPG.getReadiness() != null) {
082: return false;
083: }
084: } else if (!(getReadiness().equals(otherEquipmentOHReadinessPG
085: .getReadiness()))) {
086: return false;
087: }
088:
089: return true;
090: }
091:
092: public boolean hasDataQuality() {
093: return false;
094: }
095:
096: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
097: return null;
098: }
099:
100: // static inner extension class for real DataQuality Support
101: public final static class DQ extends EquipmentOHReadinessPGImpl
102: implements org.cougaar.planning.ldm.dq.NewHasDataQuality {
103: public DQ() {
104: super ();
105: }
106:
107: public DQ(EquipmentOHReadinessPG original) {
108: super (original);
109: }
110:
111: public Object clone() {
112: return new DQ(this );
113: }
114:
115: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
116:
117: public boolean hasDataQuality() {
118: return (_dq != null);
119: }
120:
121: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
122: return _dq;
123: }
124:
125: public void setDataQuality(
126: org.cougaar.planning.ldm.dq.DataQuality dq) {
127: _dq = dq;
128: }
129:
130: private void writeObject(ObjectOutputStream out)
131: throws IOException {
132: out.defaultWriteObject();
133: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
134: out.writeObject(_dq);
135: }
136:
137: private void readObject(ObjectInputStream in)
138: throws ClassNotFoundException, IOException {
139: in.defaultReadObject();
140: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
141: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
142: .readObject();
143: }
144:
145: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
146: static {
147: try {
148: properties[0] = new PropertyDescriptor("dataQuality",
149: DQ.class, "getDataQuality", null);
150: } catch (Exception e) {
151: e.printStackTrace();
152: }
153: }
154:
155: public PropertyDescriptor[] getPropertyDescriptors() {
156: PropertyDescriptor[] pds = super .properties;
157: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
158: + properties.length];
159: System.arraycopy(pds, 0, ps, 0, pds.length);
160: System.arraycopy(properties, 0, ps, pds.length,
161: properties.length);
162: return ps;
163: }
164: }
165:
166: private transient EquipmentOHReadinessPG _locked = null;
167:
168: public PropertyGroup lock(Object key) {
169: if (_locked == null)
170: _locked = new _Locked(key);
171: return _locked;
172: }
173:
174: public PropertyGroup lock() {
175: return lock(null);
176: }
177:
178: public NewPropertyGroup unlock(Object key) {
179: return this ;
180: }
181:
182: public Object clone() throws CloneNotSupportedException {
183: return new EquipmentOHReadinessPGImpl(
184: EquipmentOHReadinessPGImpl.this );
185: }
186:
187: public PropertyGroup copy() {
188: try {
189: return (PropertyGroup) clone();
190: } catch (CloneNotSupportedException cnse) {
191: return null;
192: }
193: }
194:
195: public Class getPrimaryClass() {
196: return primaryClass;
197: }
198:
199: public String getAssetGetMethod() {
200: return assetGetter;
201: }
202:
203: public String getAssetSetMethod() {
204: return assetSetter;
205: }
206:
207: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
208: static {
209: try {
210: properties[0] = new PropertyDescriptor("readiness",
211: EquipmentOHReadinessPG.class, "getReadiness", null);
212: } catch (Exception e) {
213: org.cougaar.util.log.Logging.getLogger(
214: EquipmentOHReadinessPG.class).error(
215: "Caught exception", e);
216: }
217: }
218:
219: public PropertyDescriptor[] getPropertyDescriptors() {
220: return properties;
221: }
222:
223: private final class _Locked extends java.beans.SimpleBeanInfo
224: implements EquipmentOHReadinessPG, Cloneable, LockedPG {
225: private transient Object theKey = null;
226:
227: _Locked(Object key) {
228: if (this .theKey == null)
229: this .theKey = key;
230: }
231:
232: public _Locked() {
233: }
234:
235: public PropertyGroup lock() {
236: return this ;
237: }
238:
239: public PropertyGroup lock(Object o) {
240: return this ;
241: }
242:
243: public NewPropertyGroup unlock(Object key)
244: throws IllegalAccessException {
245: if (theKey.equals(key)) {
246: return EquipmentOHReadinessPGImpl.this ;
247: } else {
248: throw new IllegalAccessException(
249: "unlock: mismatched internal and provided keys!");
250: }
251: }
252:
253: public PropertyGroup copy() {
254: try {
255: return (PropertyGroup) clone();
256: } catch (CloneNotSupportedException cnse) {
257: return null;
258: }
259: }
260:
261: public Object clone() throws CloneNotSupportedException {
262: return new EquipmentOHReadinessPGImpl(
263: EquipmentOHReadinessPGImpl.this );
264: }
265:
266: public boolean equals(Object object) {
267: return EquipmentOHReadinessPGImpl.this .equals(object);
268: }
269:
270: public Map getReadiness() {
271: return EquipmentOHReadinessPGImpl.this .getReadiness();
272: }
273:
274: public final boolean hasDataQuality() {
275: return EquipmentOHReadinessPGImpl.this .hasDataQuality();
276: }
277:
278: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
279: return EquipmentOHReadinessPGImpl.this .getDataQuality();
280: }
281:
282: public Class getPrimaryClass() {
283: return primaryClass;
284: }
285:
286: public String getAssetGetMethod() {
287: return assetGetter;
288: }
289:
290: public String getAssetSetMethod() {
291: return assetSetter;
292: }
293:
294: public PropertyDescriptor[] getPropertyDescriptors() {
295: return properties;
296: }
297:
298: public Class getIntrospectionClass() {
299: return EquipmentOHReadinessPGImpl.class;
300: }
301:
302: }
303:
304: }
|