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:26:44 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/pizza/src/org/cougaar/pizza/asset/properties.def - DO NOT HAND EDIT */
028: /** Implementation of VeggiePG.
029: * @see VeggiePG
030: * @see NewVeggiePG
031: **/package org.cougaar.pizza.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 java.io.ObjectOutputStream;
039: import java.io.ObjectInputStream;
040: import java.io.IOException;
041: import java.beans.PropertyDescriptor;
042: import java.beans.IndexedPropertyDescriptor;
043:
044: public class VeggiePGImpl extends java.beans.SimpleBeanInfo implements
045: NewVeggiePG, Cloneable {
046: public VeggiePGImpl() {
047: }
048:
049: // Slots
050:
051: public VeggiePGImpl(VeggiePG original) {
052: }
053:
054: public boolean equals(Object other) {
055:
056: if (!(other instanceof VeggiePG)) {
057: return false;
058: }
059:
060: VeggiePG otherVeggiePG = (VeggiePG) other;
061:
062: return true;
063: }
064:
065: public boolean hasDataQuality() {
066: return false;
067: }
068:
069: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
070: return null;
071: }
072:
073: // static inner extension class for real DataQuality Support
074: public final static class DQ extends VeggiePGImpl implements
075: org.cougaar.planning.ldm.dq.NewHasDataQuality {
076: public DQ() {
077: super ();
078: }
079:
080: public DQ(VeggiePG original) {
081: super (original);
082: }
083:
084: public Object clone() {
085: return new DQ(this );
086: }
087:
088: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
089:
090: public boolean hasDataQuality() {
091: return (_dq != null);
092: }
093:
094: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
095: return _dq;
096: }
097:
098: public void setDataQuality(
099: org.cougaar.planning.ldm.dq.DataQuality dq) {
100: _dq = dq;
101: }
102:
103: private void writeObject(ObjectOutputStream out)
104: throws IOException {
105: out.defaultWriteObject();
106: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
107: out.writeObject(_dq);
108: }
109:
110: private void readObject(ObjectInputStream in)
111: throws ClassNotFoundException, IOException {
112: in.defaultReadObject();
113: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
114: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
115: .readObject();
116: }
117:
118: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
119: static {
120: try {
121: properties[0] = new PropertyDescriptor("dataQuality",
122: DQ.class, "getDataQuality", null);
123: } catch (Exception e) {
124: e.printStackTrace();
125: }
126: }
127:
128: public PropertyDescriptor[] getPropertyDescriptors() {
129: PropertyDescriptor[] pds = super .properties;
130: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
131: + properties.length];
132: System.arraycopy(pds, 0, ps, 0, pds.length);
133: System.arraycopy(properties, 0, ps, pds.length,
134: properties.length);
135: return ps;
136: }
137: }
138:
139: private transient VeggiePG _locked = null;
140:
141: public PropertyGroup lock(Object key) {
142: if (_locked == null)
143: _locked = new _Locked(key);
144: return _locked;
145: }
146:
147: public PropertyGroup lock() {
148: return lock(null);
149: }
150:
151: public NewPropertyGroup unlock(Object key) {
152: return this ;
153: }
154:
155: public Object clone() throws CloneNotSupportedException {
156: return new VeggiePGImpl(VeggiePGImpl.this );
157: }
158:
159: public PropertyGroup copy() {
160: try {
161: return (PropertyGroup) clone();
162: } catch (CloneNotSupportedException cnse) {
163: return null;
164: }
165: }
166:
167: public Class getPrimaryClass() {
168: return primaryClass;
169: }
170:
171: public String getAssetGetMethod() {
172: return assetGetter;
173: }
174:
175: public String getAssetSetMethod() {
176: return assetSetter;
177: }
178:
179: private final static PropertyDescriptor properties[] = new PropertyDescriptor[0];
180:
181: public PropertyDescriptor[] getPropertyDescriptors() {
182: return properties;
183: }
184:
185: private final class _Locked extends java.beans.SimpleBeanInfo
186: implements VeggiePG, Cloneable, LockedPG {
187: private transient Object theKey = null;
188:
189: _Locked(Object key) {
190: if (this .theKey == null)
191: this .theKey = key;
192: }
193:
194: public _Locked() {
195: }
196:
197: public PropertyGroup lock() {
198: return this ;
199: }
200:
201: public PropertyGroup lock(Object o) {
202: return this ;
203: }
204:
205: public NewPropertyGroup unlock(Object key)
206: throws IllegalAccessException {
207: if (theKey.equals(key)) {
208: return VeggiePGImpl.this ;
209: } else {
210: throw new IllegalAccessException(
211: "unlock: mismatched internal and provided keys!");
212: }
213: }
214:
215: public PropertyGroup copy() {
216: try {
217: return (PropertyGroup) clone();
218: } catch (CloneNotSupportedException cnse) {
219: return null;
220: }
221: }
222:
223: public Object clone() throws CloneNotSupportedException {
224: return new VeggiePGImpl(VeggiePGImpl.this );
225: }
226:
227: public boolean equals(Object object) {
228: return VeggiePGImpl.this .equals(object);
229: }
230:
231: public final boolean hasDataQuality() {
232: return VeggiePGImpl.this .hasDataQuality();
233: }
234:
235: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
236: return VeggiePGImpl.this .getDataQuality();
237: }
238:
239: public Class getPrimaryClass() {
240: return primaryClass;
241: }
242:
243: public String getAssetGetMethod() {
244: return assetGetter;
245: }
246:
247: public String getAssetSetMethod() {
248: return assetSetter;
249: }
250:
251: public PropertyDescriptor[] getPropertyDescriptors() {
252: return properties;
253: }
254:
255: public Class getIntrospectionClass() {
256: return VeggiePGImpl.class;
257: }
258:
259: }
260:
261: }
|