diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
index 6df16c838ce..f6d8c960d01 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
@@ -35,12 +35,11 @@ import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.rest.server.Constants;
/**
- * Represents the FHIR ID type. This is the actual resource ID, meaning the ID that will be used in RESTful URLs,
- * Resource References, etc. to represent a specific instance of a resource.
+ * Represents the FHIR ID type. This is the actual resource ID, meaning the ID that will be used in RESTful URLs, Resource References, etc. to represent a specific instance of a resource.
*
*
- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any
- * other combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters.
+ * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length
+ * limit of 36 characters.
*
*
* regex: [a-z0-9\-\.]{1,36}
@@ -63,12 +62,11 @@ public class IdDt extends BasePrimitive {
}
/**
- * Create a new ID, using a BigDecimal input. Uses {@link BigDecimal#toPlainString()} to generate the string
- * representation.
+ * Create a new ID, using a BigDecimal input. Uses {@link BigDecimal#toPlainString()} to generate the string representation.
*/
public IdDt(BigDecimal thePid) {
if (thePid != null) {
- setValue(thePid.toPlainString());
+ setValue(toPlainStringWithNpeThrowIfNeeded(thePid));
} else {
setValue(null);
}
@@ -82,12 +80,11 @@ public class IdDt extends BasePrimitive {
}
/**
- * Create a new ID using a string. This String may contain a simple ID (e.g. "1234") or it may contain a complete
- * URL (http://example.com/fhir/Patient/1234).
+ * Create a new ID using a string. This String may contain a simple ID (e.g. "1234") or it may contain a complete URL (http://example.com/fhir/Patient/1234).
*
*
- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or
- * any other combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters.
+ * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length
+ * limit of 36 characters.
*
*
* regex: [a-z0-9\-\.]{1,36}
@@ -107,7 +104,14 @@ public class IdDt extends BasePrimitive {
* The ID (e.g. "123")
*/
public IdDt(String theResourceType, BigDecimal theIdPart) {
- this(theResourceType, theIdPart.toPlainString());
+ this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart));
+ }
+
+ private static String toPlainStringWithNpeThrowIfNeeded(BigDecimal theIdPart) {
+ if (theIdPart==null) {
+ throw new NullPointerException("BigDecimal ID can not be null");
+ }
+ return theIdPart.toPlainString();
}
/**
@@ -133,7 +137,6 @@ public class IdDt extends BasePrimitive {
* The version ID ("e.g. "456")
*/
public IdDt(String theResourceType, String theId, String theVersionId) {
- Validate.notBlank(theResourceType, "Resource type must not be blank");
Validate.notBlank(theId, "ID must not be blank");
myResourceType = theResourceType;
@@ -149,14 +152,6 @@ public class IdDt extends BasePrimitive {
return getIdPartAsBigDecimal();
}
- /**
- * @deprecated Use {@link #getIdPartAsBigDecimal()} instead (this method was deprocated because its name is
- * ambiguous)
- */
- public BigDecimal asBigDecimal() {
- return getIdPartAsBigDecimal();
- }
-
/**
* Returns true if this IdDt matches the given IdDt in terms of resource type and ID, but ignores the URL base
*/
@@ -172,8 +167,7 @@ public class IdDt extends BasePrimitive {
}
/**
- * Returns a reference to this
IdDt. It is generally not neccesary to use this method but it is
- * provided for consistency with the rest of the API.
+ * Returns a reference to this
IdDt. It is generally not neccesary to use this method but it is provided for consistency with the rest of the API.
*/
@Override
public IdDt getId() {
@@ -217,19 +211,18 @@ public class IdDt extends BasePrimitive {
}
/**
- * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a
- * simple ID. Use {@link #getIdPart()} to get just the ID portion.
+ * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use {@link #getIdPart()} to get just the ID portion.
*
* @see #getIdPart()
*/
@Override
public String getValue() {
if (myValue == null && myHaveComponentParts) {
- if (myUnqualifiedVersionId != null) {
- myValue = myResourceType + '/' + myUnqualifiedId + '/' + Constants.PARAM_HISTORY + '/' + myUnqualifiedVersionId;
- } else {
- myValue = myResourceType + '/' + myUnqualifiedId;
- }
+ if (myUnqualifiedVersionId != null) {
+ myValue = myResourceType + '/' + myUnqualifiedId + '/' + Constants.PARAM_HISTORY + '/' + myUnqualifiedVersionId;
+ } else {
+ myValue = myResourceType + '/' + myUnqualifiedId;
+ }
}
return myValue;
}
@@ -259,16 +252,12 @@ public class IdDt extends BasePrimitive {
return isNotBlank(myResourceType);
}
-<<<<<<< HEAD
-=======
public boolean hasVersionIdPart() {
return isNotBlank(getVersionIdPart());
}
->>>>>>> 4d517aa76fc28af9fc4f0fa298ea3ee313a533a7
/**
- * Returns true
if the unqualified ID is a valid {@link Long} value (in other words, it consists only
- * of digits)
+ * Returns true
if the unqualified ID is a valid {@link Long} value (in other words, it consists only of digits)
*/
public boolean isIdPartValidLong() {
String id = getIdPart();
@@ -291,8 +280,7 @@ public class IdDt extends BasePrimitive {
}
/**
- * Copies the value from the given IdDt to this
IdDt. It is generally not neccesary to use this method
- * but it is provided for consistency with the rest of the API.
+ * Copies the value from the given IdDt to this
IdDt. It is generally not neccesary to use this method but it is provided for consistency with the rest of the API.
*/
@Override
public void setId(IdDt theId) {
@@ -303,8 +291,8 @@ public class IdDt extends BasePrimitive {
* Set the value
*
*
- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or
- * any other combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters.
+ * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length
+ * limit of 36 characters.
*
*
* regex: [a-z0-9\-\.]{1,36}
@@ -314,6 +302,7 @@ public class IdDt extends BasePrimitive {
public void setValue(String theValue) throws DataFormatException {
// TODO: add validation
myValue = theValue;
+ myHaveComponentParts=false;
if (StringUtils.isBlank(theValue)) {
myValue = null;
myUnqualifiedId = null;
@@ -350,8 +339,8 @@ public class IdDt extends BasePrimitive {
* Set the value
*
*
- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or
- * any other combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters.
+ * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length
+ * limit of 36 characters.
*
*
* regex: [a-z0-9\-\.]{1,36}
@@ -364,7 +353,7 @@ public class IdDt extends BasePrimitive {
@Override
public String toString() {
- return myValue;
+ return getValue();
}
public IdDt toUnqualified() {
@@ -376,19 +365,18 @@ public class IdDt extends BasePrimitive {
}
public IdDt toVersionless() {
- int i = myValue.indexOf(Constants.PARAM_HISTORY);
+ String value = getValue();
+ int i = value.indexOf(Constants.PARAM_HISTORY);
if (i > 1) {
- return new IdDt(myValue.substring(0, i - 1));
+ return new IdDt(value.substring(0, i - 1));
} else {
return this;
}
}
/**
- * Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be
- * used if the ID does not already contain those respective parts). Essentially, because IdDt can contain either a
- * complete URL or a partial one (or even jut a simple ID), this method may be used to translate into a complete
- * URL.
+ * Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially,
+ * because IdDt can contain either a complete URL or a partial one (or even jut a simple ID), this method may be used to translate into a complete URL.
*
* @param theServerBase
* The server base (e.g. "http://example.com/fhir")
@@ -416,29 +404,26 @@ public class IdDt extends BasePrimitive {
}
/**
- * Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID
- * noted by theVersion.
+ * Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID noted by theVersion.
*
* @param theVersion
* The actual version string, e.g. "1"
- * @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted
- * by theVersion.
+ * @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted by theVersion.
*/
public IdDt withVersion(String theVersion) {
Validate.notBlank(theVersion, "Version may not be null or empty");
- int i = myValue.indexOf(Constants.PARAM_HISTORY);
+ String existingValue = getValue();
+
+ int i = existingValue.indexOf(Constants.PARAM_HISTORY);
String value;
if (i > 1) {
- value = myValue.substring(0, i - 1);
+ value = existingValue.substring(0, i - 1);
} else {
- value = myValue;
+ value = existingValue;
}
-<<<<<<< HEAD
-=======
return new IdDt(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion);
}
->>>>>>> 4d517aa76fc28af9fc4f0fa298ea3ee313a533a7
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java
index 0fa673e3859..d26c4928378 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java
@@ -29,7 +29,6 @@ import ca.uhn.fhir.model.primitive.IdDt;
public class ReferenceParam extends IdDt implements IQueryParameterType {
private String myChain;
- private String myResourceType;
public ReferenceParam() {
}
@@ -44,8 +43,11 @@ public class ReferenceParam extends IdDt implements IQueryParameterType {
}
public ReferenceParam(String theResourceType, String theChain, String theValue) {
- setResourceType(theResourceType);
- setValueAsQueryToken(null, theValue);
+ if (isNotBlank(theResourceType)) {
+ setValue(theResourceType + "/" + theValue);
+ } else {
+ setValue(theValue);
+ }
setChain(theChain);
}
@@ -56,9 +58,9 @@ public class ReferenceParam extends IdDt implements IQueryParameterType {
@Override
public String getQueryParameterQualifier() {
StringBuilder b = new StringBuilder();
- if (isNotBlank(myResourceType)) {
+ if (isNotBlank(getResourceType())) {
b.append(':');
- b.append(myResourceType);
+ b.append(getResourceType());
}
if (isNotBlank(myChain)) {
b.append('.');
@@ -70,13 +72,9 @@ public class ReferenceParam extends IdDt implements IQueryParameterType {
return null;
}
- public String getResourceType() {
- return myResourceType;
- }
-
@Override
public String getValueAsQueryToken() {
- return getValue();
+ return getIdPart();
}
public void setChain(String theChain) {
@@ -84,35 +82,35 @@ public class ReferenceParam extends IdDt implements IQueryParameterType {
}
public Class extends IResource> getResourceType(FhirContext theCtx) {
- if (isBlank(myResourceType)) {
+ if (isBlank(getResourceType())) {
return null;
}
- return theCtx.getResourceDefinition(myResourceType).getImplementingClass();
- }
-
- public void setResourceType(String theResourceType) {
- myResourceType = theResourceType;
+ return theCtx.getResourceDefinition(getResourceType()).getImplementingClass();
}
@Override
public void setValueAsQueryToken(String theQualifier, String theValue) {
String q = theQualifier;
+ String resourceType=null;
if (isNotBlank(q)) {
if (q.startsWith(":")) {
int nextIdx = q.indexOf('.');
if (nextIdx != -1) {
- myResourceType = q.substring(1, nextIdx);
+ resourceType = q.substring(1, nextIdx);
myChain = q.substring(nextIdx + 1);
} else {
- myResourceType = q.substring(1);
+ resourceType = q.substring(1);
}
} else if (q.startsWith(".")) {
myChain = q.substring(1);
}
}
- setValue(theValue);
+ if (isNotBlank(resourceType)) {
+ setValue(resourceType + '/' + theValue);
+ } else {
+ setValue(theValue);
+ }
}
-
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
index fd895e65e3d..c923c6af42e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
@@ -434,7 +434,7 @@ public class RestfulServer extends HttpServlet {
if (nextString.startsWith("_")) {
operation = nextString;
} else {
- id = new IdDt(nextString);
+ id = new IdDt(resourceName, nextString);
}
}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java
new file mode 100644
index 00000000000..8bc69c5aa12
--- /dev/null
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/ReferenceParamTest.java
@@ -0,0 +1,29 @@
+package ca.uhn.fhir.rest.param;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ReferenceParamTest {
+
+ @Test
+ public void testWithResourceTypeAsQualifier() {
+
+ ReferenceParam rp = new ReferenceParam();
+ rp.setValueAsQueryToken(":Location", "123");
+ assertEquals("Location", rp.getResourceType());
+ assertEquals("123", rp.getIdPart());
+
+ }
+
+ @Test
+ public void testWithResourceType() {
+
+ ReferenceParam rp = new ReferenceParam();
+ rp.setValueAsQueryToken(null, "Location/123");
+ assertEquals("Location", rp.getResourceType());
+ assertEquals("123", rp.getIdPart());
+
+ }
+
+}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerMethodTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerMethodTest.java
index 74baa0479b7..62141a9f500 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerMethodTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerMethodTest.java
@@ -101,7 +101,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/DiagnosticReport?throw404=true");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -130,7 +131,6 @@ public class ResfulServerMethodTest {
}
-
@Test
public void testCreateJson() throws Exception {
@@ -143,7 +143,8 @@ public class ResfulServerMethodTest {
HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -151,7 +152,7 @@ public class ResfulServerMethodTest {
assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue());
}
-
+
@Test
public void testCreateWithUnprocessableEntity() throws Exception {
@@ -163,7 +164,8 @@ public class ResfulServerMethodTest {
HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -185,7 +187,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?dateRange=%3E%3D2011-01-01&dateRange=%3C%3D2021-01-01");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -203,14 +206,15 @@ public class ResfulServerMethodTest {
HttpDelete httpGet = new HttpDelete("http://localhost:" + ourPort + "/Patient/1234");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
assertEquals(200, status.getStatusLine().getStatusCode());
OperationOutcome patient = ourCtx.newXmlParser().parseResource(OperationOutcome.class, responseContent);
- assertEquals("1234", patient.getIssueFirstRep().getDetails().getValue());
+ assertEquals("Patient/1234", patient.getIssueFirstRep().getDetails().getValue());
}
@@ -234,7 +238,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?withIncludes=include1&_include=include2&_include=include3");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
assertEquals(200, status.getStatusLine().getStatusCode());
Bundle bundle = ourCtx.newXmlParser().parseBundle(responseContent);
@@ -244,7 +249,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?withIncludes=include1&_include=include2&_include=include3&_format=json");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
assertEquals(200, status.getStatusLine().getStatusCode());
ourLog.info(responseContent);
@@ -266,7 +272,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/1?_format=json");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -291,7 +298,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/1?_format=xml");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -312,7 +320,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/1");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -327,7 +336,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/2");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.debug("Response was:\n{}", responseContent);
@@ -342,7 +352,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/9999999");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.debug("Response was:\n{}", responseContent);
@@ -361,7 +372,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/1/_history/999");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -378,7 +390,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/metadata");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
// ourLog.info("Response was:\n{}", responseContent);
@@ -414,7 +427,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/999/_history");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -424,7 +438,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/998/_history");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -452,7 +467,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/222/_history");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -502,7 +518,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/_history");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -546,15 +563,14 @@ public class ResfulServerMethodTest {
}
-
-
@Test
public void testReadOnTypeThatDoesntSupportRead() throws Exception {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/AdverseReaction/223");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -568,7 +584,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/AdverseReaction");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -580,7 +597,8 @@ public class ResfulServerMethodTest {
HttpPost httpPost = new HttpPost("http://localhost:" + ourPort + "/AdverseReaction/_search");
status = ourClient.execute(httpPost);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -597,7 +615,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Profile?");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
// ourLog.info("Response was:\n{}", responseContent);
@@ -615,7 +634,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?dob=2011-01-02");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -635,7 +655,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?dob=%3E%3D2011-01-02");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -656,7 +677,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/_search?dob=2011-01-02");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -674,7 +696,8 @@ public class ResfulServerMethodTest {
HttpPost httpPost = new HttpPost("http://localhost:" + ourPort + "/Patient/_search?dob=2011-01-02");
status = ourClient.execute(httpPost);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -695,7 +718,8 @@ public class ResfulServerMethodTest {
httpPost.setEntity(new UrlEncodedFormEntity(urlParameters));
status = ourClient.execute(httpPost);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -716,7 +740,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?ids=urn:aaa%7Caaa,urn:bbb%7Cbbb");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -736,7 +761,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?identifier=urn:hapitest:mrns%7C00001");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -754,7 +780,8 @@ public class ResfulServerMethodTest {
HttpPost httpPost = new HttpPost("http://localhost:" + ourPort + "/Patient/_search?identifier=urn:hapitest:mrns%7C00001");
status = ourClient.execute(httpPost);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -772,7 +799,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/_search?identifier=urn:hapitest:mrns%7C00001");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -791,7 +819,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/?_query=someQueryNoParams");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -815,7 +844,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/?_query=someQueryOneParam¶m1=AAAA");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -824,7 +854,7 @@ public class ResfulServerMethodTest {
assertEquals("AAAA", patient.getName().get(1).getFamilyAsSingleString());
}
-
+
@Test
public void testSearchQuantityParam() throws Exception {
@@ -836,7 +866,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient/?quantityParam=%3E%3D123%7Cfoo%7Cbar");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -855,7 +886,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?withIncludes=include1&_include=include2&_include=include3");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -875,7 +907,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?withIncludes=include1&_include=include2&_include=include4");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -888,7 +921,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?withIncludes=include1");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -902,7 +936,8 @@ public class ResfulServerMethodTest {
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?name1=AAA");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -922,7 +957,8 @@ public class ResfulServerMethodTest {
httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?name1=AAA&name2=BBB");
status = ourClient.execute(httpGet);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -948,7 +984,8 @@ public class ResfulServerMethodTest {
HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -995,8 +1032,8 @@ public class ResfulServerMethodTest {
httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(dr), ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));
ourClient.execute(httpPost);
assertEquals(2, ourReportProvider.getLastTags().size());
- assertEquals(new Tag((String)null, "Dog", "aa"), ourReportProvider.getLastTags().get(0));
- assertEquals(new Tag((String)null, "Cat", "bb"), ourReportProvider.getLastTags().get(1));
+ assertEquals(new Tag((String) null, "Dog", "aa"), ourReportProvider.getLastTags().get(0));
+ assertEquals(new Tag((String) null, "Cat", "bb"), ourReportProvider.getLastTags().get(1));
}
@@ -1012,7 +1049,7 @@ public class ResfulServerMethodTest {
ourClient.execute(httpPost);
assertEquals(1, ourReportProvider.getLastTags().size());
assertEquals(new Tag("Dog"), ourReportProvider.getLastTags().get(0));
-
+
}
@Test
@@ -1059,7 +1096,6 @@ public class ResfulServerMethodTest {
}
-
@Test
public void testUpdateWithVersion() throws Exception {
@@ -1126,7 +1162,8 @@ public class ResfulServerMethodTest {
HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
assertThat(responseContent, not(containsString("\n ")));
@@ -1145,7 +1182,8 @@ public class ResfulServerMethodTest {
status = ourClient.execute(httpPost);
- responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
@@ -1183,7 +1221,8 @@ public class ResfulServerMethodTest {
HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
assertThat(responseContent, containsString("\n "));
@@ -1195,14 +1234,15 @@ public class ResfulServerMethodTest {
HttpDelete httpGet = new HttpDelete("http://localhost:" + ourPort + "/Patient/1234?_pretty=true");
HttpResponse status = ourClient.execute(httpGet);
- String responseContent = IOUtils.toString(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
ourLog.info("Response was:\n{}", responseContent);
assertEquals(200, status.getStatusLine().getStatusCode());
OperationOutcome patient = ourCtx.newXmlParser().parseResource(OperationOutcome.class, responseContent);
- assertEquals("1234", patient.getIssueFirstRep().getDetails().getValue());
+ assertEquals("Patient/1234", patient.getIssueFirstRep().getDetails().getValue());
}
@@ -1252,15 +1292,15 @@ public class ResfulServerMethodTest {
IdDt version = new IdDt(thePatient.getIdentifier().get(1).getValue().getValue());
return new MethodOutcome(id, version);
}
-
+
@Search()
public Collection getAllResources() {
ArrayList retVal = new ArrayList();
-
+
AdverseReaction ar1 = new AdverseReaction();
ar1.setId("1");
retVal.add(ar1);
-
+
AdverseReaction ar2 = new AdverseReaction();
ar2.setId("2");
retVal.add(ar2);
@@ -1268,7 +1308,6 @@ public class ResfulServerMethodTest {
return retVal;
}
-
@Override
public Class extends IResource> getResourceType() {
return AdverseReaction.class;
@@ -1347,8 +1386,8 @@ public class ResfulServerMethodTest {
return retVal;
}
- public List findDiagnosticReportsByPatient(@RequiredParam(name = "Patient.identifier") IdentifierDt thePatientId, @RequiredParam(name = DiagnosticReport.SP_NAME) CodingListParam theNames, @OptionalParam(name = DiagnosticReport.SP_DATE) DateRangeParam theDateRange)
- throws Exception {
+ public List findDiagnosticReportsByPatient(@RequiredParam(name = "Patient.identifier") IdentifierDt thePatientId,
+ @RequiredParam(name = DiagnosticReport.SP_NAME) CodingListParam theNames, @OptionalParam(name = DiagnosticReport.SP_DATE) DateRangeParam theDateRange) throws Exception {
return Collections.emptyList();
}
@@ -1357,7 +1396,7 @@ public class ResfulServerMethodTest {
ArrayList retVal = new ArrayList();
IdDt id = theId;
- if (id.getValue().equals("999")) {
+ if (id.getIdPart().equals("999")) {
id = null; // to test the error when no ID is present
}
@@ -1367,7 +1406,7 @@ public class ResfulServerMethodTest {
older.getResourceMetadata().put(ResourceMetadataKeyEnum.VERSION_ID, "1");
older.getResourceMetadata().put(ResourceMetadataKeyEnum.PUBLISHED, new Date(10000L));
older.getResourceMetadata().put(ResourceMetadataKeyEnum.UPDATED, new InstantDt(new Date(20000L)));
- if (id != null && !id.getValue().equals("998")) {
+ if (id != null && !id.getIdPart().equals("998")) {
older.getResourceMetadata().put(ResourceMetadataKeyEnum.VERSION_ID, "1");
}
retVal.add(older);
@@ -1375,7 +1414,7 @@ public class ResfulServerMethodTest {
Patient newer = createPatient1();
newer.setId(theId);
newer.getNameFirstRep().getFamilyFirstRep().setValue("NewerFamily");
- if (id != null && !id.getValue().equals("998")) {
+ if (id != null && !id.getIdPart().equals("998")) {
newer.getResourceMetadata().put(ResourceMetadataKeyEnum.VERSION_ID, "2");
}
newer.getResourceMetadata().put(ResourceMetadataKeyEnum.PUBLISHED, new Date(10000L));
@@ -1477,14 +1516,12 @@ public class ResfulServerMethodTest {
next.addName().addFamily(theParam.getValue());
return next;
}
-
+
@Search()
public Patient getPatientQuantityParam(@RequiredParam(name = "quantityParam") QuantityDt theParam) {
Patient next = getIdToPatient().get("1");
- next.addName().addFamily(theParam.getComparator().getValueAsString())
- .addFamily(theParam.getValue().getValueAsString())
- .addFamily(theParam.getSystem().getValueAsString())
- .addFamily(theParam.getUnits().getValueAsString());
+ next.addName().addFamily(theParam.getComparator().getValueAsString()).addFamily(theParam.getValue().getValueAsString()).addFamily(theParam.getSystem().getValueAsString())
+ .addFamily(theParam.getUnits().getValueAsString());
return next;
}
@@ -1501,7 +1538,8 @@ public class ResfulServerMethodTest {
}
@Search()
- public Patient getPatientWithIncludes(@RequiredParam(name = "withIncludes") StringDt theString, @IncludeParam(allow = { "include1", "include2", "include3" }) List theIncludes) {
+ public Patient getPatientWithIncludes(@RequiredParam(name = "withIncludes") StringDt theString,
+ @IncludeParam(allow = { "include1", "include2", "include3" }) List theIncludes) {
Patient next = getIdToPatient().get("1");
next.addCommunication().setText(theString.getValue());
@@ -1551,7 +1589,7 @@ public class ResfulServerMethodTest {
*/
@Read()
public Patient getResourceById(@IdParam IdDt theId) {
- return getIdToPatient().get(theId.getValue());
+ return getIdToPatient().get(theId.getIdPart());
}
@Read()
@@ -1572,9 +1610,7 @@ public class ResfulServerMethodTest {
@Update()
public MethodOutcome updateDiagnosticReportWithVersion(@IdParam IdDt theId, @VersionIdParam IdDt theVersionId, @ResourceParam DiagnosticOrder thePatient) {
/*
- * TODO: THIS METHOD IS NOT USED. It's the wrong type
- * (DiagnosticOrder), so it should cause an exception on startup.
- * Also we should detect if there are multiple resource params on an
+ * TODO: THIS METHOD IS NOT USED. It's the wrong type (DiagnosticOrder), so it should cause an exception on startup. Also we should detect if there are multiple resource params on an
* update/create/etc method
*/
IdDt id = theId;
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ServerFeaturesTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ServerFeaturesTest.java
index ea727d2ee52..89f17ab96a2 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ServerFeaturesTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ServerFeaturesTest.java
@@ -279,7 +279,9 @@ public class ServerFeaturesTest {
*/
@Read()
public Patient getResourceById(@IdParam IdDt theId) {
- return getIdToPatient().get(theId.getValue());
+ String key = theId.getIdPart();
+ Patient retVal = getIdToPatient().get(key);
+ return retVal;
}
/**
diff --git a/hapi-fhir-testpage-overlay/.classpath b/hapi-fhir-testpage-overlay/.classpath
index 1e35cc78281..45c1012f11f 100644
--- a/hapi-fhir-testpage-overlay/.classpath
+++ b/hapi-fhir-testpage-overlay/.classpath
@@ -12,7 +12,7 @@
-
+
diff --git a/hapi-fhir-testpage-overlay/.settings/.jsdtscope b/hapi-fhir-testpage-overlay/.settings/.jsdtscope
index b72a6a47b2e..4196737365d 100644
--- a/hapi-fhir-testpage-overlay/.settings/.jsdtscope
+++ b/hapi-fhir-testpage-overlay/.settings/.jsdtscope
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/hapi-fhir-testpage-overlay/.settings/org.eclipse.core.resources.prefs b/hapi-fhir-testpage-overlay/.settings/org.eclipse.core.resources.prefs
index 839d647eef8..29abf999564 100644
--- a/hapi-fhir-testpage-overlay/.settings/org.eclipse.core.resources.prefs
+++ b/hapi-fhir-testpage-overlay/.settings/org.eclipse.core.resources.prefs
@@ -2,4 +2,5 @@ eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
encoding/=UTF-8
diff --git a/hapi-fhir-testpage-overlay/.settings/org.eclipse.wst.common.component b/hapi-fhir-testpage-overlay/.settings/org.eclipse.wst.common.component
index d2052e8be95..7437a544037 100644
--- a/hapi-fhir-testpage-overlay/.settings/org.eclipse.wst.common.component
+++ b/hapi-fhir-testpage-overlay/.settings/org.eclipse.wst.common.component
@@ -3,6 +3,7 @@
+
uses
diff --git a/pom.xml b/pom.xml
index fb9dbd38454..960bf5f1826 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,37 @@
false
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+
+
+ maven-antrun-plugin
+
+
+ [1.7,)
+
+
+ run
+
+
+
+
+
+
+
+
+
+