1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.axis.message.addressing;
19
20 import org.apache.axis.types.URI;
21
22 import javax.xml.namespace.QName;
23
24 /***
25 * Java content class for Relationship complex type.
26 * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at http://schemas.xmlsoap.org/ws/2004/08/addressing line 84)
27 * <p>
28 * <pre>
29 * <complexType name="Relationship">
30 * <simpleContent>
31 * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
32 * <attribute name="RelationshipType" type="{http://www.w3.org/2001/XMLSchema}QName" />
33 * </extension>
34 * </simpleContent>
35 * </complexType>
36 * </pre>
37 *
38 * @author Davanum Srinivas (dims@yahoo.com)
39 */
40 public class Relationship {
41 /***
42 * Field type
43 */
44 private URI uri;
45
46 /***
47 * Field type
48 */
49 private QName type;
50
51 /***
52 * Constructor RelatesTo
53 *
54 * @param uri
55 * @param type
56 * @throws URI.MalformedURIException
57 */
58 public Relationship(String uri, String type)
59 throws URI.MalformedURIException {
60 this.uri = new URI(uri);
61 this.type = (type == null)
62 ? Constants.QNAME_RESPONSE
63 : new QName(type);
64 }
65
66 /***
67 * Constructor RelatesTo
68 *
69 * @param uri
70 * @param type
71 */
72 public Relationship(URI uri, QName type) {
73 this.uri = uri;
74 this.type = (type == null)
75 ? Constants.QNAME_RESPONSE
76 : type;
77 }
78
79 /***
80 * Constructor RelatesTo
81 *
82 */
83 public Relationship() {
84 }
85
86 /***
87 * Method getType
88 *
89 * @return
90 */
91 public QName getType() {
92 return type;
93 }
94
95 /***
96 * Method set_type
97 *
98 * @param type
99 */
100 public void setType(QName type) {
101 this.type = type;
102 }
103
104 /***
105 * Method getURI
106 *
107 * @return
108 */
109 public URI getURI() {
110 return uri;
111 }
112
113 /***
114 * Method setURI
115 *
116 * @param uri
117 */
118 public void setURI(URI uri) {
119 this.uri = uri;
120 }
121 }
122
123