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