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: /** Primary client interface for AirConditionPG.
029: * @see NewAirConditionPG
030: * @see AirConditionPGImpl
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: public interface AirConditionPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** Altitude of the lowest clouds **/
047: Distance getCeiling();
048:
049: Speed getWindSpeed();
050:
051: Temperature getTemperature();
052:
053: double getPrecipitationRate();
054:
055: Heading getWindHeading();
056:
057: Distance getVisibility();
058:
059: double getBarometricPressure();
060:
061: // introspection and construction
062: /** the method of factoryClass that creates this type **/
063: String factoryMethod = "newAirConditionPG";
064: /** the (mutable) class type returned by factoryMethod **/
065: String mutableClass = "org.cougaar.glm.ldm.asset.NewAirConditionPG";
066: /** the factory class **/
067: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
068: /** the (immutable) class type returned by domain factory **/
069: Class primaryClass = org.cougaar.glm.ldm.asset.AirConditionPG.class;
070: String assetSetter = "setAirConditionPG";
071: String assetGetter = "getAirConditionPG";
072: /** The Null instance for indicating that the PG definitely has no value **/
073: AirConditionPG nullPG = new Null_AirConditionPG();
074:
075: /** Null_PG implementation for AirConditionPG **/
076: final class Null_AirConditionPG implements AirConditionPG, Null_PG {
077: public Distance getCeiling() {
078: throw new UndefinedValueException();
079: }
080:
081: public Speed getWindSpeed() {
082: throw new UndefinedValueException();
083: }
084:
085: public Temperature getTemperature() {
086: throw new UndefinedValueException();
087: }
088:
089: public double getPrecipitationRate() {
090: throw new UndefinedValueException();
091: }
092:
093: public Heading getWindHeading() {
094: throw new UndefinedValueException();
095: }
096:
097: public Distance getVisibility() {
098: throw new UndefinedValueException();
099: }
100:
101: public double getBarometricPressure() {
102: throw new UndefinedValueException();
103: }
104:
105: public boolean equals(Object object) {
106: throw new UndefinedValueException();
107: }
108:
109: public Object clone() throws CloneNotSupportedException {
110: throw new CloneNotSupportedException();
111: }
112:
113: public NewPropertyGroup unlock(Object key) {
114: return null;
115: }
116:
117: public PropertyGroup lock(Object key) {
118: return null;
119: }
120:
121: public PropertyGroup lock() {
122: return null;
123: }
124:
125: public PropertyGroup copy() {
126: return null;
127: }
128:
129: public Class getPrimaryClass() {
130: return primaryClass;
131: }
132:
133: public String getAssetGetMethod() {
134: return assetGetter;
135: }
136:
137: public String getAssetSetMethod() {
138: return assetSetter;
139: }
140:
141: public Class getIntrospectionClass() {
142: return AirConditionPGImpl.class;
143: }
144:
145: public boolean hasDataQuality() {
146: return false;
147: }
148:
149: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
150: return null;
151: }
152: }
153:
154: /** Future PG implementation for AirConditionPG **/
155: final class Future implements AirConditionPG, Future_PG {
156: public Distance getCeiling() {
157: waitForFinalize();
158: return _real.getCeiling();
159: }
160:
161: public Speed getWindSpeed() {
162: waitForFinalize();
163: return _real.getWindSpeed();
164: }
165:
166: public Temperature getTemperature() {
167: waitForFinalize();
168: return _real.getTemperature();
169: }
170:
171: public double getPrecipitationRate() {
172: waitForFinalize();
173: return _real.getPrecipitationRate();
174: }
175:
176: public Heading getWindHeading() {
177: waitForFinalize();
178: return _real.getWindHeading();
179: }
180:
181: public Distance getVisibility() {
182: waitForFinalize();
183: return _real.getVisibility();
184: }
185:
186: public double getBarometricPressure() {
187: waitForFinalize();
188: return _real.getBarometricPressure();
189: }
190:
191: public boolean equals(Object object) {
192: waitForFinalize();
193: return _real.equals(object);
194: }
195:
196: public Object clone() throws CloneNotSupportedException {
197: throw new CloneNotSupportedException();
198: }
199:
200: public NewPropertyGroup unlock(Object key) {
201: return null;
202: }
203:
204: public PropertyGroup lock(Object key) {
205: return null;
206: }
207:
208: public PropertyGroup lock() {
209: return null;
210: }
211:
212: public PropertyGroup copy() {
213: return null;
214: }
215:
216: public Class getPrimaryClass() {
217: return primaryClass;
218: }
219:
220: public String getAssetGetMethod() {
221: return assetGetter;
222: }
223:
224: public String getAssetSetMethod() {
225: return assetSetter;
226: }
227:
228: public Class getIntrospectionClass() {
229: return AirConditionPGImpl.class;
230: }
231:
232: public synchronized boolean hasDataQuality() {
233: return (_real != null) && _real.hasDataQuality();
234: }
235:
236: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
237: return (_real == null) ? null : (_real.getDataQuality());
238: }
239:
240: // Finalization support
241: private AirConditionPG _real = null;
242:
243: public synchronized void finalize(PropertyGroup real) {
244: if (real instanceof AirConditionPG) {
245: _real = (AirConditionPG) real;
246: notifyAll();
247: } else {
248: throw new IllegalArgumentException(
249: "Finalization with wrong class: " + real);
250: }
251: }
252:
253: private synchronized void waitForFinalize() {
254: while (_real == null) {
255: try {
256: wait();
257: } catch (InterruptedException _ie) {
258: // We should really let waitForFinalize throw InterruptedException
259: Thread.interrupted();
260: }
261: }
262: }
263: }
264: }
|