Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
StringMapEntry |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007-2010 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php | |
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 | package org.kuali.rice.core.jaxb; | |
17 | ||
18 | import java.util.Map; | |
19 | ||
20 | import javax.xml.bind.annotation.XmlAttribute; | |
21 | import javax.xml.bind.annotation.XmlElement; | |
22 | ||
23 | /** | |
24 | * Single String-String key-value pair for | |
25 | * marshalling/unmarshalling. Need this rather than | |
26 | * general Map.Entry<String, String> to specify | |
27 | * cardinality in resulting wsdl's. | |
28 | * | |
29 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
30 | * | |
31 | */ | |
32 | public class StringMapEntry { | |
33 | ||
34 | private static final long serialVersionUID = 1L; | |
35 | ||
36 | @XmlAttribute | |
37 | String key; | |
38 | ||
39 | @XmlElement(required=true) // maxoccurs == minoccurs == 1 | |
40 | String value; | |
41 | ||
42 | /** | |
43 | * | |
44 | */ | |
45 | 0 | public StringMapEntry() {} |
46 | ||
47 | /** | |
48 | * @param name | |
49 | * @param value | |
50 | */ | |
51 | 0 | public StringMapEntry(String key, String value) { |
52 | 0 | this.key = key; |
53 | 0 | this.value = value; |
54 | 0 | } |
55 | ||
56 | /** | |
57 | * This constructs a ... | |
58 | * | |
59 | * @param e | |
60 | */ | |
61 | 0 | public StringMapEntry(Map.Entry<String, String> e) { |
62 | 0 | this.key = e.getKey(); |
63 | 0 | this.value = e.getValue(); |
64 | 0 | } |
65 | } |