From 0f2976358f1de743b4f71176919260d1df3988ce Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Fri, 8 May 2015 08:54:40 -0400 Subject: [PATCH] Version bump to 1.1-SNAPSHOT with more loggging --- examples/pom.xml | 6 +- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 8 +- hapi-fhir-base/pom.xml | 2 +- .../ca/uhn/fhir/validation/IValidator.java | 2 +- .../fhir/validation/SchemaBaseValidator.java | 2 +- .../fhir/validation/ValidationContext.java | 2 +- hapi-fhir-base/testmindeps/pom.xml | 8 +- hapi-fhir-dist/pom.xml | 8 +- hapi-fhir-jpaserver-base/.gitignore | 1 + hapi-fhir-jpaserver-base/pom.xml | 14 ++-- .../uhn/fhir/jpa/dao/BaseFhirResourceDao.java | 6 +- .../ResourceIndexedSearchParamString.java | 11 ++- .../provider/ResourceProviderDstu2Test.java | 2 +- hapi-fhir-jpaserver-example/pom.xml | 10 +-- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 10 +-- hapi-fhir-structures-dstu/pom.xml | 6 +- hapi-fhir-structures-dstu2/.gitignore | 1 + hapi-fhir-structures-dstu2/pom.xml | 6 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 4 +- hapi-fhir-testpage-overlay/pom.xml | 10 +-- hapi-tinder-plugin/pom.xml | 4 +- .../org/hl7/fhir/instance/model/IBase.java | 32 ++++++++ .../fhir/instance/model/IBaseResource.java | 40 ++++++++++ .../org/hl7/fhir/instance/model/IIdType.java | 75 +++++++++++++++++++ hapi-tinder-test/pom.xml | 10 +-- pom.xml | 2 +- restful-server-example-test/pom.xml | 6 +- restful-server-example/pom.xml | 6 +- 29 files changed, 226 insertions(+), 70 deletions(-) create mode 100644 hapi-tinder-plugin/src/main/java/org/hl7/fhir/instance/model/IBase.java create mode 100644 hapi-tinder-plugin/src/main/java/org/hl7/fhir/instance/model/IBaseResource.java create mode 100644 hapi-tinder-plugin/src/main/java/org/hl7/fhir/instance/model/IIdType.java diff --git a/examples/pom.xml b/examples/pom.xml index b48ac6f8325..d123de893bb 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml @@ -17,12 +17,12 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT javax.servlet diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 047ee2ce437..15f21b5f436 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 46ae3345e38..d6248409071 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml @@ -18,7 +18,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT org.apache.httpcomponents @@ -37,12 +37,12 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT com.phloc diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index daabce135b6..6d81c1f4e78 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 1.0 + 1.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/IValidator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/IValidator.java index a4eff0f8ff2..46c974e3ad6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/IValidator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/IValidator.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.validation; -import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.model.api.Bundle; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/SchemaBaseValidator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/SchemaBaseValidator.java index 9ad666ddecd..b7a44db9bba 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/SchemaBaseValidator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/SchemaBaseValidator.java @@ -39,7 +39,7 @@ import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; import org.apache.commons.io.input.BOMInputStream; -import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSResourceResolver; import org.xml.sax.SAXException; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java index bbe6f8bfedf..2fa91486b74 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java @@ -20,7 +20,7 @@ package ca.uhn.fhir.validation; * #L% */ -import org.hl7.fhir.instance.model.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Bundle; diff --git a/hapi-fhir-base/testmindeps/pom.xml b/hapi-fhir-base/testmindeps/pom.xml index 93a49116825..03d759a8123 100644 --- a/hapi-fhir-base/testmindeps/pom.xml +++ b/hapi-fhir-base/testmindeps/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../../pom.xml @@ -40,7 +40,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT woodstox-core-asl @@ -51,7 +51,7 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT woodstox-core-asl @@ -62,7 +62,7 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT woodstox-core-asl diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 81514821a77..d150a7aec29 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml @@ -18,17 +18,17 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT ch.qos.logback diff --git a/hapi-fhir-jpaserver-base/.gitignore b/hapi-fhir-jpaserver-base/.gitignore index 443f39c7696..f988cea1dde 100644 --- a/hapi-fhir-jpaserver-base/.gitignore +++ b/hapi-fhir-jpaserver-base/.gitignore @@ -127,3 +127,4 @@ local.properties # TeXlipse plugin .texlipse +/target/ diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index e13d96a8332..a25defa1756 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 1.0 + 1.1-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -31,7 +31,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT commons-logging @@ -42,13 +42,13 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT true ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT true @@ -373,7 +373,7 @@ ca.uhn.hapi.fhir hapi-tinder-plugin - 1.0 + 1.1-SNAPSHOT build_dstu1 @@ -404,12 +404,12 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirResourceDao.java index 6979a469fb1..4d0549443f9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirResourceDao.java @@ -372,14 +372,12 @@ public abstract class BaseFhirResourceDao extends BaseFhirD CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); CriteriaQuery cq = builder.createQuery(); Root subQfrom = cq.from(theParamTable); - cq.select(subQfrom.get("myResourcePid")); + cq.select(subQfrom); Predicate subQname = builder.equal(subQfrom.get("myParamName"), theParamName); Predicate subQtype = builder.equal(subQfrom.get("myResourceType"), resourceType); cq.where(builder.and(subQtype, subQname)); List results = myEntityManager.createQuery(cq).getResultList(); - for (Object object : results) { - ourLog.info("Next result: {}", object); - } + ourLog.info("All results: {}", results); } CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java index ebd007c0616..493d1b08756 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java @@ -25,6 +25,8 @@ import javax.persistence.Entity; import javax.persistence.Table; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; @Entity @Table(name = "HFJ_SPIDX_STRING"/*, indexes= {@Index(name="IDX_SP_STRING", columnList="SP_VALUE_NORMALIZED")}*/) @@ -73,6 +75,13 @@ public class ResourceIndexedSearchParamString extends BaseResourceIndexedSearchP myValueExact = theValueExact; } - + @Override + public String toString() { + ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); + b.append("paramName", getParamName()); + b.append("resourceId", getResource().getId()); // TODO: add a field so we don't need to resolve this + b.append("value", getValueNormalized()); + return b.build(); + } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java index cc4a4a3e619..63624e13c19 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java @@ -421,7 +421,7 @@ public class ResourceProviderDstu2Test { //@formatter:on List list = toIdListUnqualifiedVersionless(found); - ourLog.info(methodName + ": " + list.toString()); + ourLog.info(methodName + " found: " + list.toString() + " - Wanted " + orgMissing + " but not " + orgNotMissing); assertThat(list, not(containsInRelativeOrder(orgNotMissing))); assertThat("Wanted " + orgMissing + " but found: " + list, list, containsInRelativeOrder(orgMissing)); } diff --git a/hapi-fhir-jpaserver-example/pom.xml b/hapi-fhir-jpaserver-example/pom.xml index 5c55acb961a..fb2e7b23908 100644 --- a/hapi-fhir-jpaserver-example/pom.xml +++ b/hapi-fhir-jpaserver-example/pom.xml @@ -41,19 +41,19 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-testpage-overlay - 1.0 + 1.1-SNAPSHOT war provided diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 33b4dd36f35..5bb5745bcbb 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml @@ -18,22 +18,22 @@ ca.uhn.hapi.fhir hapi-fhir-jpaserver-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-testpage-overlay - 1.0 + 1.1-SNAPSHOT war provided diff --git a/hapi-fhir-structures-dstu/pom.xml b/hapi-fhir-structures-dstu/pom.xml index cf396c9acee..ba1eeafff73 100644 --- a/hapi-fhir-structures-dstu/pom.xml +++ b/hapi-fhir-structures-dstu/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 1.0 + 1.1-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -18,7 +18,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT @@ -189,7 +189,7 @@ ca.uhn.hapi.fhir hapi-tinder-plugin - 1.0 + 1.1-SNAPSHOT diff --git a/hapi-fhir-structures-dstu2/.gitignore b/hapi-fhir-structures-dstu2/.gitignore index 5a5837927e8..bc93860f21e 100644 --- a/hapi-fhir-structures-dstu2/.gitignore +++ b/hapi-fhir-structures-dstu2/.gitignore @@ -140,3 +140,4 @@ local.properties /target/ /target/ /target/ +/target/ diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index f4d10ae90c7..6c2cc96eddc 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 1.0 + 1.1-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -18,7 +18,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT @@ -177,7 +177,7 @@ ca.uhn.hapi.fhir hapi-tinder-plugin - 1.0 + 1.1-SNAPSHOT diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 018a5d886ba..2a7d7d66359 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 1.0-SNAPSHOT + 1.1-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -18,7 +18,7 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0-SNAPSHOT + 1.1-SNAPSHOT diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 2405e179736..10116e4b0af 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 1.0 + 1.1-SNAPSHOT ../pom.xml @@ -27,22 +27,22 @@ ca.uhn.hapi.fhir hapi-fhir-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-jpaserver-base - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 1.0 + 1.1-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-testpage-overlay - 1.0 + 1.1-SNAPSHOT war provided