Code and site cleanup
This commit is contained in:
parent
9758f32021
commit
685fa6d164
|
@ -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>
|
||||
|
||||
<parent>
|
||||
|
@ -42,6 +43,19 @@
|
|||
</dependency>
|
||||
</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>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -18,14 +18,10 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>scm</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
<version>${maven_project_info_plugin_version}</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
<id>SITE</id>
|
||||
<reporting>
|
||||
<plugins>
|
||||
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
@ -192,9 +192,13 @@
|
|||
</reportSet>
|
||||
</reportSets>
|
||||
<configuration>
|
||||
<linkXRef>false</linkXRef>
|
||||
<sourceDirectories>
|
||||
<sourceDirectory>hapi-fhir-base/src/main/java</sourceDirectory>
|
||||
</sourceDirectories>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
-->
|
||||
<!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>3.0.0</version> <configuration> </configuration> </plugin> -->
|
||||
<plugin>
|
||||
|
|
|
@ -41,14 +41,15 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
|
|||
|
||||
public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IBase> theDatatype) {
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getChildNameByDatatype(Class<? extends IBase> theDatatype) {
|
||||
Class<?> nextType = theDatatype;
|
||||
while(nextType.equals(Object.class)==false) {
|
||||
while (nextType.equals(Object.class) == false) {
|
||||
if (myDatatype.equals(nextType)) {
|
||||
return getElementName();
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
|
|||
@Override
|
||||
public BaseRuntimeElementDefinition<?> getChildElementDefinitionByDatatype(Class<? extends IBase> theDatatype) {
|
||||
Class<?> nextType = theDatatype;
|
||||
while(nextType.equals(Object.class)==false) {
|
||||
while (nextType.equals(Object.class) == false) {
|
||||
if (myDatatype.equals(nextType)) {
|
||||
return myElementDefinition;
|
||||
}
|
||||
|
@ -102,11 +103,10 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
|
|||
}
|
||||
myCodeType = theType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + "[" + getElementName() + "]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public abstract class BaseRuntimeChildDefinition {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()+"[" + getElementName() + "]";
|
||||
return getClass().getSimpleName() + "[" + getElementName() + "]";
|
||||
}
|
||||
|
||||
public abstract BaseRuntimeElementDefinition<?> getChildByName(String theName);
|
||||
|
@ -52,11 +52,11 @@ public abstract class BaseRuntimeChildDefinition {
|
|||
}
|
||||
|
||||
public abstract String getElementName();
|
||||
|
||||
|
||||
public abstract int getMax();
|
||||
|
||||
|
||||
public abstract int getMin();
|
||||
|
||||
|
||||
public interface IMutator {
|
||||
void setValue(Object theTarget, IBase theValue);
|
||||
|
||||
|
@ -71,7 +71,7 @@ public abstract class BaseRuntimeChildDefinition {
|
|||
return null;
|
||||
}
|
||||
|
||||
// public String getExtensionUrl() {
|
||||
// return null;
|
||||
// }
|
||||
// public String getExtensionUrl() {
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IBase> ext
|
|||
super(theName, theImplementingClass, theStandardType);
|
||||
}
|
||||
|
||||
public void addChild(BaseRuntimeChildDefinition theNext) {
|
||||
void addChild(BaseRuntimeChildDefinition theNext) {
|
||||
if (theNext == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
|
|
@ -30,9 +30,6 @@ import java.util.Map;
|
|||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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> {
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ import ca.uhn.fhir.model.api.IResource;
|
|||
import ca.uhn.fhir.model.view.ViewGenerator;
|
||||
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
||||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
import ca.uhn.fhir.parser.IParserErrorHandler;
|
||||
import ca.uhn.fhir.parser.IParser;
|
||||
import ca.uhn.fhir.parser.IParserErrorHandler;
|
||||
import ca.uhn.fhir.parser.JsonParser;
|
||||
import ca.uhn.fhir.parser.LenientErrorHandler;
|
||||
import ca.uhn.fhir.parser.XmlParser;
|
||||
|
|
|
@ -48,21 +48,21 @@ import java.util.Set;
|
|||
import java.util.TreeMap;
|
||||
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.IBase;
|
||||
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
|
||||
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.IBaseEnumeration;
|
||||
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.IBaseDatatypeElement;
|
||||
import org.hl7.fhir.instance.model.api.ICompositeType;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
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.ExtensionDt;
|
||||
|
|
|
@ -20,7 +20,8 @@ package ca.uhn.fhir.context;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
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
|
||||
*/
|
||||
public class ProvidedResourceScanner {
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ModelScanner.class);
|
||||
private FhirContext myContext;
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ProvidedResourceScanner.class);
|
||||
private FhirContext myContext;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param theContext - context whose resource definition list is to be updated by the scanner
|
||||
*/
|
||||
public ProvidedResourceScanner(FhirContext theContext) {
|
||||
myContext = theContext;
|
||||
}
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param theContext
|
||||
* - context whose resource definition list is to be updated by the scanner
|
||||
*/
|
||||
public ProvidedResourceScanner(FhirContext theContext) {
|
||||
myContext = theContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* If {@code theProvider} is tagged with the {@code ProvidesResources} annotation, this method will add every resource listed
|
||||
* by the {@code resources} method.
|
||||
* <p>
|
||||
* Notes:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>if {@code theProvider} isn't annotated with {@code resources} nothing is done; it's expected that most 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>
|
||||
* </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}
|
||||
*/
|
||||
public void scanForProvidedResources(Object theProvider) {
|
||||
ProvidesResources annotation = theProvider.getClass().getAnnotation(ProvidesResources.class);
|
||||
if (annotation == null)
|
||||
return;
|
||||
for (Class clazz : annotation.resources()) {
|
||||
if (IResource.class.isAssignableFrom(clazz)) {
|
||||
myContext.getResourceDefinition(clazz);
|
||||
} else {
|
||||
ourLog.warn(clazz.getSimpleName() + "is not assignable from IResource");
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* If {@code theProvider} is tagged with the {@code ProvidesResources} annotation, this method will add every
|
||||
* resource listed by the {@code resources} method.
|
||||
* <p>
|
||||
* Notes:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>if {@code theProvider} isn't annotated with {@code resources} nothing is done; it's expected that most
|
||||
* 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>
|
||||
* </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}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void scanForProvidedResources(Object theProvider) {
|
||||
ProvidesResources annotation = theProvider.getClass().getAnnotation(ProvidesResources.class);
|
||||
if (annotation == null)
|
||||
return;
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
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 ca.uhn.fhir.model.api.IResource;
|
||||
|
|
|
@ -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.Description;
|
||||
import ca.uhn.fhir.model.base.composite.BaseContainedDt;
|
||||
|
||||
public class RuntimeChildDirectResource extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
|
|
|
@ -26,17 +26,14 @@ import java.util.Collections;
|
|||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBase;
|
||||
import org.hl7.fhir.instance.model.api.IBaseReference;
|
||||
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.Description;
|
||||
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
||||
|
||||
public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.ICompositeType;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
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.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IAnyResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
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.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IAnyResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
||||
|
|
|
@ -20,6 +20,10 @@ package ca.uhn.fhir.model.api;
|
|||
* #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.base.composite.BaseContainedDt;
|
||||
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.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
|
||||
* classes. Classes implementing this interface should be annotated
|
||||
|
|
|
@ -34,7 +34,6 @@ import ca.uhn.fhir.model.primitive.DecimalDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.param.QuantityParam;
|
||||
import ca.uhn.fhir.rest.param.StringParam;
|
||||
|
||||
public abstract class BaseQuantityDt extends BaseIdentifiableElement implements ICompositeDatatype, IQueryParameterType {
|
||||
|
||||
|
|
|
@ -20,11 +20,7 @@ package ca.uhn.fhir.model.primitive;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.DAY;
|
||||
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 static ca.uhn.fhir.model.api.TemporalPrecisionEnum.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
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.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
|
||||
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
|
||||
|
|
|
@ -32,7 +32,6 @@ import ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition;
|
|||
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
||||
import ca.uhn.fhir.model.api.BaseElement;
|
||||
import ca.uhn.fhir.model.api.ExtensionDt;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
|
||||
public class ViewGenerator {
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.narrative;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
|
|
@ -38,14 +38,14 @@ import java.util.Set;
|
|||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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.IBaseBundle;
|
||||
import org.hl7.fhir.instance.model.api.IBaseReference;
|
||||
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.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.BaseRuntimeDeclaredChildDefinition;
|
||||
|
|
|
@ -20,9 +20,7 @@ package ca.uhn.fhir.parser;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.defaultString;
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
|
@ -50,11 +48,8 @@ import javax.json.stream.JsonGeneratorFactory;
|
|||
import javax.json.stream.JsonParsingException;
|
||||
|
||||
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.IBase;
|
||||
import org.hl7.fhir.instance.model.api.IBaseBinary;
|
||||
import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype;
|
||||
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.IBaseHasModifierExtensions;
|
||||
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.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.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.BundleEntry;
|
||||
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.IPrimitiveDatatype;
|
||||
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.BaseContainedDt;
|
||||
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.IdDt;
|
||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
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.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.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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.List;
|
||||
|
|
|
@ -48,7 +48,6 @@ import ca.uhn.fhir.rest.server.Constants;
|
|||
import ca.uhn.fhir.rest.server.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.server.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
import ca.uhn.fhir.validation.FhirValidator;
|
||||
|
||||
/**
|
||||
* @author James Agnew
|
||||
|
|
|
@ -34,8 +34,6 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.servlet.ServletInputStream;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collection;
|
||||
|
|
|
@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.method;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.util.Map.Entry;
|
|||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
|
||||
import ca.uhn.fhir.context.ConfigurationException;
|
||||
import ca.uhn.fhir.rest.client.BaseHttpClientInvocation;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.param;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ package ca.uhn.fhir.rest.param;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
|
|
|
@ -20,8 +20,8 @@ package ca.uhn.fhir.rest.param;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static ca.uhn.fhir.rest.param.ParameterUtil.escape;
|
||||
import static org.apache.commons.lang3.StringUtils.defaultString;
|
||||
import static ca.uhn.fhir.rest.param.ParameterUtil.*;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
|
@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.param;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@ package ca.uhn.fhir.rest.param;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.param;
|
|||
* #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.builder.ToStringBuilder;
|
||||
|
|
|
@ -20,11 +20,11 @@ package ca.uhn.fhir.rest.server;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.util.ResourceReferenceInfo;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by Bill de Beaubien on 3/4/2015.
|
||||
*
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.List;
|
|||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.LinkedHashSet;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.cobertura.CoverageIgnore;
|
||||
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
|
||||
import ca.uhn.fhir.rest.api.RequestTypeEnum;
|
||||
import ca.uhn.fhir.rest.server.Constants;
|
||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server.interceptor;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -26,8 +26,6 @@ import javax.servlet.ServletException;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
|
|
|
@ -20,6 +20,8 @@ package ca.uhn.fhir.util;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBase;
|
||||
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.ISupportsUndeclaredExtensions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @see FhirTerser#visit(IBaseResource, IModelVisitor)
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
|
|||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
||||
/**
|
||||
* Created by Bill de Beaubien on 2/26/2015.
|
||||
|
|
|
@ -230,11 +230,8 @@
|
|||
<ignore>**/valueset/*.class</ignore>
|
||||
<ignore>**/exceptions/*.class</ignore>
|
||||
</excludes>
|
||||
<!--
|
||||
<ignoreMethodAnnotations>
|
||||
<ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation>
|
||||
</ignoreMethodAnnotations>
|
||||
-->
|
||||
<!-- <ignoreMethodAnnotations> <ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation>
|
||||
</ignoreMethodAnnotations> -->
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
@ -386,6 +383,28 @@
|
|||
</reportSet>
|
||||
</reportSets>
|
||||
</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>
|
||||
<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>
|
||||
</project>
|
||||
|
|
242
pom.xml
242
pom.xml
|
@ -54,10 +54,8 @@
|
|||
</dependencies>
|
||||
|
||||
<prerequisites>
|
||||
<!--
|
||||
TODO: the version number here should probably be
|
||||
either 3.2 or 3.3. Check and fix
|
||||
-->
|
||||
<!-- TODO: the version number here should probably be either 3.2 or 3.3.
|
||||
Check and fix -->
|
||||
<maven>3.0.1</maven>
|
||||
</prerequisites>
|
||||
|
||||
|
@ -162,15 +160,13 @@
|
|||
</licenses>
|
||||
|
||||
<properties>
|
||||
<!--
|
||||
This property is used in some of the site documentation where the version
|
||||
is shown, so that we can deploy the site even if the project is on a
|
||||
snapshot version.
|
||||
-->
|
||||
<!-- This property is used in some of the site documentation where the
|
||||
version is shown, so that we can deploy the site even if the project is on
|
||||
a snapshot version. -->
|
||||
<hapi_stable_version>1.0</hapi_stable_version>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
|
||||
<!-- For site-deploy -->
|
||||
<siteMainDirectory>${user.home}/sites/hapi-fhir</siteMainDirectory>
|
||||
<scmPubCheckoutDirectory>${user.home}/sites/scm/hapi-fhir</scmPubCheckoutDirectory>
|
||||
|
@ -184,14 +180,11 @@
|
|||
<derby_version>10.11.1.1</derby_version>
|
||||
<guava_version>18.0</guava_version>
|
||||
<hamcrest_version>2.0.0.0</hamcrest_version>
|
||||
<!--
|
||||
Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is too new for
|
||||
a number of platforms including JBoss EAP 6.x and Glassfish 3.0. Upgrade this
|
||||
version with caution! Also note that if you change this, you may get a failure
|
||||
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>
|
||||
-->
|
||||
<!-- Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is
|
||||
too new for a number of platforms including JBoss EAP 6.x and Glassfish 3.0.
|
||||
Upgrade this version with caution! Also note that if you change this, you
|
||||
may get a failure 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> -->
|
||||
<hibernate_version>4.2.17.Final</hibernate_version>
|
||||
<hibernate_validator_version>5.1.0.Final</hibernate_validator_version>
|
||||
<jetty_version>9.2.6.v20141205</jetty_version>
|
||||
|
@ -238,15 +231,15 @@
|
|||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<coberturaReports>
|
||||
</coberturaReports>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<coberturaReports>
|
||||
</coberturaReports>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
|
@ -280,7 +273,7 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven_surefire_plugin_version}</version>
|
||||
<configuration>
|
||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
<runOrder>random</runOrder>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
|
@ -344,12 +337,11 @@
|
|||
<artifactId>doxia-module-markdown</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
<!--
|
||||
-->
|
||||
<!-- -->
|
||||
<dependency>
|
||||
<groupId>lt.velykis.maven.skins</groupId>
|
||||
<artifactId>reflow-velocity-tools</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
|
@ -358,7 +350,8 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</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>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
|
@ -449,21 +442,21 @@
|
|||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>2.15</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>6.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>2.15</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>6.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
|
@ -498,29 +491,61 @@
|
|||
<configuration>
|
||||
<target>
|
||||
<copy todir="target/site/apidocs">
|
||||
<fileset dir="hapi-fhir-base/target/site/apidocs"/>
|
||||
<fileset dir="hapi-fhir-base/target/site/apidocs" />
|
||||
</copy>
|
||||
<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 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 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 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 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 todir="target/site/xref-base">
|
||||
<fileset dir="hapi-fhir-base/target/site/xref"/>
|
||||
<fileset dir="hapi-fhir-base/target/site/xref" />
|
||||
</copy>
|
||||
<copy todir="target/site/cobertura">
|
||||
<fileset dir="hapi-fhir-cobertura/target/site/cobertura"/>
|
||||
<fileset dir="hapi-fhir-cobertura/target/site/cobertura" />
|
||||
</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="<ul class="breadcrumb.*?</ul>" replace="" flags="s"/>-->
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -560,7 +585,7 @@
|
|||
</replace>
|
||||
<echo>Changing Breadcrumbs</echo>
|
||||
<replace dir="target/site" summary="true">
|
||||
<include name="doc_*.html"/>
|
||||
<include name="doc_*.html" />
|
||||
<replacetoken><![CDATA[<li class="divider">/</li>]]></replacetoken>
|
||||
<replacevalue><![CDATA[<li class="divider">/</li>
|
||||
<li><a href="docindex.html" title="Documentation">Documentation</a></li>
|
||||
|
@ -650,46 +675,6 @@
|
|||
</BODY >
|
||||
]]></replacevalue>
|
||||
</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>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
@ -754,23 +739,11 @@
|
|||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<reportSets>
|
||||
<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<reportSets> <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>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-changes-plugin</artifactId>
|
||||
|
@ -803,12 +776,12 @@
|
|||
</reportSet>
|
||||
</reportSets>
|
||||
<configuration>
|
||||
<reportsDirectories>
|
||||
<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-dstu2/target/surefire-reports/</reportDirectory>
|
||||
<reportDirectory>${project.basedir}/hapi-fhir-jpaserver-base/target/surefire-reports/</reportDirectory>
|
||||
</reportsDirectories>
|
||||
<reportsDirectories>
|
||||
<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-dstu2/target/surefire-reports/</reportDirectory>
|
||||
<reportDirectory>${project.basedir}/hapi-fhir-jpaserver-base/target/surefire-reports/</reportDirectory>
|
||||
</reportsDirectories>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -835,32 +808,21 @@
|
|||
<profiles>
|
||||
<profile>
|
||||
<id>ROOT</id>
|
||||
<reporting>
|
||||
<plugins>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<modules>
|
||||
</modules>
|
||||
<build>
|
||||
<plugins>
|
||||
<!--
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>${maven_assembly_plugin_version}</version>
|
||||
<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>
|
||||
-->
|
||||
<!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>${maven_assembly_plugin_version}</version>
|
||||
<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>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
<profile>
|
||||
<id>SIGN_ARTIFACTS</id>
|
||||
|
@ -927,7 +889,7 @@
|
|||
<modules>
|
||||
<module>hapi-deployable-pom</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-server</module>
|
||||
<module>hapi-tinder-plugin</module>
|
||||
|
|
|
@ -495,8 +495,8 @@
|
|||
<![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
|
||||
own JAR, in order to allow support for DEV resources, and DSTU2 resources when thast
|
||||
version is finalized. See
|
||||
<![CDATA[<a href="./doc_upgrading.html">upgrading</a>]]>
|
||||
version is finalized. See the
|
||||
<![CDATA[<a href="./doc_dstu2.html">DSTU2 page</a>]]>
|
||||
for more information.
|
||||
</action>
|
||||
<action type="fix">
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<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://"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<!--<module name="AvoidStarImport"/>-->
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
|
@ -54,13 +54,14 @@
|
|||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly">
|
||||
<property name="maxLineLength" value="200"/>
|
||||
<property name="maxLineLength" value="300"/>
|
||||
</module>
|
||||
<module name="RightCurly"/>
|
||||
<module name="RightCurly">
|
||||
<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"/>
|
||||
</module>
|
||||
<!--
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
|
@ -71,6 +72,7 @@
|
|||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
-->
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
|
@ -110,8 +112,7 @@
|
|||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<property name="allowOneCharVarInForLoop" value="true"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
@ -175,12 +176,13 @@
|
|||
<module name="SummaryJavadocCheck">
|
||||
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="JavadocParagraph"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<!--
|
||||
<module name="JavadocMethod">
|
||||
<module name="JavadocParagraph"/>
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingThrowsTags" value="true"/>
|
||||
|
@ -189,6 +191,7 @@
|
|||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
||||
</module>
|
||||
-->
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -86,8 +86,13 @@ A.pagenavlinks {
|
|||
}
|
||||
*/
|
||||
|
||||
body {
|
||||
@media (min-width: 980px) { /* 768 980 */
|
||||
body {
|
||||
padding-top: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
|
@ -101,6 +106,7 @@ pre {
|
|||
.page-header {
|
||||
padding-bottom: 2px;
|
||||
margin: 0px 0 0px;
|
||||
border-bottom: none;
|
||||
}
|
||||
h1[id]:before,
|
||||
h2[id]:before,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd"
|
||||
name="HAPI">
|
||||
|
||||
<!--
|
||||
<bannerLeft>
|
||||
<name>HAPI</name>
|
||||
<src>images/hapi_fhir_banner.png</src>
|
||||
|
@ -16,6 +17,7 @@
|
|||
<src>images/hapi_fhir_banner_right.png</src>
|
||||
<href>http://jamesagnew.github.io/hapi-fhir/</href>
|
||||
</bannerRight>
|
||||
-->
|
||||
|
||||
<poweredBy>
|
||||
<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" >
|
||||
<item name="Documentation Index" href="./docindex.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="Working with Resources" href="./doc_fhirobjects.html" />
|
||||
<item name="Resource References" href="./doc_resource_references.html" />
|
||||
|
@ -137,8 +139,10 @@
|
|||
|
||||
<menu name="Maven Reports" inherit="bottom">
|
||||
<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="Checkstyle" href="checkstyle.html" />
|
||||
</menu>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -17,12 +17,21 @@
|
|||
<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
|
||||
end up in the final DSTU2 specification which is expected to be released
|
||||
in mid-2015.
|
||||
in mid-to-late-2015.
|
||||
</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>
|
||||
<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>
|
||||
New
|
||||
<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)
|
||||
</li>
|
||||
<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 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.
|
||||
Numerous changes to the model, including attribute changes to existing resources,
|
||||
the addition of a number of new resources, and the removal of a few redundant ones
|
||||
as well.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -135,6 +126,105 @@
|
|||
|
||||
</section>
|
||||
|
||||
<section name="HL7.org "Reference Implementation" 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>
|
||||
|
||||
</document>
|
||||
|
|
|
@ -21,6 +21,21 @@
|
|||
<a href="https://github.com/jamesagnew/hapi-fhir/releases">GitHub Release Section</a>.
|
||||
</p>
|
||||
|
||||
<subsection name="Note on "snapshot" (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 name="Maven Users">
|
||||
|
@ -30,18 +45,20 @@
|
|||
The structures JAR contains classes with the resource and datatype definitions for a given
|
||||
version of FHIR.
|
||||
</p>
|
||||
<p>
|
||||
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>.
|
||||
Note that the ballot process for the next release (DSTU2) has not yet been
|
||||
completed, but many users are already targeting it for new development as it
|
||||
is likely to be approved without significant changes.
|
||||
</p>
|
||||
<p>
|
||||
If you use Maven, you can include these JARs with the following dependency tags
|
||||
to enable DSTU1 support:
|
||||
</p>
|
||||
<source><![CDATA[<dependency>
|
||||
|
||||
<subsection name="DSTU1 Resources - HAPI Structures">
|
||||
<p>
|
||||
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>.
|
||||
Note that the ballot process for the next release (DSTU2) has not yet been
|
||||
completed, but many users are already targeting it for new development as it
|
||||
is likely to be approved without significant changes.
|
||||
</p>
|
||||
<p>
|
||||
If you use Maven, you can include these JARs with the following dependency tags
|
||||
to enable DSTU1 support:
|
||||
</p>
|
||||
<source><![CDATA[<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${hapi_stable_version}</version>
|
||||
|
@ -51,8 +68,9 @@
|
|||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<version>${hapi_stable_version}</version>
|
||||
</dependency>]]></source>
|
||||
|
||||
<subsection name="Supporting DSTU2 Resources - HAPI Structures">
|
||||
</subsection>
|
||||
|
||||
<subsection name="DSTU2 Resources - HAPI Structures">
|
||||
|
||||
<p>
|
||||
HAPI also has a <code>hapi-fhir-structures-dstu2-[version].jar</code>, which
|
||||
|
@ -76,11 +94,11 @@
|
|||
|
||||
</subsection>
|
||||
|
||||
<subsection name="Using Reference Implementation Structures">
|
||||
<subsection name="DSTU2 Resources - HL7.org Structures">
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<source><![CDATA[<dependency>
|
||||
|
@ -143,12 +161,6 @@ compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:${hapi_stable_version}']]><
|
|||
}
|
||||
}]]></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 name="Dependencies">
|
||||
|
|
|
@ -10,9 +10,20 @@
|
|||
|
||||
<!-- The body of the document contains a number of sections -->
|
||||
<section name="Welcome">
|
||||
<p>
|
||||
SOCIALPLUGINSHEREFHIR
|
||||
<p style="float:right; text-align: center;">
|
||||
<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>
|
||||
<br/>
|
||||
<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>
|
||||
<br/>
|
||||
<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>
|
||||
<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>
|
||||
This is the homepage for the HAPI-FHIR library. We are developing
|
||||
an open-source implementation of the FHIR specification in Java.
|
||||
|
|
Loading…
Reference in New Issue