|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Relationship.java | 50% | 100% | 100% | 89.5% |
|
1 |
/*
|
|
2 |
* Copyright 1999-2004 The Apache Software Foundation.
|
|
3 |
*
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
6 |
* You may obtain a copy of the License at
|
|
7 |
*
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9 |
*
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13 |
* See the License for the specific language governing permissions and
|
|
14 |
* limitations under the License.
|
|
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 | 3 |
public Relationship(String uri, String type)
|
59 |
throws URI.MalformedURIException {
|
|
60 | 3 |
this.uri = new URI(uri); |
61 | 3 |
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 | 4 |
public Relationship(URI uri, QName type) {
|
73 | 4 |
this.uri = uri;
|
74 | 4 |
this.type = (type == null) |
75 |
? Constants.QNAME_RESPONSE |
|
76 |
: type; |
|
77 |
} |
|
78 |
|
|
79 |
/**
|
|
80 |
* Constructor RelatesTo
|
|
81 |
*
|
|
82 |
*/
|
|
83 | 15 |
public Relationship() {
|
84 |
} |
|
85 |
|
|
86 |
/**
|
|
87 |
* Method getType
|
|
88 |
*
|
|
89 |
* @return
|
|
90 |
*/
|
|
91 | 17 |
public QName getType() {
|
92 | 17 |
return type;
|
93 |
} |
|
94 |
|
|
95 |
/**
|
|
96 |
* Method set_type
|
|
97 |
*
|
|
98 |
* @param type
|
|
99 |
*/
|
|
100 | 15 |
public void setType(QName type) { |
101 | 15 |
this.type = type;
|
102 |
} |
|
103 |
|
|
104 |
/**
|
|
105 |
* Method getURI
|
|
106 |
*
|
|
107 |
* @return
|
|
108 |
*/
|
|
109 | 18 |
public URI getURI() {
|
110 | 18 |
return uri;
|
111 |
} |
|
112 |
|
|
113 |
/**
|
|
114 |
* Method setURI
|
|
115 |
*
|
|
116 |
* @param uri
|
|
117 |
*/
|
|
118 | 15 |
public void setURI(URI uri) { |
119 | 15 |
this.uri = uri;
|
120 |
} |
|
121 |
} |
|
122 |
|
|
123 |
|
|
124 |
|
|