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 MilitaryOrgPG.
029: * @see NewMilitaryOrgPG
030: * @see MilitaryOrgPGImpl
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 MilitaryOrgPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: String getStandardName();
047:
048: /** The UIC (Unit Identification Code) of the unit. **/
049: String getUIC();
050:
051: /** The Joint Unit Type Code, specifying the type of unit. **/
052: String getUTC();
053:
054: /** The Army SRC, specifying the type of Unit. **/
055: String getSRC();
056:
057: /** The numeric code specifying the echelon of the unit. 08:Division, 07:Brigade, 06:Regiment, 05:Battalion, 04:Company. Codes are traditionally printed as two figures with a leading zero if necessary. **/
058: String getEchelon();
059:
060: /** The requested echelon of support for the unit. Should map to MilitaryEchelon constants - **/
061: String getRequestedEchelonOfSupport();
062:
063: /** The 2525A hierarchy designator, used to specify the symbol for the organization on a map. **/
064: String getHierarchy2525();
065:
066: boolean getIsReserve();
067:
068: /** Location of the Org when it is not deployed. Should match AssignedPG.homeStation if defined. **/
069: Location getHomeLocation();
070:
071: // introspection and construction
072: /** the method of factoryClass that creates this type **/
073: String factoryMethod = "newMilitaryOrgPG";
074: /** the (mutable) class type returned by factoryMethod **/
075: String mutableClass = "org.cougaar.glm.ldm.asset.NewMilitaryOrgPG";
076: /** the factory class **/
077: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
078: /** the (immutable) class type returned by domain factory **/
079: Class primaryClass = org.cougaar.glm.ldm.asset.MilitaryOrgPG.class;
080: String assetSetter = "setMilitaryOrgPG";
081: String assetGetter = "getMilitaryOrgPG";
082: /** The Null instance for indicating that the PG definitely has no value **/
083: MilitaryOrgPG nullPG = new Null_MilitaryOrgPG();
084:
085: /** Null_PG implementation for MilitaryOrgPG **/
086: final class Null_MilitaryOrgPG implements MilitaryOrgPG, Null_PG {
087: public String getStandardName() {
088: throw new UndefinedValueException();
089: }
090:
091: public String getUIC() {
092: throw new UndefinedValueException();
093: }
094:
095: public String getUTC() {
096: throw new UndefinedValueException();
097: }
098:
099: public String getSRC() {
100: throw new UndefinedValueException();
101: }
102:
103: public String getEchelon() {
104: throw new UndefinedValueException();
105: }
106:
107: public String getRequestedEchelonOfSupport() {
108: throw new UndefinedValueException();
109: }
110:
111: public String getHierarchy2525() {
112: throw new UndefinedValueException();
113: }
114:
115: public boolean getIsReserve() {
116: throw new UndefinedValueException();
117: }
118:
119: public Location getHomeLocation() {
120: throw new UndefinedValueException();
121: }
122:
123: public boolean equals(Object object) {
124: throw new UndefinedValueException();
125: }
126:
127: public Object clone() throws CloneNotSupportedException {
128: throw new CloneNotSupportedException();
129: }
130:
131: public NewPropertyGroup unlock(Object key) {
132: return null;
133: }
134:
135: public PropertyGroup lock(Object key) {
136: return null;
137: }
138:
139: public PropertyGroup lock() {
140: return null;
141: }
142:
143: public PropertyGroup copy() {
144: return null;
145: }
146:
147: public Class getPrimaryClass() {
148: return primaryClass;
149: }
150:
151: public String getAssetGetMethod() {
152: return assetGetter;
153: }
154:
155: public String getAssetSetMethod() {
156: return assetSetter;
157: }
158:
159: public Class getIntrospectionClass() {
160: return MilitaryOrgPGImpl.class;
161: }
162:
163: public boolean hasDataQuality() {
164: return false;
165: }
166:
167: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
168: return null;
169: }
170: }
171:
172: /** Future PG implementation for MilitaryOrgPG **/
173: final class Future implements MilitaryOrgPG, Future_PG {
174: public String getStandardName() {
175: waitForFinalize();
176: return _real.getStandardName();
177: }
178:
179: public String getUIC() {
180: waitForFinalize();
181: return _real.getUIC();
182: }
183:
184: public String getUTC() {
185: waitForFinalize();
186: return _real.getUTC();
187: }
188:
189: public String getSRC() {
190: waitForFinalize();
191: return _real.getSRC();
192: }
193:
194: public String getEchelon() {
195: waitForFinalize();
196: return _real.getEchelon();
197: }
198:
199: public String getRequestedEchelonOfSupport() {
200: waitForFinalize();
201: return _real.getRequestedEchelonOfSupport();
202: }
203:
204: public String getHierarchy2525() {
205: waitForFinalize();
206: return _real.getHierarchy2525();
207: }
208:
209: public boolean getIsReserve() {
210: waitForFinalize();
211: return _real.getIsReserve();
212: }
213:
214: public Location getHomeLocation() {
215: waitForFinalize();
216: return _real.getHomeLocation();
217: }
218:
219: public boolean equals(Object object) {
220: waitForFinalize();
221: return _real.equals(object);
222: }
223:
224: public Object clone() throws CloneNotSupportedException {
225: throw new CloneNotSupportedException();
226: }
227:
228: public NewPropertyGroup unlock(Object key) {
229: return null;
230: }
231:
232: public PropertyGroup lock(Object key) {
233: return null;
234: }
235:
236: public PropertyGroup lock() {
237: return null;
238: }
239:
240: public PropertyGroup copy() {
241: return null;
242: }
243:
244: public Class getPrimaryClass() {
245: return primaryClass;
246: }
247:
248: public String getAssetGetMethod() {
249: return assetGetter;
250: }
251:
252: public String getAssetSetMethod() {
253: return assetSetter;
254: }
255:
256: public Class getIntrospectionClass() {
257: return MilitaryOrgPGImpl.class;
258: }
259:
260: public synchronized boolean hasDataQuality() {
261: return (_real != null) && _real.hasDataQuality();
262: }
263:
264: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
265: return (_real == null) ? null : (_real.getDataQuality());
266: }
267:
268: // Finalization support
269: private MilitaryOrgPG _real = null;
270:
271: public synchronized void finalize(PropertyGroup real) {
272: if (real instanceof MilitaryOrgPG) {
273: _real = (MilitaryOrgPG) real;
274: notifyAll();
275: } else {
276: throw new IllegalArgumentException(
277: "Finalization with wrong class: " + real);
278: }
279: }
280:
281: private synchronized void waitForFinalize() {
282: while (_real == null) {
283: try {
284: wait();
285: } catch (InterruptedException _ie) {
286: // We should really let waitForFinalize throw InterruptedException
287: Thread.interrupted();
288: }
289: }
290: }
291: }
292: }
|