View Javadoc

1   /*
2      Licensed under the Apache License, Version 2.0 (the "License");
3      you may not use this file except in compliance with the License.
4      You may obtain a copy of the License at
5   
6        http://www.apache.org/licenses/LICENSE-2.0
7   
8      Unless required by applicable law or agreed to in writing, software
9      distributed under the License is distributed on an "AS IS" BASIS,
10     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11     See the License for the specific language governing permissions and
12     limitations under the License.
13  */
14  package uk.nhs.interoperability.infrastructure;
15  
16  // TODO: Auto-generated Javadoc
17  /**
18   * The Class ITKAddressImpl.
19   *
20   * @author Michael Odling-Smee
21   * @author Nicholas Jone
22   * @since 0.1
23   */
24  public class ITKAddressImpl implements ITKAddress {
25  	
26  	/** The uri. */
27  	private String URI;
28  	
29  	/** The type. */
30  	private String type;
31  	
32  	/**
33  	 * Instantiates a new iTK address impl.
34  	 *
35  	 * @param URI the uri
36  	 * @param type the type
37  	 */
38  	public ITKAddressImpl(String URI, String type){
39  		this.URI = URI;
40  		this.type = type;
41  	}
42  	
43  	/**
44  	 * Instantiates a new iTK address impl.
45  	 *
46  	 * @param URI the uri
47  	 */
48  	public ITKAddressImpl(String URI){
49  		this.URI = URI;
50  		this.type = ITKAddress.DEFAULT_ADDRESS_TYPE;
51  	}
52  
53  	/* (non-Javadoc)
54  	 * @see uk.nhs.interoperability.infrastructure.ITKAddress#getURI()
55  	 */
56  	@Override
57  	public String getURI() {
58  		return URI;
59  	}
60  	
61  	/* (non-Javadoc)
62  	 * @see uk.nhs.interoperability.infrastructure.ITKAddress#setURI(java.lang.String)
63  	 */
64  	@Override
65  	public void setURI(String uRI) {
66  		URI = uRI;
67  	}
68  	
69  	/* (non-Javadoc)
70  	 * @see uk.nhs.interoperability.infrastructure.ITKAddress#getType()
71  	 */
72  	@Override
73  	public String getType() {
74  		return type;
75  	}
76  	
77  	/* (non-Javadoc)
78  	 * @see uk.nhs.interoperability.infrastructure.ITKAddress#setType(java.lang.String)
79  	 */
80  	@Override
81  	public void setType(String type) {
82  		this.type = type;
83  	}
84  	
85  	/* (non-Javadoc)
86  	 * @see java.lang.Object#toString()
87  	 */
88  	@Override
89  	public String toString() {
90  		return "ITKAddress [" + this.type + "] " + this.URI;
91  	}
92  }