diff --git a/hapi-fhir-structures-dev/src/test/java/ca/uhn/fhir/parser/MixedResourcesTest.java b/hapi-fhir-structures-dev/src/test/java/ca/uhn/fhir/parser/MixedResourcesTest.java index 2201e2cf591..7c69d480123 100644 --- a/hapi-fhir-structures-dev/src/test/java/ca/uhn/fhir/parser/MixedResourcesTest.java +++ b/hapi-fhir-structures-dev/src/test/java/ca/uhn/fhir/parser/MixedResourcesTest.java @@ -1,13 +1,35 @@ package ca.uhn.fhir.parser; +import static org.junit.Assert.*; + import org.junit.Test; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.dstu.resource.Appointment; +import ca.uhn.fhir.model.primitive.DateTimeDt; + public class MixedResourcesTest { + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(MixedResourcesTest.class); @Test public void testMixedResources() { + // dstu + Appointment a1 = new Appointment(); + a1.getSchedule().addEvent().setStart(new DateTimeDt("2001-01-02T12:00:00")); + + ca.uhn.fhir.model.dev.resource.Appointment a2 = new ca.uhn.fhir.model.dev.resource.Appointment(); + a2.getStartElement().setValueAsString("2001-01-02T12:00:00"); + + IParser parser = new FhirContext().newXmlParser(); + String string = parser.encodeResourceToString(a1); + ourLog.info(string); + assertEquals("", string); + + string = parser.encodeResourceToString(a2); + ourLog.info(string); + assertEquals("", string); + } - } diff --git a/pom.xml b/pom.xml index 1f7c2e8c7a2..2d7ebf36f0f 100644 --- a/pom.xml +++ b/pom.xml @@ -402,6 +402,19 @@ + + org.codehaus.mojo + animal-sniffer-maven-plugin + 1.12 + true + + + org.codehaus.mojo.signature + java16 + 1.01 + + + maven-site-plugin false diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm index 62035b7cc4a..57dc42b9a81 100644 --- a/src/site/xdoc/download.xml.vm +++ b/src/site/xdoc/download.xml.vm @@ -11,17 +11,56 @@

- The easiest way to get started with HAPI-FHIR is to either download the - source code from our - Git Repository - , or to use Maven: + Important note to users of HAPI 0.7 and before: The section below + references "hapi-fhir-structures-dstu-[version].jar", which was added for + HAPI 0.8 (and this version has not yet been released). If you are using HAPI + FHIR 0.7 or before, you only need to include the hapi-fhir-base + JAR, not the structures one. +

+ +

+ To use HAPI in your application, at a minimum you need to include the HAPI-FHIR core + JAR hapi-fhir-base-[version].jar, as well as at least one "structures" JAR. + The structures JAR contains classes with the resource and datatype definitions for a given + version of FHIR. At this time, the only official release of FHIR is the "DSTU1" release, + which is available by including the hapi-fhir-structures-dstu-[version].jar. +

+

+ If you use Maven, you can include these JARs with the following dependency tags:

ca.uhn.hapi.fhir hapi-fhir-base ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu + ${project.version} ]]> + + +

+ HAPI also has a hapi-fhir-structures-dev-[version].jar, which + contains the latest versions of the releases. You can include this JAR on + your classpath if you want to use resources that were created or updated by + HL7 after the DSTU1 release. Be warned though that using these resources + can lead to incompatibility between your application and other applications + if those applications use libraries that do not support DEV resources. +

+ +

+ If you are using Maven, ad the following dependency to include DEV resources: +

+ + ca.uhn.hapi.fhir + hapi-fhir-structures-dev + ${project.version} +]]> + +
+

@@ -51,6 +90,12 @@ https://oss.sonatype.org/content/repositories/snapshots/ ]]> + +

+ Non Maven users can often also find snapshot builds in the Maven repository + manually by searching + here. +

@@ -61,6 +106,17 @@ Some of those libraries are listed here:

+ + +

+ HAPI requires SLF4j for logging support, and it is recommended to include + an underlying logging framework such as Logback. See the + logging documentation for + more information. +

+ +
+