View Javadoc
1   package ca.uhn.fhir.model.base.composite;
2   
3   import org.hl7.fhir.instance.model.api.INarrative;
4   
5   import ca.uhn.fhir.model.api.BaseIdentifiableElement;
6   import ca.uhn.fhir.model.api.ICompositeDatatype;
7   import ca.uhn.fhir.model.primitive.BoundCodeDt;
8   import ca.uhn.fhir.model.primitive.XhtmlDt;
9   
10  /*
11   * #%L
12   * HAPI FHIR - Core Library
13   * %%
14   * Copyright (C) 2014 - 2018 University Health Network
15   * %%
16   * Licensed under the Apache License, Version 2.0 (the "License");
17   * you may not use this file except in compliance with the License.
18   * You may obtain a copy of the License at
19   * 
20   *      http://www.apache.org/licenses/LICENSE-2.0
21   * 
22   * Unless required by applicable law or agreed to in writing, software
23   * distributed under the License is distributed on an "AS IS" BASIS,
24   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25   * See the License for the specific language governing permissions and
26   * limitations under the License.
27   * #L%
28   */
29  
30  /**
31   * @param <T> The narrative status enum type  
32   */
33  public abstract class BaseNarrativeDt<T extends Enum<?>> extends BaseIdentifiableElement implements ICompositeDatatype, INarrative {
34  
35  	private static final long serialVersionUID = -525238683230100077L;
36  
37  	public abstract BoundCodeDt<T> getStatus();
38  
39  	@Override
40  	public void setDivAsString(String theString)  {
41  		getDiv().setValueAsString(theString);
42  	}
43  
44  	@Override
45  	public String getDivAsString() {
46  		return getDiv().getValueAsString();
47  	}
48  
49  	@Override
50  	public INarrative setStatusAsString(String theString) {
51  		getStatus().setValueAsString(theString);
52  		return this;
53  	}
54  
55  	@Override
56  	public String getStatusAsString() {
57  		return getStatus().getValueAsString();
58  	}
59  
60  	public abstract XhtmlDt getDiv();
61  	
62  }