Source Code Cross Referenced for RelationshipData.java in  » Science » Cougaar12_4 » org » cougaar » tools » csmart » core » cdata » 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.tools.csmart.core.cdata 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * <copyright>
003:         *  
004:         *  Copyright 2001-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.tools.csmart.core.cdata;
027:
028:        import java.io.Serializable;
029:
030:        /**
031:         * Represents a Relationship for an asset.
032:         * All relationships contain three values:
033:         * <ul>
034:         * <li> Type:  This is the type of relationship </li>
035:         * <li> Item:  This is Agent we are forming a relationship with </li>
036:         * <li> Role: This is a role performed by this asset. </li>
037:         * </ul>
038:         *
039:         * There are two type of ini file formats: <br>
040:         * "Supporting"    "1BDE"   "StrategicTransportProvider" <br>
041:         * Where the fields are: <br>
042:         * <Type>   <Supported Agent>  <Role>
043:         * <br>and<br>
044:         * "StrategicTransportProvider" "UIC/1BDE" "UTC/RTOrg" "1BDE" "" "" <br>
045:         * Where the fields are: <br>
046:         * <Type> <ItemId> <TypeId> <Supported Agent> <Start Time> <Stop Time>
047:         *
048:         */
049:        public class RelationshipData implements  Serializable {
050:
051:            private String type = "";
052:            private String role = "";
053:            private String itemId = "";
054:            private String typeId = "";
055:            private long startTime = 0L;
056:            private long endTime = 0L;
057:            private String supported = "";
058:
059:            /** Types of relationships **/
060:            // (not really important if everything else is correct)
061:            public static final String SUPERIOR = "Superior";
062:            public static final String SUPPORTING = "Supporting";
063:
064:            /**
065:             * Creates a new <code>RelationshipData</code> instance.
066:             *
067:             */
068:            public RelationshipData() {
069:            }
070:
071:            /**
072:             * Sets the type of relationship
073:             *
074:             * @param type of relationship
075:             */
076:            public void setType(String type) {
077:                if (type == null)
078:                    throw new IllegalArgumentException(
079:                            "Attempt to set Type to null for RelationshipData: "
080:                                    + this );
081:
082:                this .type = type;
083:            }
084:
085:            /**
086:             * Gets the type of relationship.
087:             *
088:             * @return relationship type.
089:             */
090:            public String getType() {
091:                return this .type;
092:            }
093:
094:            /**
095:             * Sets the ItemId of a relationship, this
096:             * is usually the agent name we are forming
097:             * a relationship with.
098:             *
099:             * @param itemId name
100:             */
101:            public void setItemId(String itemId) {
102:                this .itemId = itemId;
103:            }
104:
105:            /**
106:             * Gets the ItemId for this relationship
107:             *
108:             * @return an itemId name
109:             */
110:            public String getItemId() {
111:                return this .itemId;
112:            }
113:
114:            public void setTypeId(String typeId) {
115:                this .typeId = typeId;
116:            }
117:
118:            public String getTypeId() {
119:                return this .typeId;
120:            }
121:
122:            /**
123:             * Sets a single role for this relationship
124:             *
125:             * @param role performed by this asset.
126:             */
127:            public void setRole(String role) {
128:                this .role = role;
129:            }
130:
131:            /**
132:             * Gets a single role performed by this asset.
133:             *
134:             * @return role
135:             */
136:            public String getRole() {
137:                return this .role;
138:            }
139:
140:            /**
141:             * Sets the start time for the time-phased object
142:             *
143:             * @param start 
144:             */
145:            public void setStartTime(long start) {
146:                this .startTime = start;
147:            }
148:
149:            /**
150:             * Sets the End time for the time-phased object.
151:             *
152:             * @param end 
153:             */
154:            public void setEndTime(long end) {
155:                this .endTime = end;
156:            }
157:
158:            /**
159:             * Gets the Start Time for the time
160:             * phased object
161:             *
162:             * @return start time.
163:             */
164:            public long getStartTime() {
165:                return startTime;
166:            }
167:
168:            /**
169:             * Gets the End time for the time 
170:             * phased object. 
171:             *
172:             * @return end time
173:             */
174:            public long getEndTime() {
175:                return endTime;
176:            }
177:
178:            /**
179:             * Sets the agent supported by this relationship
180:             *
181:             * @param supported agent
182:             */
183:            public void setSupported(String supported) {
184:                this .supported = supported;
185:            }
186:
187:            /**
188:             * Gets the agent supported by this relationship
189:             *
190:             * @return agent
191:             */
192:            public String getSupported() {
193:                return this .supported;
194:            }
195:
196:            /**
197:             * For debugging, get contents of relationship data.
198:             * @return String fields in relationship data
199:             */
200:            public String toString() {
201:                StringBuffer sb = new StringBuffer(300);
202:                sb.append("Type: " + type);
203:                sb.append(" Role: " + role);
204:                sb.append(" ItemId: " + itemId);
205:                sb.append(" TypeId: " + typeId);
206:                sb.append(" Start Time: " + startTime);
207:                sb.append(" End Time: " + endTime);
208:                sb.append(" Supported: " + supported);
209:                return sb.toString();
210:            }
211:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.