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