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