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