Source Code Cross Referenced for RelatesTo.java in  » Web-Services-AXIS2 » kernal » org » apache » axis2 » addressing » 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 » Web Services AXIS2 » kernal » org.apache.axis2.addressing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */
019:
020:        package org.apache.axis2.addressing;
021:
022:        import org.apache.axis2.util.ObjectStateUtils;
023:        import org.apache.commons.logging.Log;
024:        import org.apache.commons.logging.LogFactory;
025:
026:        import java.io.Externalizable;
027:        import java.io.IOException;
028:        import java.io.ObjectInput;
029:        import java.io.ObjectOutput;
030:        import java.util.ArrayList;
031:
032:        /**
033:         * Class RelatesTo
034:         */
035:        public class RelatesTo implements  Externalizable {
036:
037:            /*
038:             * setup for logging
039:             */
040:            private static final Log log = LogFactory.getLog(RelatesTo.class);
041:
042:            private static final String myClassName = "RelatesTo";
043:
044:            /**
045:             * @serial The serialization version ID tracks the version of the class.
046:             * If a class definition changes, then the serialization/externalization
047:             * of the class is affected. If a change to the class is made which is
048:             * not compatible with the serialization/externalization of the class,
049:             * then the serialization version ID should be updated.
050:             * Refer to the "serialVer" utility to compute a serialization
051:             * version ID.
052:             */
053:            private static final long serialVersionUID = -1120384315333414960L;
054:
055:            /**
056:             * @serial Tracks the revision level of a class to identify changes to the
057:             * class definition that are compatible to serialization/externalization.
058:             * If a class definition changes, then the serialization/externalization
059:             * of the class is affected.
060:             * Refer to the writeExternal() and readExternal() methods.
061:             */
062:            // supported revision levels, add a new level to manage compatible changes
063:            private static final int REVISION_1 = 1;
064:            // current revision level of this object
065:            private static final int revisionID = REVISION_1;
066:
067:            /**
068:             * Field relationshipType
069:             */
070:            private String relationshipType;
071:
072:            /**
073:             * Field value
074:             */
075:            private String value;
076:
077:            private ArrayList extensibilityAttributes = null;
078:
079:            /**
080:             * Constructor RelatesTo
081:             */
082:            public RelatesTo() {
083:            }
084:
085:            /**
086:             * Constructor RelatesTo
087:             *
088:             * @param value
089:             */
090:            public RelatesTo(String value) {
091:                this .value = value;
092:            }
093:
094:            /**
095:             * Constructor RelatesTo
096:             *
097:             * @param value
098:             * @param relationshipType
099:             */
100:            public RelatesTo(String value, String relationshipType) {
101:                this .value = value;
102:                this .relationshipType = relationshipType;
103:            }
104:
105:            /**
106:             * Method getRelationshipType. If the relationship type has not been set it returns
107:             * the default value {@link AddressingConstants.Final.WSA_DEFAULT_RELATIONSHIP_TYPE}
108:             */
109:            public String getRelationshipType() {
110:                return (relationshipType != null
111:                        && !"".equals(relationshipType) ? relationshipType
112:                        : AddressingConstants.Final.WSA_DEFAULT_RELATIONSHIP_TYPE);
113:            }
114:
115:            /**
116:             * Method getValue
117:             */
118:            public String getValue() {
119:                return value;
120:            }
121:
122:            /**
123:             * Method setRelationshipType
124:             *
125:             * @param relationshipType
126:             */
127:            public void setRelationshipType(String relationshipType) {
128:                this .relationshipType = relationshipType;
129:            }
130:
131:            /**
132:             * Method setValue
133:             *
134:             * @param value
135:             */
136:            public void setValue(String value) {
137:                this .value = value;
138:            }
139:
140:            public ArrayList getExtensibilityAttributes() {
141:                return extensibilityAttributes;
142:            }
143:
144:            public void setExtensibilityAttributes(
145:                    ArrayList extensibilityAttributes) {
146:                this .extensibilityAttributes = extensibilityAttributes;
147:            }
148:
149:            /*
150:             *  (non-Javadoc)
151:             * @see java.lang.Object#toString()
152:             */
153:            public String toString() {
154:                return "Identifier: " + value + ", Relationship type: "
155:                        + relationshipType;
156:            }
157:
158:            /* ===============================================================
159:             * Externalizable support
160:             * ===============================================================
161:             */
162:
163:            /**
164:             * Save the contents of this object.
165:             * <p/>
166:             * NOTE: Transient fields and static fields are not saved.
167:             *
168:             * @param out The stream to write the object contents to
169:             * @throws IOException
170:             */
171:            public void writeExternal(ObjectOutput out) throws IOException {
172:                // write out contents of this object
173:
174:                // NOTES: For each item, where appropriate,
175:                //        write out the following information, IN ORDER:
176:                //           the class name
177:                //           the active or empty flag
178:                //           the data length, if appropriate
179:                //           the data   
180:
181:                //---------------------------------------------------------
182:                // in order to handle future changes to the object 
183:                // definition, be sure to maintain the 
184:                // object level identifiers
185:                //---------------------------------------------------------
186:                // serialization version ID
187:                out.writeLong(serialVersionUID);
188:
189:                // revision ID
190:                out.writeInt(revisionID);
191:
192:                //---------------------------------------------------------
193:                // various strings
194:                //---------------------------------------------------------
195:
196:                // String relationshipType
197:                ObjectStateUtils.writeString(out, relationshipType,
198:                        "RelatesTo.relationshipType");
199:
200:                // String value
201:                ObjectStateUtils.writeString(out, value, "RelatesTo.value");
202:
203:                //---------------------------------------------------------
204:                // collections and lists
205:                //---------------------------------------------------------
206:
207:                ObjectStateUtils.writeArrayList(out, extensibilityAttributes,
208:                        "RelatesTo.extensibilityAttributes");
209:
210:            }
211:
212:            /**
213:             * Restore the contents of the object that was
214:             * previously saved.
215:             * <p/>
216:             * NOTE: The field data must read back in the same order and type
217:             * as it was written.  Some data will need to be validated when
218:             * resurrected.
219:             *
220:             * @param in The stream to read the object contents from
221:             * @throws IOException
222:             * @throws ClassNotFoundException
223:             */
224:            public void readExternal(ObjectInput in) throws IOException,
225:                    ClassNotFoundException {
226:                // serialization version ID
227:                long suid = in.readLong();
228:
229:                // revision ID
230:                int revID = in.readInt();
231:
232:                // make sure the object data is in a version we can handle
233:                if (suid != serialVersionUID) {
234:                    throw new ClassNotFoundException(
235:                            ObjectStateUtils.UNSUPPORTED_SUID);
236:                }
237:
238:                // make sure the object data is in a revision level we can handle
239:                if (revID != REVISION_1) {
240:                    throw new ClassNotFoundException(
241:                            ObjectStateUtils.UNSUPPORTED_REVID);
242:                }
243:
244:                //---------------------------------------------------------
245:                // various strings
246:                //---------------------------------------------------------
247:
248:                // String relationshipType
249:                relationshipType = ObjectStateUtils.readString(in,
250:                        "RelatesTo.relationshipType");
251:
252:                // String value
253:                value = ObjectStateUtils.readString(in, "RelatesTo.value");
254:
255:                //---------------------------------------------------------
256:                // collections and lists
257:                //---------------------------------------------------------
258:
259:                // ArrayList extensibilityAttributes
260:                ArrayList tmpAL2 = ObjectStateUtils.readArrayList(in,
261:                        "RelatesTo.extensibilityAttributes");
262:                if (tmpAL2 != null) {
263:                    extensibilityAttributes = new ArrayList(tmpAL2);
264:                } else {
265:                    extensibilityAttributes = null;
266:                }
267:
268:            }
269:
270:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.