View Javadoc

1   /*
2    *
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *     http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.hadoop.hbase.rest.model;
21  
22  import java.io.Serializable;
23  
24  import javax.xml.bind.annotation.XmlRootElement;
25  import javax.xml.bind.annotation.XmlValue;
26  
27  import org.apache.hadoop.classification.InterfaceAudience;
28  
29  /**
30   * Simple representation of the version of the storage cluster
31   * 
32   * <pre>
33   * &lt;complexType name="StorageClusterVersion"&gt;
34   *   &lt;attribute name="version" type="string"&gt;&lt;/attribute&gt;
35   * &lt;/complexType&gt;
36   * </pre>
37   */
38  @XmlRootElement(name="ClusterVersion")
39  @InterfaceAudience.Private
40  public class StorageClusterVersionModel implements Serializable {
41  	private static final long serialVersionUID = 1L;
42  
43  	private String version;
44  
45  	/**
46  	 * @return the storage cluster version
47  	 */
48  	@XmlValue
49  	public String getVersion() {
50  	  return version;
51  	}
52  
53  	/**
54  	 * @param version the storage cluster version
55  	 */
56  	public void setVersion(String version) {
57  	  this.version = version;
58  	}
59  
60  	/* (non-Javadoc)
61  	 * @see java.lang.Object#toString()
62  	 */
63  	@Override
64  	public String toString() {
65  	  return version;
66  	}
67  }