Site updates

This commit is contained in:
James Agnew 2014-10-31 16:09:42 -04:00
parent 3d320a8fe3
commit ece0e83609
3 changed files with 96 additions and 5 deletions

View File

@ -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("<Appointment xmlns=\"http://hl7.org/fhir\"><schedule><event><start value=\"2001-01-02T12:00:00\"/></event></schedule></Appointment>", string);
string = parser.encodeResourceToString(a2);
ourLog.info(string);
assertEquals("<Appointment xmlns=\"http://hl7.org/fhir\"><start value=\"2001-01-02T12:00:00\"/></Appointment>", string);
}
}

13
pom.xml
View File

@ -402,6 +402,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.12</version>
<inherited>true</inherited>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.01</version>
</signature>
</configuration>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<inherited>false</inherited>

View File

@ -11,17 +11,56 @@
<section name="Downloading HAPI FHIR">
<p>
The easiest way to get started with HAPI-FHIR is to either download the
source code from our
<a href="https://github.com/jamesagnew/hapi-fhir/">Git Repository</a>
, or to use Maven:
<b>Important note to users of HAPI 0.7 and before:</b> 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 <code>hapi-fhir-base</code>
JAR, not the structures one.
</p>
<p>
To use HAPI in your application, at a minimum you need to include the HAPI-FHIR core
JAR <code>hapi-fhir-base-[version].jar</code>, 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 <code>hapi-fhir-structures-dstu-[version].jar</code>.
</p>
<p>
If you use Maven, you can include these JARs with the following dependency tags:
</p>
<source><![CDATA[<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu</artifactId>
<version>${project.version}</version>
</dependency>]]></source>
<subsection name="Supporting DEV Resources">
<p>
HAPI also has a <code>hapi-fhir-structures-dev-[version].jar</code>, 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
<b>can lead to incompatibility</b> between your application and other applications
if those applications use libraries that do not support DEV resources.
</p>
<p>
If you are using Maven, ad the following dependency to include DEV resources:
</p>
<source><![CDATA[<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dev</artifactId>
<version>${project.version}</version>
</dependency>]]></source>
</subsection>
<subsection name="Non-Maven Users">
<p>
@ -51,6 +90,12 @@
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>]]></source>
<p>
Non Maven users can often also find snapshot builds in the Maven repository
manually by searching
<a href="https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/">here</a>.
</p>
</section>
@ -61,6 +106,17 @@
Some of those libraries are listed here:
</p>
<subsection name="Logging (SLF4j, Logback, etc.)">
<p>
HAPI requires SLF4j for logging support, and it is recommended to include
an underlying logging framework such as Logback. See the
<a href="./doc_logging.html">logging documentation</a> for
more information.
</p>
</subsection>
<subsection name="StAX / Woodstox">
<p>