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  /**
17   * The Class ITKIdentityImpl.
18   *
19   * @author Michael Odling-Smee
20   * @author Nicholas Jone
21   * @since 0.1
22   */
23  public class ITKIdentityImpl implements ITKIdentity {
24  	
25  	/** The uri. */
26  	private String URI;
27  	
28  	/** The type. */
29  	private String type;
30  	
31  	/**
32  	 * Instantiates a new iTK identity impl.
33  	 *
34  	 * @param URI the uri
35  	 * @param type the type
36  	 */
37  	public ITKIdentityImpl(String URI, String type){
38  		this.URI = URI;
39  		this.type = type;
40  	}
41  	
42  	/**
43  	 * Instantiates a new iTK identity impl.
44  	 *
45  	 * @param URI the uri
46  	 */
47  	public ITKIdentityImpl(String URI){
48  		this.URI = URI;
49  		this.type = ITKIdentity.DEFAULT_IDENTITY_TYPE;
50  	}
51  
52  	/* (non-Javadoc)
53  	 * @see uk.nhs.interoperability.infrastructure.ITKIdentity#getURI()
54  	 */
55  	@Override
56  	public String getURI() {
57  		return URI;
58  	}
59  	
60  	/* (non-Javadoc)
61  	 * @see uk.nhs.interoperability.infrastructure.ITKIdentity#setURI(java.lang.String)
62  	 */
63  	@Override
64  	public void setURI(String uRI) {
65  		URI = uRI;
66  	}
67  	
68  	/* (non-Javadoc)
69  	 * @see uk.nhs.interoperability.infrastructure.ITKIdentity#getType()
70  	 */
71  	@Override
72  	public String getType() {
73  		return type;
74  	}
75  	
76  	/* (non-Javadoc)
77  	 * @see uk.nhs.interoperability.infrastructure.ITKIdentity#setType(java.lang.String)
78  	 */
79  	@Override
80  	public void setType(String type) {
81  		this.type = type;
82  	}
83  	
84  	/* (non-Javadoc)
85  	 * @see java.lang.Object#toString()
86  	 */
87  	@Override
88  	public String toString() {
89  		return "ITKIdentity [" + this.type + "] " + this.URI;
90  	}
91  }