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