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: package org.cougaar.glm.ldm.oplan;
027:
028: import java.io.Serializable;
029: import java.util.HashMap;
030:
031: import org.cougaar.core.util.UID;
032: import org.cougaar.core.util.UniqueObject;
033: import org.cougaar.glm.ldm.plan.GeolocLocation;
034: import org.cougaar.planning.ldm.plan.Location;
035: import org.cougaar.planning.ldm.plan.LocationScheduleElement;
036: import org.cougaar.planning.ldm.plan.TaggedLocationScheduleElement;
037: import org.cougaar.planning.ldm.plan.Transferable;
038:
039: /**
040: * OrgActivity
041: * The OrgActivity method is a LDM Object that contains organizational activity information.
042: * TheOrgActivity object includes information such as activityName, activityType,
043: * opTempo, timespan, Location information, and a hashmap containing other
044: * detailed information. The OrgActivities are initially created in the J3 cluster
045: * and then is transferred to other clusters by the Propagation Plugin. Subordinate clusters can subscribe
046: * to changes in the OrgActivity information in order to react to changes accordingly.
047: * Subordinate clusters should not modify (set) OrgActivity information.
048: **/
049: public interface OrgActivity extends OplanContributor,
050: org.cougaar.util.TimeSpan, Transferable, UniqueObject,
051: Serializable, Cloneable {
052: //ActivityTypes
053: String DEPLOYMENT = "Deployment";
054: String DEPLOYMENT_PREPO = "Deployment-Prepo";
055: String EMPLOYMENT_CSS = "Employment-CSS";
056: String DEFENSIVE = "Employment-Defensive";
057: String OFFENSIVE = "Employment-Offensive";
058: String HOME = "Home";
059: String STAND_DOWN = "Stand-Down";
060: String REDEPLOYMENT = "Redeployment";
061: String RSOI = "RSOI";
062:
063: // Not in the official set
064: String RECEPTION = "Reception";
065: String RETROGRADE = "Retrograde";
066:
067: //Optempo
068: String HIGH_OPTEMPO = "High";
069: String MEDIUM_OPTEMPO = "Medium";
070: String LOW_OPTEMPO = "Low";
071:
072: String getActivityType();
073:
074: void setActivityType(String activityType);
075:
076: String getActivityName();
077:
078: void setActivityName(String activityName);
079:
080: String getOrgID();
081:
082: void setOrgID(String orgID);
083:
084: UID getOrgActivityId();
085:
086: void setOrgActivityId(UID uid);
087:
088: UID getOplanUID();
089:
090: void setOplanUID(UID oplanUID);
091:
092: /** @deprecated Use getOplanUID */
093: UID getOplanID();
094:
095: /** @deprecated Use setOplanUID */
096: void setOplanID(UID oplanUID);
097:
098: String getOpTempo();
099:
100: void setOpTempo(String opTempo);
101:
102: TimeSpan getTimeSpan();
103:
104: long getStartTime();
105:
106: long getEndTime();
107:
108: void setTimeSpan(TimeSpan ts);
109:
110: GeolocLocation getGeoLoc();
111:
112: void setGeoLoc(GeolocLocation geoLoc);
113:
114: String getActivityItem(String key);
115:
116: void addActivityItem(String key, String value);
117:
118: void modifyActivityItem(String key, String value);
119:
120: HashMap getItems();
121:
122: String getOpCon();
123:
124: void setOpCon(String opcon);
125:
126: String getAdCon();
127:
128: void setAdCon(String adcon);
129:
130: void setAll(Transferable other);
131:
132: boolean same(Transferable other);
133:
134: /** convert OPlan-centric location and timespan to
135: * standard ALPish (logplan) schedule element
136: * @return a LocationScheduleElement or null, if a locationscheduleelement
137: * cannot be constructed (e.g. no schedule, no location).
138: **/
139: LocationScheduleElement getNormalizedScheduleElement();
140:
141: /** LocationScheduleElement which is labelled with an associated
142: * OrgActivity UID so that it can be found and replaced or removed
143: * later.
144: **/
145: final class OAScheduleElement extends TaggedLocationScheduleElement {
146: /** UID of the owning OrgActivity **/
147: private UID uid;
148:
149: public OAScheduleElement(long t0, long t1, Location l, UID uid) {
150: super (t0, t1, l);
151: this .uid = uid;
152: }
153:
154: /** @return the UID of the associated OrgActivity. **/
155: public UID getOrgActivityUID() {
156: return uid;
157: }
158:
159: /** @return the UID of the associated OrgActivity **/
160: public Object getOwner() {
161: return uid;
162: }
163: }
164: }
|