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