From da6a5d5a242c4d8f7ebed8655699330b6f04ee07 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 29 Oct 2014 16:08:07 -0400 Subject: [PATCH] Move BoundCodeableConceptDt back to where it originally was for DSTU1 resources --- .../BoundCodeableConceptDt.java | 4 +++- ...ptDt.java => BoundCodeableConceptDt_.java} | 8 ++++---- .../fhir/model/dstu/resource/Conformance.java | 20 +++++++++---------- .../tinder/parser/BaseStructureParser.java | 5 +++++ 4 files changed, 22 insertions(+), 15 deletions(-) rename hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/{dstu/composite => primitive}/BoundCodeableConceptDt.java (96%) rename hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/{BoundCodeableConceptDt.java => BoundCodeableConceptDt_.java} (91%) diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java similarity index 96% rename from hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java rename to hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java index 1f674cc0f98..58cad302068 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java @@ -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> extends CodeableConceptDt implements IBoundCodeableConcept { diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt_.java similarity index 91% rename from hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java rename to hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt_.java index 9c9db647dc2..04aa63e37f8 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt_.java @@ -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> extends CodeableConceptDt { +public class BoundCodeableConceptDt_> extends CodeableConceptDt { private IValueSetEnumBinder myBinder; /** * Constructor */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder) { + public BoundCodeableConceptDt_(IValueSetEnumBinder theBinder) { myBinder = theBinder; } /** * Constructor */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder, T theValue) { + public BoundCodeableConceptDt_(IValueSetEnumBinder theBinder, T theValue) { myBinder = theBinder; setValueAsEnum(theValue); } @@ -52,7 +52,7 @@ public class BoundCodeableConceptDt> extends CodeableConceptDt /** * Constructor */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder, Collection theValues) { + public BoundCodeableConceptDt_(IValueSetEnumBinder theBinder, Collection theValues) { myBinder = theBinder; setValueAsEnum(theValues); } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java index 88dfaaa89ee..d65ed77e4dc 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java @@ -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> myService; + private java.util.List> 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 *

*/ - public java.util.List> getService() { + public java.util.List> getService() { if (myService == null) { - myService = new java.util.ArrayList>(); + myService = new java.util.ArrayList>(); } return myService; } @@ -2397,7 +2397,7 @@ public class Conformance extends BaseConformance implements IResource { * Types of security services are supported/required by the system *

*/ - public RestSecurity setService(java.util.List> theValue) { + public RestSecurity setService(java.util.List> 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 *

*/ - public BoundCodeableConceptDt addService(RestfulSecurityServiceEnum theValue) { - BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(RestfulSecurityServiceEnum.VALUESET_BINDER, theValue); + public BoundCodeableConceptDt_ addService(RestfulSecurityServiceEnum theValue) { + BoundCodeableConceptDt_ retVal = new BoundCodeableConceptDt_(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 *

*/ - public BoundCodeableConceptDt getServiceFirstRep() { + public BoundCodeableConceptDt_ 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 *

*/ - public BoundCodeableConceptDt addService() { - BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(RestfulSecurityServiceEnum.VALUESET_BINDER); + public BoundCodeableConceptDt_ addService() { + BoundCodeableConceptDt_ retVal = new BoundCodeableConceptDt_(RestfulSecurityServiceEnum.VALUESET_BINDER); getService().add(retVal); return retVal; } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java index 9c1b7e11d3a..bb3cb19ee4c 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java @@ -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(myLocallyDefinedClassNames.keySet())); } }