1 /**
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * If it is not possible or desirable to put the notice in a particular
7 * file, then You may include the notice in a location (such as a LICENSE
8 * file in a relevant directory) where a recipient would be likely to look
9 * for such a notice.
10
11 *
12 */
13
14 /* ---------------------------------------------------------------------------
15 * U.S. Government, Department of the Army
16 * Army Materiel Command
17 * Research Development Engineering Command
18 * Communications Electronics Research Development and Engineering Center
19 * ---------------------------------------------------------------------------
20 */
21
22 package org.oasis_open.docs.wsdm.mows_2;
23
24 import java.math.BigInteger;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.List;
28 import java.util.Map;
29 import javax.xml.bind.annotation.XmlAccessType;
30 import javax.xml.bind.annotation.XmlAccessorType;
31 import javax.xml.bind.annotation.XmlAnyAttribute;
32 import javax.xml.bind.annotation.XmlAnyElement;
33 import javax.xml.bind.annotation.XmlAttribute;
34 import javax.xml.bind.annotation.XmlElement;
35 import javax.xml.bind.annotation.XmlRootElement;
36 import javax.xml.bind.annotation.XmlSchemaType;
37 import javax.xml.bind.annotation.XmlType;
38 import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
39 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
40 import javax.xml.namespace.QName;
41 import org.w3c.dom.Element;
42
43
44 /**
45 * <p>Java class for anonymous complex type.
46 *
47 * <p>The following schema fragment specifies the expected content contained within this class.
48 *
49 * <pre>
50 * <complexType>
51 * <complexContent>
52 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
53 * <sequence>
54 * <choice>
55 * <element ref="{http://docs.oasis-open.org/wsdm/mows-2.xsd}IPV4Address"/>
56 * <element ref="{http://docs.oasis-open.org/wsdm/mows-2.xsd}IPV6Address"/>
57 * </choice>
58 * <any/>
59 * </sequence>
60 * <attribute name="Direction" use="required" type="{http://docs.oasis-open.org/wsdm/mows-2.xsd}TcpIpDirectionType" />
61 * <attribute name="Port" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
62 * <attribute name="Protocol" use="required" type="{http://docs.oasis-open.org/wsdm/mows-2.xsd}TcpIpProtocolType" />
63 * </restriction>
64 * </complexContent>
65 * </complexType>
66 * </pre>
67 *
68 *
69 */
70 @XmlAccessorType(XmlAccessType.FIELD)
71 @XmlType(name = "", propOrder = {
72 "ipv4Address",
73 "ipv6Address",
74 "any"
75 })
76 @XmlRootElement(name = "TcpIpInfo")
77 public class TcpIpInfo {
78
79 @XmlElement(name = "IPV4Address", type = String.class)
80 @XmlJavaTypeAdapter(HexBinaryAdapter.class)
81 protected byte[] ipv4Address;
82 @XmlElement(name = "IPV6Address", type = String.class)
83 @XmlJavaTypeAdapter(HexBinaryAdapter.class)
84 protected byte[] ipv6Address;
85 @XmlAnyElement(lax = true)
86 protected List<Object> any;
87 @XmlAttribute(name = "Direction", required = true)
88 protected TcpIpDirectionType direction;
89 @XmlAttribute(name = "Port", required = true)
90 @XmlSchemaType(name = "positiveInteger")
91 protected BigInteger port;
92 @XmlAttribute(name = "Protocol", required = true)
93 protected TcpIpProtocolType protocol;
94 @XmlAnyAttribute
95 private Map<QName, String> otherAttributes = new HashMap<QName, String>();
96
97 /**
98 * Gets the value of the ipv4Address property.
99 *
100 * @return
101 * possible object is
102 * {@link String }
103 *
104 */
105 public byte[] getIPV4Address() {
106 return ipv4Address;
107 }
108
109 /**
110 * Sets the value of the ipv4Address property.
111 *
112 * @param value
113 * allowed object is
114 * {@link String }
115 *
116 */
117 public void setIPV4Address(byte[] value) {
118 this.ipv4Address = ((byte[]) value);
119 }
120
121 /**
122 * Gets the value of the ipv6Address property.
123 *
124 * @return
125 * possible object is
126 * {@link String }
127 *
128 */
129 public byte[] getIPV6Address() {
130 return ipv6Address;
131 }
132
133 /**
134 * Sets the value of the ipv6Address property.
135 *
136 * @param value
137 * allowed object is
138 * {@link String }
139 *
140 */
141 public void setIPV6Address(byte[] value) {
142 this.ipv6Address = ((byte[]) value);
143 }
144
145 /**
146 * Gets the value of the any property.
147 *
148 * <p>
149 * This accessor method returns a reference to the live list,
150 * not a snapshot. Therefore any modification you make to the
151 * returned list will be present inside the JAXB object.
152 * This is why there is not a <CODE>set</CODE> method for the any property.
153 *
154 * <p>
155 * For example, to add a new item, do as follows:
156 * <pre>
157 * getAny().add(newItem);
158 * </pre>
159 *
160 *
161 * <p>
162 * Objects of the following type(s) are allowed in the list
163 * {@link Element }
164 * {@link Object }
165 *
166 *
167 */
168 public List<Object> getAny() {
169 if (any == null) {
170 any = new ArrayList<Object>();
171 }
172 return this.any;
173 }
174
175 /**
176 * Gets the value of the direction property.
177 *
178 * @return
179 * possible object is
180 * {@link TcpIpDirectionType }
181 *
182 */
183 public TcpIpDirectionType getDirection() {
184 return direction;
185 }
186
187 /**
188 * Sets the value of the direction property.
189 *
190 * @param value
191 * allowed object is
192 * {@link TcpIpDirectionType }
193 *
194 */
195 public void setDirection(TcpIpDirectionType value) {
196 this.direction = value;
197 }
198
199 /**
200 * Gets the value of the port property.
201 *
202 * @return
203 * possible object is
204 * {@link BigInteger }
205 *
206 */
207 public BigInteger getPort() {
208 return port;
209 }
210
211 /**
212 * Sets the value of the port property.
213 *
214 * @param value
215 * allowed object is
216 * {@link BigInteger }
217 *
218 */
219 public void setPort(BigInteger value) {
220 this.port = value;
221 }
222
223 /**
224 * Gets the value of the protocol property.
225 *
226 * @return
227 * possible object is
228 * {@link TcpIpProtocolType }
229 *
230 */
231 public TcpIpProtocolType getProtocol() {
232 return protocol;
233 }
234
235 /**
236 * Sets the value of the protocol property.
237 *
238 * @param value
239 * allowed object is
240 * {@link TcpIpProtocolType }
241 *
242 */
243 public void setProtocol(TcpIpProtocolType value) {
244 this.protocol = value;
245 }
246
247 /**
248 * Gets a map that contains attributes that aren't bound to any typed property on this class.
249 *
250 * <p>
251 * the map is keyed by the name of the attribute and
252 * the value is the string value of the attribute.
253 *
254 * the map returned by this method is live, and you can add new attribute
255 * by updating the map directly. Because of this design, there's no setter.
256 *
257 *
258 * @return
259 * always non-null
260 */
261 public Map<QName, String> getOtherAttributes() {
262 return otherAttributes;
263 }
264
265 }