Code and site cleanup

This commit is contained in:
jamesagnew 2015-06-21 22:10:13 -04:00
parent 9758f32021
commit 685fa6d164
58 changed files with 457 additions and 348 deletions

View File

@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
@ -42,6 +43,19 @@
</dependency> </dependency>
</dependencies> </dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven_project_info_plugin_version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</reporting>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View File

@ -18,14 +18,10 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId> <artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version> <version>${maven_project_info_plugin_version}</version>
<reportSets> <configuration>
<reportSet> <skip>true</skip>
<reports> </configuration>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -180,7 +180,7 @@
<id>SITE</id> <id>SITE</id>
<reporting> <reporting>
<plugins> <plugins>
<!--
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
@ -192,9 +192,13 @@
</reportSet> </reportSet>
</reportSets> </reportSets>
<configuration> <configuration>
<linkXRef>false</linkXRef>
<sourceDirectories>
<sourceDirectory>hapi-fhir-base/src/main/java</sourceDirectory>
</sourceDirectories>
</configuration> </configuration>
</plugin> </plugin>
-->
<!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version> <configuration> </configuration> </plugin> --> <version>3.0.0</version> <configuration> </configuration> </plugin> -->
<plugin> <plugin>

View File

@ -41,14 +41,15 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IBase> theDatatype) { public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IBase> theDatatype) {
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName); super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
assert Modifier.isInterface(theDatatype.getModifiers()) == false : "Type of " + theDatatype + " shouldn't be here"; // should use RuntimeChildAny // should use RuntimeChildAny
assert Modifier.isInterface(theDatatype.getModifiers()) == false : "Type of " + theDatatype + " shouldn't be here";
myDatatype = theDatatype; myDatatype = theDatatype;
} }
@Override @Override
public String getChildNameByDatatype(Class<? extends IBase> theDatatype) { public String getChildNameByDatatype(Class<? extends IBase> theDatatype) {
Class<?> nextType = theDatatype; Class<?> nextType = theDatatype;
while(nextType.equals(Object.class)==false) { while (nextType.equals(Object.class) == false) {
if (myDatatype.equals(nextType)) { if (myDatatype.equals(nextType)) {
return getElementName(); return getElementName();
} }
@ -60,7 +61,7 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
@Override @Override
public BaseRuntimeElementDefinition<?> getChildElementDefinitionByDatatype(Class<? extends IBase> theDatatype) { public BaseRuntimeElementDefinition<?> getChildElementDefinitionByDatatype(Class<? extends IBase> theDatatype) {
Class<?> nextType = theDatatype; Class<?> nextType = theDatatype;
while(nextType.equals(Object.class)==false) { while (nextType.equals(Object.class) == false) {
if (myDatatype.equals(nextType)) { if (myDatatype.equals(nextType)) {
return myElementDefinition; return myElementDefinition;
} }
@ -102,11 +103,10 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
} }
myCodeType = theType; myCodeType = theType;
} }
@Override @Override
public String toString() { public String toString() {
return getClass().getSimpleName() + "[" + getElementName() + "]"; return getClass().getSimpleName() + "[" + getElementName() + "]";
} }
} }

View File

@ -32,7 +32,7 @@ public abstract class BaseRuntimeChildDefinition {
@Override @Override
public String toString() { public String toString() {
return getClass().getSimpleName()+"[" + getElementName() + "]"; return getClass().getSimpleName() + "[" + getElementName() + "]";
} }
public abstract BaseRuntimeElementDefinition<?> getChildByName(String theName); public abstract BaseRuntimeElementDefinition<?> getChildByName(String theName);
@ -52,11 +52,11 @@ public abstract class BaseRuntimeChildDefinition {
} }
public abstract String getElementName(); public abstract String getElementName();
public abstract int getMax(); public abstract int getMax();
public abstract int getMin(); public abstract int getMin();
public interface IMutator { public interface IMutator {
void setValue(Object theTarget, IBase theValue); void setValue(Object theTarget, IBase theValue);
@ -71,7 +71,7 @@ public abstract class BaseRuntimeChildDefinition {
return null; return null;
} }
// public String getExtensionUrl() { // public String getExtensionUrl() {
// return null; // return null;
// } // }
} }

View File

@ -41,7 +41,7 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IBase> ext
super(theName, theImplementingClass, theStandardType); super(theName, theImplementingClass, theStandardType);
} }
public void addChild(BaseRuntimeChildDefinition theNext) { void addChild(BaseRuntimeChildDefinition theNext) {
if (theNext == null) { if (theNext == null) {
throw new NullPointerException(); throw new NullPointerException();
} }

View File

@ -30,9 +30,6 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseEnumFactory;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
public abstract class BaseRuntimeElementDefinition<T extends IBase> { public abstract class BaseRuntimeElementDefinition<T extends IBase> {

View File

@ -40,8 +40,8 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.view.ViewGenerator; import ca.uhn.fhir.model.view.ViewGenerator;
import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator;
import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.parser.IParserErrorHandler;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.parser.IParserErrorHandler;
import ca.uhn.fhir.parser.JsonParser; import ca.uhn.fhir.parser.JsonParser;
import ca.uhn.fhir.parser.LenientErrorHandler; import ca.uhn.fhir.parser.LenientErrorHandler;
import ca.uhn.fhir.parser.XmlParser; import ca.uhn.fhir.parser.XmlParser;

View File

@ -48,21 +48,21 @@ import java.util.Set;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.TreeSet; import java.util.TreeSet;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseDatatype;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.instance.model.api.IBaseEnumFactory; import org.hl7.fhir.instance.model.api.IBaseEnumFactory;
import org.hl7.fhir.instance.model.api.IBaseEnumeration; import org.hl7.fhir.instance.model.api.IBaseEnumeration;
import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseExtension;
import org.hl7.fhir.instance.model.api.IBaseReference;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IBaseXhtml; import org.hl7.fhir.instance.model.api.IBaseXhtml;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.INarrative; import org.hl7.fhir.instance.model.api.INarrative;
import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.model.api.CodeableConceptElement; import ca.uhn.fhir.model.api.CodeableConceptElement;
import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ExtensionDt;

View File

@ -20,7 +20,8 @@ package ca.uhn.fhir.context;
* #L% * #L%
*/ */
import ca.uhn.fhir.model.api.IResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.annotation.ProvidesResources; import ca.uhn.fhir.model.api.annotation.ProvidesResources;
/** /**
@ -30,42 +31,48 @@ import ca.uhn.fhir.model.api.annotation.ProvidesResources;
* @see ca.uhn.fhir.model.api.annotation.ProvidesResources * @see ca.uhn.fhir.model.api.annotation.ProvidesResources
*/ */
public class ProvidedResourceScanner { public class ProvidedResourceScanner {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ModelScanner.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ProvidedResourceScanner.class);
private FhirContext myContext; private FhirContext myContext;
/** /**
* Constructor * Constructor
* @param theContext - context whose resource definition list is to be updated by the scanner *
*/ * @param theContext
public ProvidedResourceScanner(FhirContext theContext) { * - context whose resource definition list is to be updated by the scanner
myContext = theContext; */
} public ProvidedResourceScanner(FhirContext theContext) {
myContext = theContext;
}
/** /**
* If {@code theProvider} is tagged with the {@code ProvidesResources} annotation, this method will add every resource listed * If {@code theProvider} is tagged with the {@code ProvidesResources} annotation, this method will add every
* by the {@code resources} method. * resource listed by the {@code resources} method.
* <p> * <p>
* Notes: * Notes:
* </p> * </p>
* <ul> * <ul>
* <li>if {@code theProvider} isn't annotated with {@code resources} nothing is done; it's expected that most RestfulServers and * <li>if {@code theProvider} isn't annotated with {@code resources} nothing is done; it's expected that most
* ResourceProviders won't be annotated.</li> * RestfulServers and ResourceProviders won't be annotated.</li>
* <li>any object listed in {@code resources} that doesn't implement {@code IResource} will generate a warning in the log.</li> * <li>any object listed in {@code resources} that doesn't implement {@code IResource} will generate a warning in the
* </ul> * log.</li>
* * </ul>
* @param theProvider - Normally, either a {@link ca.uhn.fhir.rest.server.RestfulServer} or a {@link ca.uhn.fhir.rest.server.IResourceProvider} *
* that might be annotated with {@link ca.uhn.fhir.model.api.annotation.ProvidesResources} * @param theProvider
*/ * - Normally, either a {@link ca.uhn.fhir.rest.server.RestfulServer} or a
public void scanForProvidedResources(Object theProvider) { * {@link ca.uhn.fhir.rest.server.IResourceProvider} that might be annotated with
ProvidesResources annotation = theProvider.getClass().getAnnotation(ProvidesResources.class); * {@link ca.uhn.fhir.model.api.annotation.ProvidesResources}
if (annotation == null) */
return; @SuppressWarnings("unchecked")
for (Class clazz : annotation.resources()) { public void scanForProvidedResources(Object theProvider) {
if (IResource.class.isAssignableFrom(clazz)) { ProvidesResources annotation = theProvider.getClass().getAnnotation(ProvidesResources.class);
myContext.getResourceDefinition(clazz); if (annotation == null)
} else { return;
ourLog.warn(clazz.getSimpleName() + "is not assignable from IResource"); for (Class<?> clazz : annotation.resources()) {
} if (IBaseResource.class.isAssignableFrom(clazz)) {
} myContext.getResourceDefinition((Class<? extends IBaseResource>) clazz);
} } else {
ourLog.warn(clazz.getSimpleName() + "is not assignable from IResource");
}
}
}
} }

View File

@ -31,7 +31,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseEnumeration;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;

View File

@ -30,7 +30,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.base.composite.BaseContainedDt;
public class RuntimeChildDirectResource extends BaseRuntimeDeclaredChildDefinition { public class RuntimeChildDirectResource extends BaseRuntimeDeclaredChildDefinition {

View File

@ -26,17 +26,14 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseReference;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefinition { public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefinition {

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.ICompositeType;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.util.Map; import java.util.Map;

View File

@ -27,9 +27,9 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IAnyResource;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.ResourceDef;

View File

@ -24,9 +24,9 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IAnyResource;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;

View File

@ -20,6 +20,10 @@ package ca.uhn.fhir.model.api;
* #L% * #L%
*/ */
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseContainedDt;
import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt;
@ -27,12 +31,6 @@ import ca.uhn.fhir.model.base.resource.ResourceMetadataMap;
import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.hl7.fhir.instance.model.api.IIdType;
/** /**
* This interface is the parent interface for all FHIR Resource definition * This interface is the parent interface for all FHIR Resource definition
* classes. Classes implementing this interface should be annotated * classes. Classes implementing this interface should be annotated

View File

@ -34,7 +34,6 @@ import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.param.QuantityParam; import ca.uhn.fhir.rest.param.QuantityParam;
import ca.uhn.fhir.rest.param.StringParam;
public abstract class BaseQuantityDt extends BaseIdentifiableElement implements ICompositeDatatype, IQueryParameterType { public abstract class BaseQuantityDt extends BaseIdentifiableElement implements ICompositeDatatype, IQueryParameterType {

View File

@ -20,11 +20,7 @@ package ca.uhn.fhir.model.primitive;
* #L% * #L%
*/ */
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.DAY; import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.*;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MILLI;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MONTH;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.SECOND;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.YEAR;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -29,8 +29,8 @@ import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import ca.uhn.fhir.model.api.IPrimitiveDatatype; import ca.uhn.fhir.model.api.IPrimitiveDatatype;

View File

@ -32,7 +32,6 @@ import ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition;
import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.model.api.BaseElement; import ca.uhn.fhir.model.api.BaseElement;
import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
public class ViewGenerator { public class ViewGenerator {

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.narrative;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

View File

@ -38,14 +38,14 @@ import java.util.Set;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseBundle;
import org.hl7.fhir.instance.model.api.IBaseReference;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IDomainResource;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition; import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition;

View File

@ -20,9 +20,7 @@ package ca.uhn.fhir.parser;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;
@ -50,11 +48,8 @@ import javax.json.stream.JsonGeneratorFactory;
import javax.json.stream.JsonParsingException; import javax.json.stream.JsonParsingException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseBinary; import org.hl7.fhir.instance.model.api.IBaseBinary;
import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype;
import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseDatatype;
@ -63,8 +58,10 @@ import org.hl7.fhir.instance.model.api.IBaseExtension;
import org.hl7.fhir.instance.model.api.IBaseHasExtensions; import org.hl7.fhir.instance.model.api.IBaseHasExtensions;
import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions;
import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype; import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseReference;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
@ -82,7 +79,6 @@ import ca.uhn.fhir.model.api.BaseBundle;
import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.BundleEntry; import ca.uhn.fhir.model.api.BundleEntry;
import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IIdentifiableElement; import ca.uhn.fhir.model.api.IIdentifiableElement;
import ca.uhn.fhir.model.api.IPrimitiveDatatype; import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
@ -94,18 +90,13 @@ import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.base.composite.BaseCodingDt; import ca.uhn.fhir.model.base.composite.BaseCodingDt;
import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseContainedDt;
import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt;
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.model.primitive.XhtmlDt;
import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator;
import ca.uhn.fhir.util.ElementUtil; import ca.uhn.fhir.util.ElementUtil;
import ca.uhn.fhir.util.UrlUtil;
/** /**
* This class is the FHIR JSON parser/encoder. Users should not interact with this class directly, but should use {@link FhirContext#newJsonParser()} to get an instance. * This class is the FHIR JSON parser/encoder. Users should not interact with this class directly, but should use {@link FhirContext#newJsonParser()} to get an instance.

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.rest.gclient; package ca.uhn.fhir.rest.gclient;
import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;

View File

@ -48,7 +48,6 @@ import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.EncodingEnum;
import ca.uhn.fhir.rest.server.IVersionSpecificBundleFactory; import ca.uhn.fhir.rest.server.IVersionSpecificBundleFactory;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.validation.FhirValidator;
/** /**
* @author James Agnew * @author James Agnew

View File

@ -34,8 +34,6 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import javax.servlet.ServletInputStream;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Collection; import java.util.Collection;

View File

@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View File

@ -29,7 +29,6 @@ import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpRequestBase;
import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.rest.client.BaseHttpClientInvocation; import ca.uhn.fhir.rest.client.BaseHttpClientInvocation;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Collections; import java.util.Collections;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.math.BigDecimal; import java.math.BigDecimal;

View File

@ -20,8 +20,6 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;

View File

@ -20,8 +20,8 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import static ca.uhn.fhir.rest.param.ParameterUtil.escape; import static ca.uhn.fhir.rest.param.ParameterUtil.*;
import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;

View File

@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;

View File

@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.param;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.defaultString; import static org.apache.commons.lang3.StringUtils.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;

View File

@ -20,11 +20,11 @@ package ca.uhn.fhir.rest.server;
* #L% * #L%
*/ */
import java.util.Set;
import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.util.ResourceReferenceInfo; import ca.uhn.fhir.util.ResourceReferenceInfo;
import java.util.Set;
/** /**
* Created by Bill de Beaubien on 3/4/2015. * Created by Bill de Beaubien on 3/4/2015.
* *

View File

@ -25,7 +25,6 @@ import java.util.List;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.InstantDt;
/** /**

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException; import java.io.IOException;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;

View File

@ -5,7 +5,6 @@ import java.util.LinkedHashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import net.sourceforge.cobertura.CoverageIgnore;
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.api.RequestTypeEnum;
import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.Constants;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server.interceptor;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -26,8 +26,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import ca.uhn.fhir.rest.server.RestfulServer;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Bundle;

View File

@ -20,6 +20,8 @@ package ca.uhn.fhir.util;
* #L% * #L%
*/ */
import java.util.List;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
@ -28,8 +30,6 @@ import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions;
import java.util.List;
/** /**
* @see FhirTerser#visit(IBaseResource, IModelVisitor) * @see FhirTerser#visit(IBaseResource, IModelVisitor)
*/ */

View File

@ -31,7 +31,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
/** /**
* Created by Bill de Beaubien on 2/26/2015. * Created by Bill de Beaubien on 2/26/2015.

View File

@ -230,11 +230,8 @@
<ignore>**/valueset/*.class</ignore> <ignore>**/valueset/*.class</ignore>
<ignore>**/exceptions/*.class</ignore> <ignore>**/exceptions/*.class</ignore>
</excludes> </excludes>
<!-- <!-- <ignoreMethodAnnotations> <ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation>
<ignoreMethodAnnotations> </ignoreMethodAnnotations> -->
<ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation>
</ignoreMethodAnnotations>
-->
</instrumentation> </instrumentation>
</configuration> </configuration>
<executions> <executions>
@ -386,6 +383,28 @@
</reportSet> </reportSet>
</reportSets> </reportSets>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven_project_info_plugin_version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins> </plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<linkXRef>false</linkXRef>
</configuration>
</plugin>
</reporting> </reporting>
</project> </project>

242
pom.xml
View File

@ -54,10 +54,8 @@
</dependencies> </dependencies>
<prerequisites> <prerequisites>
<!-- <!-- TODO: the version number here should probably be either 3.2 or 3.3.
TODO: the version number here should probably be Check and fix -->
either 3.2 or 3.3. Check and fix
-->
<maven>3.0.1</maven> <maven>3.0.1</maven>
</prerequisites> </prerequisites>
@ -162,15 +160,13 @@
</licenses> </licenses>
<properties> <properties>
<!-- <!-- This property is used in some of the site documentation where the
This property is used in some of the site documentation where the version version is shown, so that we can deploy the site even if the project is on
is shown, so that we can deploy the site even if the project is on a a snapshot version. -->
snapshot version.
-->
<hapi_stable_version>1.0</hapi_stable_version> <hapi_stable_version>1.0</hapi_stable_version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- For site-deploy --> <!-- For site-deploy -->
<siteMainDirectory>${user.home}/sites/hapi-fhir</siteMainDirectory> <siteMainDirectory>${user.home}/sites/hapi-fhir</siteMainDirectory>
<scmPubCheckoutDirectory>${user.home}/sites/scm/hapi-fhir</scmPubCheckoutDirectory> <scmPubCheckoutDirectory>${user.home}/sites/scm/hapi-fhir</scmPubCheckoutDirectory>
@ -184,14 +180,11 @@
<derby_version>10.11.1.1</derby_version> <derby_version>10.11.1.1</derby_version>
<guava_version>18.0</guava_version> <guava_version>18.0</guava_version>
<hamcrest_version>2.0.0.0</hamcrest_version> <hamcrest_version>2.0.0.0</hamcrest_version>
<!-- <!-- Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is
Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is too new for too new for a number of platforms including JBoss EAP 6.x and Glassfish 3.0.
a number of platforms including JBoss EAP 6.x and Glassfish 3.0. Upgrade this Upgrade this version with caution! Also note that if you change this, you
version with caution! Also note that if you change this, you may get a failure may get a failure in hibernate4-maven-plugin. See the note in hapi-fhir-jpaserver-base/pom.xml's
in hibernate4-maven-plugin. See the note in hapi-fhir-jpaserver-base/pom.xml's configuration for that plugin... <hibernate_version>4.3.7.Final</hibernate_version> -->
configuration for that plugin...
<hibernate_version>4.3.7.Final</hibernate_version>
-->
<hibernate_version>4.2.17.Final</hibernate_version> <hibernate_version>4.2.17.Final</hibernate_version>
<hibernate_validator_version>5.1.0.Final</hibernate_validator_version> <hibernate_validator_version>5.1.0.Final</hibernate_validator_version>
<jetty_version>9.2.6.v20141205</jetty_version> <jetty_version>9.2.6.v20141205</jetty_version>
@ -238,15 +231,15 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.eluder.coveralls</groupId> <groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId> <artifactId>coveralls-maven-plugin</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<configuration> <configuration>
<coberturaReports> <coberturaReports>
</coberturaReports> </coberturaReports>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -280,7 +273,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>${maven_surefire_plugin_version}</version> <version>${maven_surefire_plugin_version}</version>
<configuration> <configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile> <redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder> <runOrder>random</runOrder>
<argLine>-Dfile.encoding=UTF-8</argLine> <argLine>-Dfile.encoding=UTF-8</argLine>
</configuration> </configuration>
@ -344,12 +337,11 @@
<artifactId>doxia-module-markdown</artifactId> <artifactId>doxia-module-markdown</artifactId>
<version>1.6</version> <version>1.6</version>
</dependency> </dependency>
<!-- <!-- -->
-->
<dependency> <dependency>
<groupId>lt.velykis.maven.skins</groupId> <groupId>lt.velykis.maven.skins</groupId>
<artifactId>reflow-velocity-tools</artifactId> <artifactId>reflow-velocity-tools</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.velocity</groupId> <groupId>org.apache.velocity</groupId>
@ -358,7 +350,8 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>
@ -449,21 +442,21 @@
</lifecycleMappingMetadata> </lifecycleMappingMetadata>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version> <version>2.15</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.puppycrawl.tools</groupId> <groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId> <artifactId>checkstyle</artifactId>
<version>6.7</version> <version>6.7</version>
</dependency> </dependency>
</dependencies> </dependencies>
<configuration> <configuration>
<configLocation>src/checkstyle/checkstyle.xml</configLocation> <configLocation>src/checkstyle/checkstyle.xml</configLocation>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
@ -498,29 +491,61 @@
<configuration> <configuration>
<target> <target>
<copy todir="target/site/apidocs"> <copy todir="target/site/apidocs">
<fileset dir="hapi-fhir-base/target/site/apidocs"/> <fileset dir="hapi-fhir-base/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/apidocs-dstu"> <copy todir="target/site/apidocs-dstu">
<fileset dir="hapi-fhir-structures-dstu/target/site/apidocs"/> <fileset dir="hapi-fhir-structures-dstu/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/apidocs-hl7org-dstu2"> <copy todir="target/site/apidocs-hl7org-dstu2">
<fileset dir="hapi-fhir-structures-hl7org-dstu2/target/site/apidocs"/> <fileset
dir="hapi-fhir-structures-hl7org-dstu2/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/apidocs-dstu2"> <copy todir="target/site/apidocs-dstu2">
<fileset dir="hapi-fhir-structures-dstu2/target/site/apidocs"/> <fileset dir="hapi-fhir-structures-dstu2/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/apidocs-jpaserver"> <copy todir="target/site/apidocs-jpaserver">
<fileset dir="hapi-fhir-jpaserver-base/target/site/apidocs"/> <fileset dir="hapi-fhir-jpaserver-base/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/xref-jpaserver"> <copy todir="target/site/xref-jpaserver">
<fileset dir="hapi-fhir-jpaserver-base/target/site/xref"/> <fileset dir="hapi-fhir-jpaserver-base/target/site/xref" />
</copy> </copy>
<copy todir="target/site/xref-base"> <copy todir="target/site/xref-base">
<fileset dir="hapi-fhir-base/target/site/xref"/> <fileset dir="hapi-fhir-base/target/site/xref" />
</copy> </copy>
<copy todir="target/site/cobertura"> <copy todir="target/site/cobertura">
<fileset dir="hapi-fhir-cobertura/target/site/cobertura"/> <fileset dir="hapi-fhir-cobertura/target/site/cobertura" />
</copy> </copy>
<copy todir="target/site">
<fileset dir="hapi-fhir-cobertura/target/site" includes="checkstyle.*"/>
</copy>
<echo>Fixing Checkstyle Report</echo>
<replace dir="target/site" summary="true">
<include name="checkstyle.html" />
<replacetoken>"../../</replacetoken>
<replacevalue>"./</replacevalue>
</replace>
<replace dir="target/site" summary="true">
<include name="*.html" />
<replacetoken>http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css</replacetoken>
<replacevalue>./css/bootstrap-responsive.min.css</replacevalue>
</replace>
<replace dir="target/site" summary="true">
<include name="index.html" />
<replacetoken><![CDATA[<h2 id="Welcome">Welcome</h2>]]></replacetoken>
<replacevalue><![CDATA[<div class="jumbotron subhead">
<div class="row" id="banner">
<div class="span12">
<div class="pull-left">
<a href="./" id="bannerLeft"><img src="images/hapi_fhir_banner.png" alt='"'HAPI'"' /></a>
</div>
<div class="pull-right">
<a href="./" id="bannerRight"><img src="images/hapi_fhir_banner_right.png" alt='"'FHIR'"' /></a>
</div>
</div>
</div>
</div>]]></replacevalue>
</replace>
<!--<replaceregexp file="target/site/checkstyle.html" byline="false" match="&lt;ul class=&quot;breadcrumb.*?&lt;/ul&gt;" replace="" flags="s"/>-->
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -560,7 +585,7 @@
</replace> </replace>
<echo>Changing Breadcrumbs</echo> <echo>Changing Breadcrumbs</echo>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="doc_*.html"/> <include name="doc_*.html" />
<replacetoken><![CDATA[<li class="divider">/</li>]]></replacetoken> <replacetoken><![CDATA[<li class="divider">/</li>]]></replacetoken>
<replacevalue><![CDATA[<li class="divider">/</li> <replacevalue><![CDATA[<li class="divider">/</li>
<li><a href="docindex.html" title="Documentation">Documentation</a></li> <li><a href="docindex.html" title="Documentation">Documentation</a></li>
@ -650,46 +675,6 @@
</BODY > </BODY >
]]></replacevalue> ]]></replacevalue>
</replace> </replace>
<echo>Adding social plugins for HAPI</echo>
<replace dir="target/site/" summary="true">
<include name="**/*.html"></include>
<replacetoken><![CDATA[SOCIALPLUGINSHEREFHIR]]></replacetoken>
<replacevalue><![CDATA[
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td>
<iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&repo=hapi-fhir&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</td>
<td>
<iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&repo=hapi-fhir&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</td>
<td>
<iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&repo=hapi-fhir&type=fork&count=true&v=2" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</td>
<td><div class="g-plusone" data-annotation="inline" data-width="300" data-href="http://hl7api.sourceforge.net/"></div></td>
<td><div class="fb-like" data-href="http://hl7api.sourceforge.net/" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div></td>
</tr></table>
</p><p>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
]]></replacevalue>
</replace>
</target> </target>
</configuration> </configuration>
<goals> <goals>
@ -754,23 +739,11 @@
<reporting> <reporting>
<plugins> <plugins>
<!-- <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId>
<plugin> <reportSets> <reportSet> <reports><report>checkstyle-aggregate</report></reports>
<groupId>org.apache.maven.plugins</groupId> </reportSet> </reportSets> <configuration> <configLocation>config/sun_checks.xml</configLocation>
<artifactId>maven-checkstyle-plugin</artifactId> <includes> hapi-fhir-base/src/main/java/**/*.java </includes> </configuration>
<reportSets> </plugin> -->
<reportSet>
<reports><report>checkstyle-aggregate</report></reports>
</reportSet>
</reportSets>
<configuration>
<configLocation>config/sun_checks.xml</configLocation>
<includes>
hapi-fhir-base/src/main/java/**/*.java
</includes>
</configuration>
</plugin>
-->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId> <artifactId>maven-changes-plugin</artifactId>
@ -803,12 +776,12 @@
</reportSet> </reportSet>
</reportSets> </reportSets>
<configuration> <configuration>
<reportsDirectories> <reportsDirectories>
<reportDirectory>${project.basedir}/hapi-fhir-base/target/surefire-reports/</reportDirectory> <reportDirectory>${project.basedir}/hapi-fhir-base/target/surefire-reports/</reportDirectory>
<reportDirectory>${project.basedir}/hapi-fhir-structures-dstu/target/surefire-reports/</reportDirectory> <reportDirectory>${project.basedir}/hapi-fhir-structures-dstu/target/surefire-reports/</reportDirectory>
<reportDirectory>${project.basedir}/hapi-fhir-structures-dstu2/target/surefire-reports/</reportDirectory> <reportDirectory>${project.basedir}/hapi-fhir-structures-dstu2/target/surefire-reports/</reportDirectory>
<reportDirectory>${project.basedir}/hapi-fhir-jpaserver-base/target/surefire-reports/</reportDirectory> <reportDirectory>${project.basedir}/hapi-fhir-jpaserver-base/target/surefire-reports/</reportDirectory>
</reportsDirectories> </reportsDirectories>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -835,32 +808,21 @@
<profiles> <profiles>
<profile> <profile>
<id>ROOT</id> <id>ROOT</id>
<reporting>
<plugins>
</plugins>
</reporting>
<modules> <modules>
</modules> </modules>
<build> <build>
<plugins> <plugins>
<!-- <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>${maven_assembly_plugin_version}</version>
<plugin> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal>
<artifactId>maven-assembly-plugin</artifactId> </goals> <configuration> <attach>false</attach> <descriptors> <descriptor>${project.basedir}/src/assembly/hapi-fhir-sample-projects.xml</descriptor>
<version>${maven_assembly_plugin_version}</version> </descriptors> </configuration> </execution> </executions> </plugin> -->
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<descriptors>
<descriptor>${project.basedir}/src/assembly/hapi-fhir-sample-projects.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>SIGN_ARTIFACTS</id> <id>SIGN_ARTIFACTS</id>
@ -927,7 +889,7 @@
<modules> <modules>
<module>hapi-deployable-pom</module> <module>hapi-deployable-pom</module>
<module>hapi-fhir-base</module> <module>hapi-fhir-base</module>
<!--<module>hapi-fhir-oauth2</module>--> <!--<module>hapi-fhir-oauth2</module> -->
<module>hapi-fhir-base-test-mindeps-client</module> <module>hapi-fhir-base-test-mindeps-client</module>
<module>hapi-fhir-base-test-mindeps-server</module> <module>hapi-fhir-base-test-mindeps-server</module>
<module>hapi-tinder-plugin</module> <module>hapi-tinder-plugin</module>

View File

@ -495,8 +495,8 @@
<![CDATA[<b>API CHANGE:</b>]]> The "FHIR structures" for DSTU1 (the classes which model the <![CDATA[<b>API CHANGE:</b>]]> The "FHIR structures" for DSTU1 (the classes which model the
resources and composite datatypes) have been moved out of the core JAR into their resources and composite datatypes) have been moved out of the core JAR into their
own JAR, in order to allow support for DEV resources, and DSTU2 resources when thast own JAR, in order to allow support for DEV resources, and DSTU2 resources when thast
version is finalized. See version is finalized. See the
<![CDATA[<a href="./doc_upgrading.html">upgrading</a>]]> <![CDATA[<a href="./doc_dstu2.html">DSTU2 page</a>]]>
for more information. for more information.
</action> </action>
<action type="fix"> <action type="fix">

View File

@ -42,10 +42,10 @@
<property name="allowNonPrintableEscapes" value="true"/> <property name="allowNonPrintableEscapes" value="true"/>
</module> </module>
<module name="LineLength"> <module name="LineLength">
<property name="max" value="200"/> <property name="max" value="300"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module> </module>
<module name="AvoidStarImport"/> <!--<module name="AvoidStarImport"/>-->
<module name="OneTopLevelClass"/> <module name="OneTopLevelClass"/>
<module name="NoLineWrap"/> <module name="NoLineWrap"/>
<module name="EmptyBlock"> <module name="EmptyBlock">
@ -54,13 +54,14 @@
</module> </module>
<module name="NeedBraces"/> <module name="NeedBraces"/>
<module name="LeftCurly"> <module name="LeftCurly">
<property name="maxLineLength" value="200"/> <property name="maxLineLength" value="300"/>
</module> </module>
<module name="RightCurly"/> <module name="RightCurly"/>
<module name="RightCurly"> <module name="RightCurly">
<property name="option" value="alone"/> <property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/> <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
</module> </module>
<!--
<module name="WhitespaceAround"> <module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/> <property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/> <property name="allowEmptyMethods" value="true"/>
@ -71,6 +72,7 @@
<message key="ws.notPreceded" <message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/> value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module> </module>
-->
<module name="OneStatementPerLine"/> <module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/> <module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/> <module name="ArrayTypeStyle"/>
@ -110,8 +112,7 @@
</module> </module>
<module name="LocalVariableName"> <module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/> <property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
<message key="name.invalidPattern" <message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/> value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module> </module>
@ -175,12 +176,13 @@
<module name="SummaryJavadocCheck"> <module name="SummaryJavadocCheck">
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/> <property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module> </module>
<module name="JavadocParagraph"/>
<module name="AtclauseOrder"> <module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/> <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module> </module>
<module name="JavadocMethod"> <!--
<module name="JavadocMethod">
<module name="JavadocParagraph"/>
<property name="scope" value="public"/> <property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/> <property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/> <property name="allowMissingThrowsTags" value="true"/>
@ -189,6 +191,7 @@
<property name="allowedAnnotations" value="Override, Test"/> <property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/> <property name="allowThrowsTagsForSubclasses" value="true"/>
</module> </module>
-->
<module name="MethodName"> <module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/> <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern" <message key="name.invalidPattern"

File diff suppressed because one or more lines are too long

View File

@ -86,8 +86,13 @@ A.pagenavlinks {
} }
*/ */
body { @media (min-width: 980px) { /* 768 980 */
body {
padding-top: 40px; padding-top: 40px;
}
}
body {
padding-bottom: 10px; padding-bottom: 10px;
} }
@ -101,6 +106,7 @@ pre {
.page-header { .page-header {
padding-bottom: 2px; padding-bottom: 2px;
margin: 0px 0 0px; margin: 0px 0 0px;
border-bottom: none;
} }
h1[id]:before, h1[id]:before,
h2[id]:before, h2[id]:before,

View File

@ -5,6 +5,7 @@
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd"
name="HAPI"> name="HAPI">
<!--
<bannerLeft> <bannerLeft>
<name>HAPI</name> <name>HAPI</name>
<src>images/hapi_fhir_banner.png</src> <src>images/hapi_fhir_banner.png</src>
@ -16,6 +17,7 @@
<src>images/hapi_fhir_banner_right.png</src> <src>images/hapi_fhir_banner_right.png</src>
<href>http://jamesagnew.github.io/hapi-fhir/</href> <href>http://jamesagnew.github.io/hapi-fhir/</href>
</bannerRight> </bannerRight>
-->
<poweredBy> <poweredBy>
<logo name="Hosted on GitHub" href="https://github.com/jamesagnew/hapi-fhir" img="./images/github-logo-mini.png"/> <logo name="Hosted on GitHub" href="https://github.com/jamesagnew/hapi-fhir" img="./images/github-logo-mini.png"/>
@ -77,7 +79,7 @@
<menu name="Documentation" inherit="top" > <menu name="Documentation" inherit="top" >
<item name="Documentation Index" href="./docindex.html"/> <item name="Documentation Index" href="./docindex.html"/>
<item name="Introduction" href="./doc_intro.html"/> <item name="Introduction" href="./doc_intro.html"/>
<item name="Note on DSTU2 Support / FHIR Versions" href="./doc_dstu2.html" /> <item name="DSTU2 Support / HL7.org Structures" href="./doc_dstu2.html" />
<item name="The Data Model" href="./doc_fhirobjects.html"> <item name="The Data Model" href="./doc_fhirobjects.html">
<item name="Working with Resources" href="./doc_fhirobjects.html" /> <item name="Working with Resources" href="./doc_fhirobjects.html" />
<item name="Resource References" href="./doc_resource_references.html" /> <item name="Resource References" href="./doc_resource_references.html" />
@ -137,8 +139,10 @@
<menu name="Maven Reports" inherit="bottom"> <menu name="Maven Reports" inherit="bottom">
<item name="Project Developers" href="team-list.html" /> <item name="Project Developers" href="team-list.html" />
<item name="Unit Test Report" href="surefire-report.html" /> <item name="Cobertura (Test Coverage)" href="cobertura/index.html" />
<item name="Surefire (Test Status)" href="surefire-report.html" />
<item name="FindBugs" href="findbugs.html" /> <item name="FindBugs" href="findbugs.html" />
<item name="Checkstyle" href="checkstyle.html" />
</menu> </menu>
</body> </body>

View File

@ -17,12 +17,21 @@
<a href="http://hl7-fhir.github.io/">Continuous Integration Builds</a> <a href="http://hl7-fhir.github.io/">Continuous Integration Builds</a>
of the FHIR specification itself and many (if not most) of these changes will of the FHIR specification itself and many (if not most) of these changes will
end up in the final DSTU2 specification which is expected to be released end up in the final DSTU2 specification which is expected to be released
in mid-2015. in mid-to-late-2015.
</p> </p>
<p> <p>
The most interesting changes to DSTU2 include: DSTU2 is a significant upgrade to FHIR. While many things are unchanged,
lots of things have changed. Some of the the more interesting differences include:
</p> </p>
<ul> <ul>
<li>
A new
<a href="http://hl7-fhir.github.io/bundle.html">Bundle</a>
format which is no longer based on Atom. The new format does resemble the
Atom format so it will not be unfamiliar to anyone who is used to DSTU1 bundles
but it has a few differences. On a conceptual level FHIR now defines a Bundle as
just another type of resource.
</li>
<li> <li>
New New
<a href="http://hl7-fhir.github.io/resource.html">"id" and "meta"</a> <a href="http://hl7-fhir.github.io/resource.html">"id" and "meta"</a>
@ -32,27 +41,9 @@
in URLs and HTTP headers outside of the payload) in URLs and HTTP headers outside of the payload)
</li> </li>
<li> <li>
A new Numerous changes to the model, including attribute changes to existing resources,
<a href="http://hl7-fhir.github.io/bundle.html">Bundle</a> the addition of a number of new resources, and the removal of a few redundant ones
format which is no longer based on Atom. The new format does resemble the as well.
Atom format so it will not be unfamiliar to anyone who is used to DSTU1 bundles
but it has a few differences. On a conceptual level FHIR now thinks of Bundles as
resources themselves, so the new bundle also gains the meta element described above.
</li>
<li>
<strike>In <a href="http://hl7-fhir.github.io/json.html">JSON encoding</a>, the
encoding of extensions has changed a bit, so that extensions on non-primitive
elements now appear with the extension URL as the JSON key, instead of being
a value in an object called "extension". See the JSON documentation to see how
this new style looks.</strike> This change was reverted by HL7.
</li>
<li>
A number of new resources have been added, and some existing resources have changed.
One particularly visible (and non-backwards-compatible) change is that
Patient.gender has changed from a CodeableConcept to a Code. While this new type
is much more intuitive (having multiple codings attached to a single gender field is
confusing) it does mean that existing DSTU1 Patient resources will not parse correctly
as DSTU2 resources if they include a gender.
</li> </li>
</ul> </ul>
@ -135,6 +126,105 @@
</section> </section>
<section name="HL7.org &quot;Reference Implementation&quot; Structure Classes">
<p>
Since the early days of FHIR, HL7.org has provided an
open source "Java Reference Implementation", which is an implementation
of a FHIR data model, parser, and client in Java.
</p>
<p>
HAPI was originally started as a separate Java implementation of FHIR,
with a fairly different focus: implementing servers with an easily
extendible data model. Over time though, the two Java implementations have
shown a fair bit of overlap, so at the 2014
<a href="http://fhir.furore.com/Events/DevDaysEval2014">DevDays</a> we decided
to try and harmonize the two libraries.
</p>
<p>
HAPI FHIR 1.1 begins the availability of a harmonized library. Note that
this version has not yet been formally released, but is currently available in
"snapshot" development builds.
</p>
<p>
<b>For HAPI FHIR users:</b> This integration will bring the ability to use powerful features
from the RI in your applications, such as the resource validator and the narrative
generator.
</p>
<p>
<b>For RI users:</b> This integration will bring the ability to use HAPI's client
and server frameworks in your application, as well as the ability to take advantage
of HAPI's code-first statically bound extension mechanism.
</p>
<subsection name="The RI Data Model">
<p>
At this point, the RI integration consists of a new parallel set of
classes representing the FHIR data model. For example, in addition to the
Patient classes representing HAPI's DSTU1 and DSTU2 models there is now
a new Patient class representing the RI structure (which is also a DSTU2
structure).
</p>
<p>
The reference implementation (RI) structures have been added as a new
maven dependency library called <code>hapi-fhir-structures-hl7org-dstu2</code>. See
the <a href="./download.html">download page</a> for information on the Maven
dependencies for this version of the structures.
</p>
<p>
A new interface has been added which serves as a master interface
for all resource classes: <code>org.hl7.fhir.instance.model.api.IBaseResource</code>.
All RI resource classes will be in the package <code>org.hl7.fhir.instance.model</code>,
as shown below.
</p>
<img src="./images/hapi-1.1-structs-resource.png" alt="Structures"/>
<p>
Datatypes will also be found inthe same package. Unlike HAPI datatype structures,
which all end with "Dt", the RI primitive structure names end with "Type" and the
RI composite structures have no suffix, as shown below.
</p>
<img src="./images/hapi-1.1-structs-datatypes.png" alt="Structures"/>
</subsection>
<subsection name="Using the RI Structures in Your Application">
<p>
If you want to use the RI structures in your application,
you will need to use the "hapi-fhir-structures-hl7org-dstu2-[version].jar"
library.
</p>
<p>
Using these structures is then similar to using other structures.
</p>
<macro name="snippet">
<param name="id" value="creatingContextHl7org" />
<param name="file" value="examples/src/main/java/example/FhirContextIntro.java" />
</macro>
</subsection>
</section>
<section name="Upgrading Existing Applications to HAPI FHIR 1.1">
<p>
If you have an existing application built using a version of previous
version of HAPI FHIR, there is one change that may affect you. As shown above,
a new interface called <code>IBaseResource</code> has been introduced, and the
<code>IResource</code> interface extends from it. Many methods in the API which
previously returned <code>IResource</code> now return <code>IBaseResource</code>.
</p>
<p>
For these methods, you may cast the <code>IBaseResource</code> to
<code>IResource</code>.
</p>
</section>
</body> </body>
</document> </document>

View File

@ -21,6 +21,21 @@
<a href="https://github.com/jamesagnew/hapi-fhir/releases">GitHub Release Section</a>. <a href="https://github.com/jamesagnew/hapi-fhir/releases">GitHub Release Section</a>.
</p> </p>
<subsection name="Note on &quot;snapshot&quot; (pre-release) builds">
<p>
FHIR is a fast moving specification, and there is a lot of ongoing work
in HAPI as well. While we regularly put out new releases, there may be
times when you want to try out the latest unreleased version. You can ususally
look at the source of the
<a href="https://github.com/jamesagnew/hapi-fhir/blob/master/src/changes/changes.xml">changes report</a>
to get a sense of what has changed in the next unreleased version.
</p>
<p>
See <a href="#Using_Snapshot_Builds">using snapshot builds</a> below to find out
how to get these builds.S
</p>
</subsection>
</section> </section>
<section name="Maven Users"> <section name="Maven Users">
@ -30,18 +45,20 @@
The structures JAR contains classes with the resource and datatype definitions for a given The structures JAR contains classes with the resource and datatype definitions for a given
version of FHIR. version of FHIR.
</p> </p>
<p>
At this time, the only official release of FHIR is the "DSTU1" release, <subsection name="DSTU1 Resources - HAPI Structures">
which is available by including the <code>hapi-fhir-structures-dstu-[version].jar</code>. <p>
Note that the ballot process for the next release (DSTU2) has not yet been At this time, the only official release of FHIR is the "DSTU1" release,
completed, but many users are already targeting it for new development as it which is available by including the <code>hapi-fhir-structures-dstu-[version].jar</code>.
is likely to be approved without significant changes. Note that the ballot process for the next release (DSTU2) has not yet been
</p> completed, but many users are already targeting it for new development as it
<p> is likely to be approved without significant changes.
If you use Maven, you can include these JARs with the following dependency tags </p>
to enable DSTU1 support: <p>
</p> If you use Maven, you can include these JARs with the following dependency tags
<source><![CDATA[<dependency> to enable DSTU1 support:
</p>
<source><![CDATA[<dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId> <artifactId>hapi-fhir-base</artifactId>
<version>${hapi_stable_version}</version> <version>${hapi_stable_version}</version>
@ -51,8 +68,9 @@
<artifactId>hapi-fhir-structures-dstu</artifactId> <artifactId>hapi-fhir-structures-dstu</artifactId>
<version>${hapi_stable_version}</version> <version>${hapi_stable_version}</version>
</dependency>]]></source> </dependency>]]></source>
</subsection>
<subsection name="Supporting DSTU2 Resources - HAPI Structures">
<subsection name="DSTU2 Resources - HAPI Structures">
<p> <p>
HAPI also has a <code>hapi-fhir-structures-dstu2-[version].jar</code>, which HAPI also has a <code>hapi-fhir-structures-dstu2-[version].jar</code>, which
@ -76,11 +94,11 @@
</subsection> </subsection>
<subsection name="Using Reference Implementation Structures"> <subsection name="DSTU2 Resources - HL7.org Structures">
<p> <p>
To use the HL7.org reference implementation structures To use the HL7.org reference implementation structures
(see the <a href="./doc_upgrading.html">upgrading page</a> for more information), (see the <a href="./doc_dstu2.html">DSTU2 page</a> for more information),
use the following dependency. use the following dependency.
</p> </p>
<source><![CDATA[<dependency> <source><![CDATA[<dependency>
@ -143,12 +161,6 @@ compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:${hapi_stable_version}']]><
} }
}]]></source> }]]></source>
<p>
<b>Non Maven users</b> 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> </section>
<section name="Dependencies"> <section name="Dependencies">

View File

@ -10,9 +10,20 @@
<!-- The body of the document contains a number of sections --> <!-- The body of the document contains a number of sections -->
<section name="Welcome"> <section name="Welcome">
<p> <p style="float:right; text-align: center;">
SOCIALPLUGINSHEREFHIR <iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&amp;repo=hapi-fhir&amp;type=watch&amp;count=true&amp;v=2" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
<br/>
<iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&amp;repo=hapi-fhir&amp;type=star&amp;count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
<br/>
<iframe src="http://ghbtns.com/github-btn.html?user=jamesagnew&amp;repo=hapi-fhir&amp;type=fork&amp;count=true&amp;v=2" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
<br/>
<a href="https://travis-ci.org/jamesagnew/hapi-fhir"><img src="https://travis-ci.org/jamesagnew/hapi-fhir.svg?branch=master" alt="Build Status"/></a>
<br/>
<a href="https://coveralls.io/r/jamesagnew/hapi-fhir?branch=master"><img src="https://coveralls.io/repos/jamesagnew/hapi-fhir/badge.svg?branch=master" alt="Coverage Status"/></a>
<br/>
<a href="https://maven-badges.herokuapp.com/maven-central/ca.uhn.hapi.fhir/hapi-fhir-base/badge.svg"><img src="https://maven-badges.herokuapp.com/maven-central/ca.uhn.hapi.fhir/hapi-fhir-base/badge.svg" alt="Maven Central"/></a>
</p> </p>
<p> <p>
This is the homepage for the HAPI-FHIR library. We are developing This is the homepage for the HAPI-FHIR library. We are developing
an open-source implementation of the FHIR specification in Java. an open-source implementation of the FHIR specification in Java.