Source Code Cross Referenced for PlanElement.java in  » Science » Cougaar12_4 » org » cougaar » planning » ldm » plan » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.planning.ldm.plan 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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:        package org.cougaar.planning.ldm.plan;
028:
029:        import org.cougaar.core.blackboard.ChangeReport;
030:        import org.cougaar.core.blackboard.ClaimableHolder;
031:        import org.cougaar.core.blackboard.Publishable;
032:        import org.cougaar.core.util.UniqueObject;
033:
034:        /**
035:         * PlanElements are the primitive building blocks from which 
036:         * planning models are constructed. A single PlanElement represents a 
037:         * cycle of work completed against a Task. A PlanElement is of 
038:         * type Expansion (represented by a Workflow and the implied tasks 
039:         * embodied in it), Allocation (represented by an Asset),
040:         *  Aggregation (represented by an MPWorkflow) or AssetTransfer. 
041:         **/
042:
043:        public interface PlanElement extends ScheduleElement, UniqueObject,
044:                Annotatable, ClaimableHolder, Publishable {
045:
046:            /** @return Plan the Plan of this plan element.
047:             **/
048:            Plan getPlan();
049:
050:            /** This returns the Task of the PlanElement. 
051:             * @return Task
052:             **/
053:
054:            Task getTask();
055:
056:            /** Returns the estimated allocation result that is related to performing
057:             * the Task.
058:             * @return AllocationResult
059:             **/
060:
061:            AllocationResult getEstimatedResult();
062:
063:            /**
064:             * Returns the reported allocation result. The reported result is
065:             * computed from the received and observed results
066:             * @return AllocationResult
067:             **/
068:            AllocationResult getReportedResult();
069:
070:            /** Returns the received allocation result.
071:             * @return AllocationResult
072:             **/
073:            AllocationResult getReceivedResult();
074:
075:            /**
076:             * Returns the observed allocation result.
077:             * @return AllocationResult
078:             **/
079:            AllocationResult getObservedResult();
080:
081:            /** Set the estimated allocation result so that a notification will
082:             * propagate up another level.
083:             * @param estimatedresult
084:             **/
085:            void setEstimatedResult(AllocationResult estimatedresult);
086:
087:            /**
088:             * Set the observed allocation result that be incorporated into the
089:             * reported result
090:             * @param observedResult
091:             **/
092:            void setObservedResult(AllocationResult observedResult);
093:
094:            interface PlanElementChangeReport extends ChangeReport {
095:            }
096:
097:            abstract class ResultChangeReport implements 
098:                    PlanElementChangeReport {
099:                private int type;
100:                public final static int UNDEFINED_TYPE = AspectType.UNDEFINED;
101:                private double oldValue;
102:                public final static double UNDEFINED_VALUE = Double.MIN_VALUE;
103:
104:                public ResultChangeReport() {
105:                    type = UNDEFINED_TYPE;
106:                    oldValue = UNDEFINED_VALUE;
107:                }
108:
109:                public ResultChangeReport(int t) {
110:                    type = t;
111:                    oldValue = UNDEFINED_VALUE;
112:                }
113:
114:                public ResultChangeReport(int t, double o) {
115:                    type = t;
116:                    oldValue = o;
117:                }
118:
119:                /** May return AspectType.UNDEFINED if the aspect type id is unknown **/
120:                public int getAspectType() {
121:                    return type;
122:                }
123:
124:                /** old value if known.  If unknown (e.g. no previous value)
125:                 * will return Double.MIN_VALUE.
126:                 **/
127:                public double getOldValue() {
128:                    return oldValue;
129:                }
130:
131:                public int hashCode() {
132:                    return getClass().hashCode() + type;
133:                }
134:
135:                public boolean equals(Object o) {
136:                    if (o == null)
137:                        return false;
138:
139:                    return (this  == o)
140:                            || (o.getClass() == getClass() && ((ResultChangeReport) o).type == type);
141:                }
142:
143:                public String toString() {
144:                    if (type == UNDEFINED_TYPE) {
145:                        return " (?)";
146:                    } else {
147:                        return " (" + type + ")";
148:                    }
149:                }
150:            }
151:
152:            // change reports
153:
154:            /** Something in the Estimated result changed. **/
155:            class EstimatedResultChangeReport extends ResultChangeReport {
156:                public EstimatedResultChangeReport() {
157:                    super ();
158:                }
159:
160:                public EstimatedResultChangeReport(int t) {
161:                    super (t);
162:                }
163:
164:                public EstimatedResultChangeReport(int t, double ov) {
165:                    super (t, ov);
166:                }
167:
168:                public String toString() {
169:                    return "EstimatedResultChangeReport" + super .toString();
170:                }
171:            }
172:
173:            /** Something in the reported result changed. **/
174:            class ReportedResultChangeReport extends ResultChangeReport {
175:                public ReportedResultChangeReport() {
176:                    super ();
177:                }
178:
179:                public ReportedResultChangeReport(int t) {
180:                    super (t);
181:                }
182:
183:                public ReportedResultChangeReport(int t, double ov) {
184:                    super (t, ov);
185:                }
186:
187:                public String toString() {
188:                    return "ReportedResultChangeReport" + super .toString();
189:                }
190:            }
191:
192:            /** Something in the observed result changed. **/
193:            class ObservedResultChangeReport extends ResultChangeReport {
194:                public ObservedResultChangeReport() {
195:                    super ();
196:                }
197:
198:                public ObservedResultChangeReport(int t) {
199:                    super (t);
200:                }
201:
202:                public ObservedResultChangeReport(int t, double ov) {
203:                    super (t, ov);
204:                }
205:
206:                public String toString() {
207:                    return "ObservedResultChangeReport" + super.toString();
208:                }
209:            }
210:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.