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