Move BoundCodeableConceptDt back to where it originally was for DSTU1

resources
This commit is contained in:
James Agnew 2014-10-29 16:08:07 -04:00
parent d2e6fc2253
commit da6a5d5a24
4 changed files with 22 additions and 15 deletions

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.model.dstu.composite;
package ca.uhn.fhir.model.primitive;
/*
* #%L
@ -29,6 +29,8 @@ import java.util.Set;
import ca.uhn.fhir.model.api.IBoundCodeableConcept;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
@DatatypeDef(name = "CodeableConcept", isSpecialization = true)
public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt implements IBoundCodeableConcept {

View File

@ -30,21 +30,21 @@ import ca.uhn.fhir.model.api.IValueSetEnumBinder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
@DatatypeDef(name = "CodeableConcept", isSpecialization = true)
public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt {
public class BoundCodeableConceptDt_<T extends Enum<?>> extends CodeableConceptDt {
private IValueSetEnumBinder<T> myBinder;
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder) {
public BoundCodeableConceptDt_(IValueSetEnumBinder<T> theBinder) {
myBinder = theBinder;
}
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, T theValue) {
public BoundCodeableConceptDt_(IValueSetEnumBinder<T> theBinder, T theValue) {
myBinder = theBinder;
setValueAsEnum(theValue);
}
@ -52,7 +52,7 @@ public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, Collection<T> theValues) {
public BoundCodeableConceptDt_(IValueSetEnumBinder<T> theBinder, Collection<T> theValues) {
myBinder = theBinder;
setValueAsEnum(theValues);
}

View File

@ -53,7 +53,7 @@ import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.model.dstu.composite.BoundCodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.BoundCodeableConceptDt_;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
@ -2301,7 +2301,7 @@ public class Conformance extends BaseConformance implements IResource {
shortDefinition="OAuth | OAuth2 | NTLM | Basic | Kerberos",
formalDefinition="Types of security services are supported/required by the system"
)
private java.util.List<BoundCodeableConceptDt<RestfulSecurityServiceEnum>> myService;
private java.util.List<BoundCodeableConceptDt_<RestfulSecurityServiceEnum>> myService;
@Child(name="description", type=StringDt.class, order=2, min=0, max=1)
@Description(
@ -2382,9 +2382,9 @@ public class Conformance extends BaseConformance implements IResource {
* Types of security services are supported/required by the system
* </p>
*/
public java.util.List<BoundCodeableConceptDt<RestfulSecurityServiceEnum>> getService() {
public java.util.List<BoundCodeableConceptDt_<RestfulSecurityServiceEnum>> getService() {
if (myService == null) {
myService = new java.util.ArrayList<BoundCodeableConceptDt<RestfulSecurityServiceEnum>>();
myService = new java.util.ArrayList<BoundCodeableConceptDt_<RestfulSecurityServiceEnum>>();
}
return myService;
}
@ -2397,7 +2397,7 @@ public class Conformance extends BaseConformance implements IResource {
* Types of security services are supported/required by the system
* </p>
*/
public RestSecurity setService(java.util.List<BoundCodeableConceptDt<RestfulSecurityServiceEnum>> theValue) {
public RestSecurity setService(java.util.List<BoundCodeableConceptDt_<RestfulSecurityServiceEnum>> theValue) {
myService = theValue;
return this;
}
@ -2413,8 +2413,8 @@ public class Conformance extends BaseConformance implements IResource {
* Types of security services are supported/required by the system
* </p>
*/
public BoundCodeableConceptDt<RestfulSecurityServiceEnum> addService(RestfulSecurityServiceEnum theValue) {
BoundCodeableConceptDt<RestfulSecurityServiceEnum> retVal = new BoundCodeableConceptDt<RestfulSecurityServiceEnum>(RestfulSecurityServiceEnum.VALUESET_BINDER, theValue);
public BoundCodeableConceptDt_<RestfulSecurityServiceEnum> addService(RestfulSecurityServiceEnum theValue) {
BoundCodeableConceptDt_<RestfulSecurityServiceEnum> retVal = new BoundCodeableConceptDt_<RestfulSecurityServiceEnum>(RestfulSecurityServiceEnum.VALUESET_BINDER, theValue);
getService().add(retVal);
return retVal;
}
@ -2428,7 +2428,7 @@ public class Conformance extends BaseConformance implements IResource {
* Types of security services are supported/required by the system
* </p>
*/
public BoundCodeableConceptDt<RestfulSecurityServiceEnum> getServiceFirstRep() {
public BoundCodeableConceptDt_<RestfulSecurityServiceEnum> getServiceFirstRep() {
if (getService().size() == 0) {
addService();
}
@ -2443,8 +2443,8 @@ public class Conformance extends BaseConformance implements IResource {
* Types of security services are supported/required by the system
* </p>
*/
public BoundCodeableConceptDt<RestfulSecurityServiceEnum> addService() {
BoundCodeableConceptDt<RestfulSecurityServiceEnum> retVal = new BoundCodeableConceptDt<RestfulSecurityServiceEnum>(RestfulSecurityServiceEnum.VALUESET_BINDER);
public BoundCodeableConceptDt_<RestfulSecurityServiceEnum> addService() {
BoundCodeableConceptDt_<RestfulSecurityServiceEnum> retVal = new BoundCodeableConceptDt_<RestfulSecurityServiceEnum>(RestfulSecurityServiceEnum.VALUESET_BINDER);
getService().add(retVal);
return retVal;
}

View File

@ -255,6 +255,11 @@ public abstract class BaseStructureParser {
if (file.exists()) {
return myPackageBase + ".composite." + theNextType;
}
fileName = myBaseDir + "/src/main/java/ca/uhn/fhir/model/primitive/" + theNextType + ".java";
file = new File(fileName);
if (file.exists()) {
return "ca.uhn.fhir.model.primitive." + theNextType;
}
throw new MojoFailureException("Unknown type: " + theNextType + " - Have locally defined names: " + new TreeSet<String>(myLocallyDefinedClassNames.keySet()));
}
}