Merge branch 'master' of https://github.com/jamesagnew/hapi-fhir.git
This commit is contained in:
commit
e576d5ba8f
|
@ -1,106 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" path="src/test/resources"/>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="src" path="src/site/example/java"/>
|
||||
<classpathentry kind="var" path="M2_REPO/javax/json/javax.json-api/1.0/javax.json-api-1.0.jar" sourcepath="M2_REPO/javax/json/javax.json-api/1.0/javax.json-api-1.0-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1-sources.jar">
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1-javadoc.jar!/"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9-sources.jar">
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9-javadoc.jar!/"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar">
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-javadoc.jar!/"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" sourcepath="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" sourcepath="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4-sources.jar">
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4-javadoc.jar!/"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1.jar" sourcepath="M2_REPO/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-sources.jar">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-javadoc.jar!/"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar" sourcepath="M2_REPO/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3-sources.jar">
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3-javadoc.jar!/"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/javassist/javassist/3.16.1-GA/javassist-3.16.1-GA.jar" sourcepath="M2_REPO/org/javassist/javassist/3.16.1-GA/javassist-3.16.1-GA-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar" sourcepath="M2_REPO/org/glassfish/javax.json/1.0.4/javax.json-1.0.4-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-continuation/9.1.1.v20140108/jetty-continuation-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-continuation/9.1.1.v20140108/jetty-continuation-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-http/9.1.1.v20140108/jetty-http-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-http/9.1.1.v20140108/jetty-http-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-io/9.1.1.v20140108/jetty-io-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-io/9.1.1.v20140108/jetty-io-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-security/9.1.1.v20140108/jetty-security-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-security/9.1.1.v20140108/jetty-security-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-server/9.1.1.v20140108/jetty-server-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-server/9.1.1.v20140108/jetty-server-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlet/9.1.1.v20140108/jetty-servlet-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlet/9.1.1.v20140108/jetty-servlet-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlets/9.1.1.v20140108/jetty-servlets-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlets/9.1.1.v20140108/jetty-servlets-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/9.1.1.v20140108/jetty-util-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-util/9.1.1.v20140108/jetty-util-9.1.1.v20140108-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar" sourcepath="M2_REPO/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar" sourcepath="M2_REPO/junit/junit/4.11/junit-4.11-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/junit/junit/4.11/junit-4.11-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1.jar" sourcepath="M2_REPO/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-core/1.1.1/logback-core-1.1.1.jar" sourcepath="M2_REPO/ch/qos/logback/logback-core/1.1.1/logback-core-1.1.1-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/ch/qos/logback/logback-core/1.1.1/logback-core-1.1.1-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar" sourcepath="M2_REPO/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/directory-naming/naming-core/0.8/naming-core-0.8.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/directory-naming/naming-java/0.8/naming-java-0.8.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/ognl/ognl/3.0.6/ognl-3.0.6.jar" sourcepath="M2_REPO/ognl/ognl/3.0.6/ognl-3.0.6-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar" sourcepath="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/thymeleaf/thymeleaf/2.1.2.RELEASE/thymeleaf-2.1.2.RELEASE.jar" sourcepath="/M2_REPO/org/thymeleaf/thymeleaf/2.1.2.RELEASE/thymeleaf-2.1.2.RELEASE-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/xmlunit/xmlunit/1.5/xmlunit-1.5.jar" sourcepath="M2_REPO/xmlunit/xmlunit/1.5/xmlunit-1.5-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/xmlunit/xmlunit/1.5/xmlunit-1.5-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0.jar" sourcepath="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0-sources.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,13 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>hapi-fhir-base</name>
|
||||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
|
||||
<projects/>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<name>hapi-fhir-base</name>
|
||||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
|
|
@ -1,379 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=120
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=280
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=true
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
|
@ -18,9 +18,12 @@
|
|||
|
||||
<distributionManagement>
|
||||
<site>
|
||||
<id>hl7api.sf.net</id>
|
||||
<url>scp://shell.sourceforge.net/home/project-web/hl7api/htdocs/hapi-fhir</url>
|
||||
<id>git.server</id>
|
||||
<url>scm:git:ssh://git@github.com:jamesagnew/hapi-fhir.git</url>
|
||||
</site>
|
||||
|
||||
<!-- <site> <id>hl7api.sf.net</id> <url>scp://shell.sourceforge.net/home/project-web/hl7api/htdocs/hapi-fhir</url>
|
||||
</site> -->
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
|
@ -52,7 +55,7 @@
|
|||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf</artifactId>
|
||||
<version>2.1.2.RELEASE</version>
|
||||
<version>2.1.3.RELEASE</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
@ -286,11 +289,8 @@
|
|||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-linkcheck-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
</plugin>
|
||||
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-linkcheck-plugin</artifactId>
|
||||
<version>1.1</version> </plugin> -->
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
|
@ -307,6 +307,28 @@
|
|||
<skip>false</skip>
|
||||
<skipDeploy>false</skipDeploy>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-scm</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-manager-plexus</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-api</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
@ -447,6 +469,12 @@
|
|||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<!-- <extensions> <extension> <groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-scm</artifactId> <version>2.6</version> </extension> <extension>
|
||||
<groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-manager-plexus</artifactId>
|
||||
<version>1.9</version> </extension> <extension> <groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-provider-gitexe</artifactId> <version>1.9</version>
|
||||
</extension> </extensions> -->
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
<release version="0.3" date="2014-May-12" description="This release corrects lots of bugs and introduces the fluent client mode">
|
||||
</release>
|
||||
<release version="0.4" date="TBD">
|
||||
<action type="add">
|
||||
<![CDATA[<b>BREAKING CHANGE:</b>]]>: IdDt has been modified so that it
|
||||
contains a partial or complete resource identity. Previously it contained
|
||||
only the simple alphanumeric id of the resource (the part at the end of the "read" URL for
|
||||
that resource) but it can now contain a complete URL or even a partial URL (e.g. "Patient/123")
|
||||
and can optionally contain a version (e.g. "Patient/123/_history/456"). New methods have
|
||||
been added to this datatype which provide just the numeric portion. See the JavaDoc
|
||||
for more information.
|
||||
</action>
|
||||
<action type="add">
|
||||
Allow use of QuantityDt as a service parameter to support the "quantity" type. Previously
|
||||
QuantityDt did not implement IQueryParameterType so it was not valid, and there was no way to
|
||||
|
@ -36,6 +45,17 @@
|
|||
of the root resource, and the parser looks in the root resource for all container levels when stitching
|
||||
contained resources back together.
|
||||
</action>
|
||||
<action type="fix">
|
||||
Server methods with @Include parameter would sometimes fail when no _include was actually
|
||||
specified in query strings.
|
||||
</action>
|
||||
<action type="fix">
|
||||
Client requests for IdentifierDt types (such as Patient.identifier) did not create the correct
|
||||
query string if the system is null.
|
||||
</action>
|
||||
<action type="add">
|
||||
Add support for paging responses from RESTful servers.
|
||||
</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
|
@ -70,6 +71,7 @@ public class FhirContext {
|
|||
* Default constructor. In most cases this is the right constructor to use.
|
||||
*/
|
||||
public FhirContext() {
|
||||
super();
|
||||
}
|
||||
|
||||
public FhirContext(Class<? extends IResource> theResourceType) {
|
||||
|
@ -122,13 +124,24 @@ public class FhirContext {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public RuntimeResourceDefinition getResourceDefinition(String theResourceName) {
|
||||
Validate.notBlank(theResourceName, "Resource name must not be blank");
|
||||
String resourceName = theResourceName;
|
||||
|
||||
/*
|
||||
* TODO: this is a bit of a hack, really we should have a translation table
|
||||
* based on a property file or something so that we can detect names like
|
||||
* diagnosticreport
|
||||
*/
|
||||
if (Character.isLowerCase(resourceName.charAt(0))) {
|
||||
resourceName = WordUtils.capitalize(resourceName);
|
||||
}
|
||||
|
||||
Validate.notBlank(resourceName, "Resource name must not be blank");
|
||||
|
||||
RuntimeResourceDefinition retVal = myNameToElementDefinition.get(theResourceName);
|
||||
RuntimeResourceDefinition retVal = myNameToElementDefinition.get(resourceName);
|
||||
|
||||
if (retVal == null) {
|
||||
try {
|
||||
String candidateName = Patient.class.getPackage().getName() + "." + theResourceName;
|
||||
String candidateName = Patient.class.getPackage().getName() + "." + resourceName;
|
||||
Class<?> clazz = Class.forName(candidateName);
|
||||
if (IResource.class.isAssignableFrom(clazz)) {
|
||||
retVal = scanResourceType((Class<? extends IResource>) clazz);
|
||||
|
|
|
@ -39,7 +39,7 @@ public abstract class BaseResource extends BaseElement implements IResource {
|
|||
@Child(name = "language", order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
private CodeDt myLanguage;
|
||||
|
||||
private Map<ResourceMetadataKeyEnum, Object> myResourceMetadata;
|
||||
private Map<ResourceMetadataKeyEnum<?>, Object> myResourceMetadata;
|
||||
|
||||
@Child(name = "text", order = 1, min = 0, max = 1)
|
||||
private NarrativeDt myText;
|
||||
|
@ -57,9 +57,9 @@ public abstract class BaseResource extends BaseElement implements IResource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<ResourceMetadataKeyEnum, Object> getResourceMetadata() {
|
||||
public Map<ResourceMetadataKeyEnum<?>, Object> getResourceMetadata() {
|
||||
if (myResourceMetadata == null) {
|
||||
myResourceMetadata = new HashMap<ResourceMetadataKeyEnum, Object>();
|
||||
myResourceMetadata = new HashMap<ResourceMetadataKeyEnum<?>, Object>();
|
||||
}
|
||||
return myResourceMetadata;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public abstract class BaseResource extends BaseElement implements IResource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setResourceMetadata(Map<ResourceMetadataKeyEnum, Object> theMap) {
|
||||
public void setResourceMetadata(Map<ResourceMetadataKeyEnum<?>, Object> theMap) {
|
||||
Validate.notNull(theMap, "The Map must not be null");
|
||||
myResourceMetadata = theMap;
|
||||
}
|
||||
|
|
|
@ -54,31 +54,13 @@ public abstract class BaseResourceReference extends BaseElement {
|
|||
*/
|
||||
public BaseResourceReference(IResource theResource) {
|
||||
myResource = theResource;
|
||||
setResourceId(theResource.getId());
|
||||
setReference(theResource.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference). creating it if it does not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute
|
||||
* URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be
|
||||
* version specific. Internal fragment references (start with '#') refer to contained resources
|
||||
* </p>
|
||||
*/
|
||||
public abstract IdDt getResourceId();
|
||||
|
||||
/**
|
||||
* Sets the resource ID
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute
|
||||
* URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be
|
||||
* version specific. Internal fragment references (start with '#') refer to contained resources
|
||||
* </p>
|
||||
*/
|
||||
public abstract void setResourceId(IdDt theResourceId);
|
||||
|
||||
public abstract BaseResourceReference setReference(IdDt theReference);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the actual loaded and parsed resource instance, <b>if it is already present</b>. This
|
||||
* method will return the resource instance only if it has previously been loaded using
|
||||
|
@ -107,7 +89,7 @@ public abstract class BaseResourceReference extends BaseElement {
|
|||
return myResource;
|
||||
}
|
||||
|
||||
IdDt resourceId = getResourceId();
|
||||
IdDt resourceId = getReference();
|
||||
if (resourceId == null) {
|
||||
throw new IllegalStateException("Reference has no resource ID defined");
|
||||
}
|
||||
|
@ -141,6 +123,8 @@ public abstract class BaseResourceReference extends BaseElement {
|
|||
return myResource;
|
||||
}
|
||||
|
||||
protected abstract IdDt getReference();
|
||||
|
||||
public void setResource(IResource theResource) {
|
||||
myResource = theResource;
|
||||
}
|
||||
|
|
|
@ -238,16 +238,16 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
}
|
||||
b.append(def.getName());
|
||||
b.append('/');
|
||||
String resId = theResource.getId().getUnqualifiedId();
|
||||
String resId = theResource.getId().getIdPart();
|
||||
b.append(resId);
|
||||
|
||||
entry.getId().setValue(b.toString());
|
||||
|
||||
if (isNotBlank(theResource.getId().getUnqualifiedVersionId())) {
|
||||
if (isNotBlank(theResource.getId().getVersionIdPart())) {
|
||||
b.append('/');
|
||||
b.append(Constants.PARAM_HISTORY);
|
||||
b.append('/');
|
||||
b.append(theResource.getId().getUnqualifiedVersionId());
|
||||
b.append(theResource.getId().getVersionIdPart());
|
||||
} else {
|
||||
IdDt versionId = (IdDt) ResourceMetadataKeyEnum.VERSION_ID.get(theResource);
|
||||
if (versionId != null) {
|
||||
|
@ -261,29 +261,29 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
entry.getLinkSelf().setValue(b.toString());
|
||||
}
|
||||
|
||||
InstantDt published = (InstantDt) ResourceMetadataKeyEnum.PUBLISHED.get(theResource);
|
||||
InstantDt published = ResourceMetadataKeyEnum.PUBLISHED.get(theResource);
|
||||
if (published == null) {
|
||||
entry.getPublished().setToCurrentTimeInLocalTimeZone();
|
||||
} else {
|
||||
entry.setPublished(published);
|
||||
}
|
||||
|
||||
InstantDt updated = (InstantDt) ResourceMetadataKeyEnum.UPDATED.get(theResource);
|
||||
InstantDt updated = ResourceMetadataKeyEnum.UPDATED.get(theResource);
|
||||
if (updated != null) {
|
||||
entry.setUpdated(updated);
|
||||
}
|
||||
|
||||
InstantDt deleted = (InstantDt) ResourceMetadataKeyEnum.DELETED_AT.get(theResource);
|
||||
InstantDt deleted = ResourceMetadataKeyEnum.DELETED_AT.get(theResource);
|
||||
if (deleted != null) {
|
||||
entry.setDeleted(deleted);
|
||||
}
|
||||
|
||||
IdDt previous = (IdDt) ResourceMetadataKeyEnum.PREVIOUS_ID.get(theResource);
|
||||
IdDt previous = ResourceMetadataKeyEnum.PREVIOUS_ID.get(theResource);
|
||||
if (previous != null) {
|
||||
entry.getLinkAlternate().setValue(previous.toQualifiedUrl(theServerBase, def.getName()));
|
||||
entry.getLinkAlternate().setValue(previous.withServerBase(theServerBase, def.getName()));
|
||||
}
|
||||
|
||||
TagList tagList = (TagList) ResourceMetadataKeyEnum.TAG_LIST.get(theResource);
|
||||
TagList tagList = ResourceMetadataKeyEnum.TAG_LIST.get(theResource);
|
||||
if (tagList != null) {
|
||||
for (Tag nextTag : tagList) {
|
||||
entry.addCategory(nextTag);
|
||||
|
@ -300,4 +300,8 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
return retVal;
|
||||
}
|
||||
|
||||
public void setPublished(InstantDt thePublished) {
|
||||
myPublished = thePublished;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public interface IResource extends ICompositeElement {
|
|||
* @see ResourceMetadataKeyEnum for a list of allowable keys and the object
|
||||
* types that values of a given key must use.
|
||||
*/
|
||||
Map<ResourceMetadataKeyEnum, Object> getResourceMetadata();
|
||||
Map<ResourceMetadataKeyEnum<?>, Object> getResourceMetadata();
|
||||
|
||||
/**
|
||||
* Sets the metadata map for this object. Metadata entries are used to
|
||||
|
@ -71,6 +71,6 @@ public interface IResource extends ICompositeElement {
|
|||
* @throws NullPointerException
|
||||
* The map must not be null
|
||||
*/
|
||||
void setResourceMetadata(Map<ResourceMetadataKeyEnum, Object> theMap);
|
||||
void setResourceMetadata(Map<ResourceMetadataKeyEnum<?>, Object> theMap);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package ca.uhn.fhir.model.api;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR Library
|
||||
* %%
|
||||
* Copyright (C) 2014 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents a FHIR resource path specification, e.g.
|
||||
* <code>Patient.gender.coding</code>
|
||||
* <p>
|
||||
* Note on equality: This class uses the {@link Include#setValue(String) value}
|
||||
* as the single item used to provide {@link #hashCode()} and {@link #equals(Object)}.
|
||||
* </p>
|
||||
*/
|
||||
public class Include {
|
||||
|
||||
private String myValue;
|
||||
|
||||
public Include(String theValue) {
|
||||
myValue = theValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if ((obj instanceof Include)==false)
|
||||
return false;
|
||||
Include other = (Include) obj;
|
||||
if (myValue == null) {
|
||||
if (other.myValue != null)
|
||||
return false;
|
||||
} else if (!myValue.equals(other.myValue))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((myValue == null) ? 0 : myValue.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setValue(String theValue) {
|
||||
myValue = theValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringBuilder builder = new ToStringBuilder(this);
|
||||
builder.append("myValue", myValue);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -20,7 +20,6 @@ package ca.uhn.fhir.model.api;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* Represents a FHIR resource path specification, e.g.
|
||||
|
@ -29,53 +28,14 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||
* Note on equality: This class uses the {@link PathSpecification#setValue(String) value}
|
||||
* as the single item used to provide {@link #hashCode()} and {@link #equals(Object)}.
|
||||
* </p>
|
||||
*
|
||||
* @deprecated {@link Include} should be used instead
|
||||
*/
|
||||
public class PathSpecification {
|
||||
public class PathSpecification extends Include {
|
||||
|
||||
private String myValue;
|
||||
|
||||
public PathSpecification(String theValue) {
|
||||
myValue = theValue;
|
||||
public PathSpecification(String theInclude) {
|
||||
super(theInclude);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
PathSpecification other = (PathSpecification) obj;
|
||||
if (myValue == null) {
|
||||
if (other.myValue != null)
|
||||
return false;
|
||||
} else if (!myValue.equals(other.myValue))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((myValue == null) ? 0 : myValue.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setValue(String theValue) {
|
||||
myValue = theValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringBuilder builder = new ToStringBuilder(this);
|
||||
builder.append("myValue", myValue);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import ca.uhn.fhir.model.primitive.IdDt;
|
|||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
|
||||
public enum ResourceMetadataKeyEnum {
|
||||
public abstract class ResourceMetadataKeyEnum<T> {
|
||||
|
||||
|
||||
/**
|
||||
|
@ -41,18 +41,17 @@ public enum ResourceMetadataKeyEnum {
|
|||
* Values for this key are of type <b>{@link InstantDt}</b>
|
||||
* </p>
|
||||
*/
|
||||
DELETED_AT {
|
||||
public static final ResourceMetadataKeyEnum<InstantDt> DELETED_AT = new ResourceMetadataKeyEnum<InstantDt>("DELETED_AT") {
|
||||
@Override
|
||||
public InstantDt get(IResource theResource) {
|
||||
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), DELETED_AT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
InstantDt obj = (InstantDt) theObject;
|
||||
theResource.getResourceMetadata().put(DELETED_AT, obj);
|
||||
public void put(IResource theResource, InstantDt theObject) {
|
||||
theResource.getResourceMetadata().put(DELETED_AT, theObject);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* The value for this key represents a previous ID used to identify
|
||||
|
@ -62,18 +61,17 @@ public enum ResourceMetadataKeyEnum {
|
|||
* Values for this key are of type <b>{@link IdDt}</b>
|
||||
* </p>
|
||||
*/
|
||||
PREVIOUS_ID {
|
||||
public static final ResourceMetadataKeyEnum<IdDt> PREVIOUS_ID = new ResourceMetadataKeyEnum<IdDt>("PREVIOUS_ID") {
|
||||
@Override
|
||||
public IdDt get(IResource theResource) {
|
||||
return getIdFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PREVIOUS_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
IdDt obj = (IdDt) theObject;
|
||||
theResource.getResourceMetadata().put(PREVIOUS_ID, obj);
|
||||
public void put(IResource theResource, IdDt theObject) {
|
||||
theResource.getResourceMetadata().put(PREVIOUS_ID, theObject);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* The value for this key is the bundle entry <b>Published</b> time. This is
|
||||
|
@ -90,19 +88,18 @@ public enum ResourceMetadataKeyEnum {
|
|||
*
|
||||
* @see InstantDt
|
||||
*/
|
||||
PUBLISHED {
|
||||
public static final ResourceMetadataKeyEnum<InstantDt> PUBLISHED = new ResourceMetadataKeyEnum<InstantDt>("PUBLISHED") {
|
||||
@Override
|
||||
public InstantDt get(IResource theResource) {
|
||||
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PUBLISHED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
InstantDt obj = (InstantDt) theObject;
|
||||
theResource.getResourceMetadata().put(PUBLISHED, obj);
|
||||
public void put(IResource theResource, InstantDt theObject) {
|
||||
theResource.getResourceMetadata().put(PUBLISHED, theObject);
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The value for this key is the list of tags associated with this resource
|
||||
|
@ -112,7 +109,7 @@ public enum ResourceMetadataKeyEnum {
|
|||
*
|
||||
* @see TagList
|
||||
*/
|
||||
TAG_LIST {
|
||||
public static final ResourceMetadataKeyEnum<TagList> TAG_LIST = new ResourceMetadataKeyEnum<TagList>("TAG_LIST") {
|
||||
@Override
|
||||
public TagList get(IResource theResource) {
|
||||
Object retValObj = theResource.getResourceMetadata().get(TAG_LIST);
|
||||
|
@ -129,11 +126,10 @@ public enum ResourceMetadataKeyEnum {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
TagList obj = (TagList) theObject;
|
||||
theResource.getResourceMetadata().put(TAG_LIST, obj);
|
||||
public void put(IResource theResource, TagList theObject) {
|
||||
theResource.getResourceMetadata().put(TAG_LIST, theObject);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -147,18 +143,17 @@ public enum ResourceMetadataKeyEnum {
|
|||
*
|
||||
* @see InstantDt
|
||||
*/
|
||||
UPDATED {
|
||||
public static final ResourceMetadataKeyEnum<InstantDt> UPDATED = new ResourceMetadataKeyEnum<InstantDt>("UPDATED") {
|
||||
@Override
|
||||
public InstantDt get(IResource theResource) {
|
||||
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), UPDATED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
InstantDt obj = (InstantDt) theObject;
|
||||
theResource.getResourceMetadata().put(UPDATED, obj);
|
||||
public void put(IResource theResource, InstantDt theObject) {
|
||||
theResource.getResourceMetadata().put(UPDATED, theObject);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* The value for this key is the version ID of the resource object.
|
||||
|
@ -169,22 +164,52 @@ public enum ResourceMetadataKeyEnum {
|
|||
* @deprecated The {@link IResource#getId()} resource ID will now be populated with the version ID via the {@link IdDt#getUnqualifiedVersionId()} method
|
||||
*/
|
||||
@Deprecated
|
||||
VERSION_ID {
|
||||
public static final ResourceMetadataKeyEnum<IdDt> VERSION_ID = new ResourceMetadataKeyEnum<IdDt>("VERSION_ID") {
|
||||
@Override
|
||||
public IdDt get(IResource theResource) {
|
||||
return getIdFromMetadataOrNullIfNone(theResource.getResourceMetadata(), VERSION_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(IResource theResource, Object theObject) {
|
||||
IdDt obj = (IdDt) theObject;
|
||||
theResource.getResourceMetadata().put(VERSION_ID, obj);
|
||||
public void put(IResource theResource, IdDt theObject) {
|
||||
theResource.getResourceMetadata().put(VERSION_ID, theObject);
|
||||
}
|
||||
};
|
||||
|
||||
public abstract Object get(IResource theResource);
|
||||
private final String myValue;
|
||||
|
||||
private static IdDt getIdFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum, Object> theResourceMetadata, ResourceMetadataKeyEnum theKey) {
|
||||
|
||||
|
||||
public ResourceMetadataKeyEnum(String theValue) {
|
||||
myValue = theValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((myValue == null) ? 0 : myValue.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ResourceMetadataKeyEnum<?> other = (ResourceMetadataKeyEnum<?>) obj;
|
||||
if (myValue == null) {
|
||||
if (other.myValue != null)
|
||||
return false;
|
||||
} else if (!myValue.equals(other.myValue))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static IdDt getIdFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<?> theKey) {
|
||||
Object retValObj = theResourceMetadata.get(theKey);
|
||||
if (retValObj == null) {
|
||||
return null;
|
||||
|
@ -206,7 +231,11 @@ public enum ResourceMetadataKeyEnum {
|
|||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
|
||||
}
|
||||
|
||||
private static InstantDt getInstantFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum, Object> theResourceMetadata, ResourceMetadataKeyEnum theKey) {
|
||||
private String name() {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
private static InstantDt getInstantFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<InstantDt> theKey) {
|
||||
Object retValObj = theResourceMetadata.get(theKey);
|
||||
if (retValObj == null) {
|
||||
return null;
|
||||
|
@ -222,6 +251,8 @@ public enum ResourceMetadataKeyEnum {
|
|||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + InstantDt.class.getCanonicalName());
|
||||
}
|
||||
|
||||
public abstract void put(IResource theResource, Object theObject);
|
||||
|
||||
public abstract T get(IResource theResource);
|
||||
|
||||
public abstract void put(IResource theResource, T theObject);
|
||||
|
||||
}
|
||||
|
|
|
@ -47,21 +47,23 @@ public class Tag extends BaseElement implements IElement {
|
|||
}
|
||||
|
||||
public Tag(String theTerm) {
|
||||
this(theTerm, null, (String) null);
|
||||
this((String)null, theTerm, null);
|
||||
}
|
||||
|
||||
public Tag(String theTerm, String theLabel, String theScheme) {
|
||||
public Tag(String theScheme, String theTerm, String theLabel) {
|
||||
myTerm = theTerm;
|
||||
myLabel = theLabel;
|
||||
myScheme = theScheme;
|
||||
}
|
||||
|
||||
public Tag(String theTerm, String theLabel, URI theScheme) {
|
||||
myTerm = theTerm;
|
||||
myLabel = theLabel;
|
||||
public Tag(URI theScheme, URI theTerm, String theLabel) {
|
||||
if (theScheme != null) {
|
||||
myScheme = theScheme.toASCIIString();
|
||||
}
|
||||
if (theTerm != null) {
|
||||
myTerm = theTerm.toASCIIString();
|
||||
}
|
||||
myLabel = theLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -147,10 +149,10 @@ public class Tag extends BaseElement implements IElement {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE);
|
||||
ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
|
||||
b.append("Scheme", myScheme);
|
||||
b.append("Term", myTerm);
|
||||
b.append("Label", myLabel);
|
||||
b.append("Scheme", myScheme);
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class TagList extends ArrayList<Tag> {
|
|||
public static final String ELEMENT_NAME_LC = ELEMENT_NAME.toLowerCase();
|
||||
|
||||
public Tag addTag(String theScheme, String theTerm, String theLabel) {
|
||||
Tag retVal = new Tag(theTerm, theLabel, theScheme);
|
||||
Tag retVal = new Tag(theScheme, theTerm, theLabel);
|
||||
add(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -415,7 +415,7 @@ public class IdentifierDt
|
|||
if (org.apache.commons.lang3.StringUtils.isNotBlank(getSystem().getValueAsString())) {
|
||||
return getSystem().getValueAsString() + '|' + getValue().getValueAsString();
|
||||
} else {
|
||||
return getValue().getValueAsString();
|
||||
return '|' + getValue().getValueAsString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
package ca.uhn.fhir.model.dstu.composite;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR Library
|
||||
* %%
|
||||
* Copyright (C) 2014 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package ca.uhn.fhir.model.dstu.composite;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -33,19 +29,22 @@ import ca.uhn.fhir.model.primitive.IdDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
|
||||
/**
|
||||
* HAPI/FHIR <b>ResourceReferenceDt</b> Datatype (A reference from one resource to another)
|
||||
*
|
||||
* HAPI/FHIR <b>ResourceReferenceDt</b> Datatype
|
||||
* (A reference from one resource to another)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference from one resource to another
|
||||
* </p>
|
||||
*
|
||||
* <b>Definition:</b>
|
||||
* A reference from one resource to another
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Requirements:</b>
|
||||
*
|
||||
* </p>
|
||||
* </p>
|
||||
*/
|
||||
@DatatypeDef(name = "ResourceReferenceDt")
|
||||
public class ResourceReferenceDt extends BaseResourceReference implements ICompositeDatatype {
|
||||
@DatatypeDef(name="ResourceReferenceDt")
|
||||
public class ResourceReferenceDt
|
||||
extends BaseResourceReference implements ICompositeDatatype {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -70,6 +69,14 @@ public class ResourceReferenceDt extends BaseResourceReference implements ICompo
|
|||
super(theResource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
org.apache.commons.lang3.builder.ToStringBuilder b = new org.apache.commons.lang3.builder.ToStringBuilder(this, org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE);
|
||||
b.append("reference", getReference().getValueAsString());
|
||||
b.append("loaded", getResource()!=null);
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute
|
||||
* URL)
|
||||
|
@ -78,7 +85,7 @@ public class ResourceReferenceDt extends BaseResourceReference implements ICompo
|
|||
* The reference itself
|
||||
*/
|
||||
public ResourceReferenceDt(String theId) {
|
||||
setResourceId(new IdDt(theId));
|
||||
setReference(new IdDt(theId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,86 +96,89 @@ public class ResourceReferenceDt extends BaseResourceReference implements ICompo
|
|||
* The reference itself
|
||||
*/
|
||||
public ResourceReferenceDt(IdDt theResourceId) {
|
||||
setResourceId(theResourceId);
|
||||
setReference(theResourceId);
|
||||
}
|
||||
|
||||
@Child(name = "reference", type = StringDt.class, order = 0, min = 0, max = 1)
|
||||
@Description(shortDefinition = "Relative, internal or absolute URL reference", formalDefinition = "A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources")
|
||||
private StringDt myReference;
|
||||
|
||||
@Child(name = "display", type = StringDt.class, order = 1, min = 0, max = 1)
|
||||
@Description(shortDefinition = "Text alternative for the resource", formalDefinition = "Plain text narrative that identifies the resource in addition to the resource reference")
|
||||
@Child(name="reference", type=IdDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Relative, internal or absolute URL reference",
|
||||
formalDefinition="A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources"
|
||||
)
|
||||
private IdDt myReference;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Text alternative for the resource",
|
||||
formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference"
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(myReference, myDisplay);
|
||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myReference, myDisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference). creating it if it does not
|
||||
* exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference to a location at which the other resource is found. The reference may a relative
|
||||
* reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location
|
||||
* where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR
|
||||
* RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#')
|
||||
* refer to contained resources
|
||||
* </p>
|
||||
* Gets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getReference() {
|
||||
public IdDt getReference() {
|
||||
if (myReference == null) {
|
||||
myReference = new StringDt();
|
||||
myReference = new IdDt();
|
||||
}
|
||||
return myReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference to a location at which the other resource is found. The reference may a relative
|
||||
* reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location
|
||||
* where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR
|
||||
* RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#')
|
||||
* refer to contained resources
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt setReference(StringDt theValue) {
|
||||
public ResourceReferenceDt setReference(IdDt theValue) {
|
||||
myReference = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>reference</b> (Relative, internal or absolute URL reference)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> A reference to a location at which the other resource is found. The reference may a relative
|
||||
* reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location
|
||||
* where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR
|
||||
* RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#')
|
||||
* refer to contained resources
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt setReference(String theString) {
|
||||
return setReference(new StringDt(theString));
|
||||
public ResourceReferenceDt setReference( String theId) {
|
||||
myReference = new IdDt(theId);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>display</b> (Text alternative for the resource). creating it if it does not exist. Will
|
||||
* not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
* Gets the value(s) for <b>display</b> (Text alternative for the resource).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getDisplay() {
|
||||
public StringDt getDisplay() {
|
||||
if (myDisplay == null) {
|
||||
myDisplay = new StringDt();
|
||||
}
|
||||
|
@ -177,39 +187,31 @@ public class ResourceReferenceDt extends BaseResourceReference implements ICompo
|
|||
|
||||
/**
|
||||
* Sets the value(s) for <b>display</b> (Text alternative for the resource)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt setDisplay(StringDt theValue) {
|
||||
myDisplay = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>display</b> (Text alternative for the resource)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b> Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt setDisplay(String theString) {
|
||||
myDisplay = new StringDt(theString);
|
||||
return this;
|
||||
public ResourceReferenceDt setDisplay( String theString) {
|
||||
myDisplay = new StringDt(theString);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdDt getResourceId() {
|
||||
if (myReference == null) {
|
||||
return new IdDt();
|
||||
}
|
||||
return new IdDt(myReference.getValue());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setResourceId(IdDt theResourceId) {
|
||||
myReference = new StringDt(theResourceId.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
@ -54,7 +55,6 @@ import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
|||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -58,7 +59,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -64,7 +65,6 @@ 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.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -59,7 +60,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -56,7 +57,6 @@ import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -75,14 +75,6 @@ public class Binary extends BaseResource implements IResource {
|
|||
return myContentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not call - throws {@link UnsupportedOperationException}
|
||||
*/
|
||||
@Override
|
||||
public NarrativeDt getText() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return (myContent.isEmpty()) && StringUtils.isBlank(myContentType);
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -71,7 +72,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.IdrefDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -64,7 +65,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -62,7 +63,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -65,7 +66,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -76,7 +77,6 @@ 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.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -60,7 +61,6 @@ import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|||
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
||||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -56,7 +57,6 @@ import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
|||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -56,7 +57,6 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
|
|||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
||||
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.CompositeParam;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -64,7 +65,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -59,7 +60,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -67,7 +68,6 @@ import ca.uhn.fhir.model.primitive.StringDt;
|
|||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.CompositeParam;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
|
|
@ -16,26 +16,6 @@
|
|||
|
||||
package ca.uhn.fhir.model.dstu.resource;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR Library
|
||||
* %%
|
||||
* Copyright (C) 2014 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -44,6 +24,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -66,7 +47,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
@ -185,33 +165,6 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*/
|
||||
public static final Include INCLUDE_SUBJECT = new Include("Encounter.subject");
|
||||
|
||||
/**
|
||||
* Search parameter constant for <b>!fulfills</b>
|
||||
* <p>
|
||||
* Description: <b></b><br/>
|
||||
* Type: <b>reference</b><br/>
|
||||
* Path: <b>Encounter.fulfills</b><br/>
|
||||
* </p>
|
||||
*/
|
||||
@SearchParamDefinition(name="!fulfills", path="Encounter.fulfills", description="", type="reference")
|
||||
public static final String SP_FULFILLS = "!fulfills";
|
||||
|
||||
/**
|
||||
* <b>Fluent Client</b> search parameter constant for <b>!fulfills</b>
|
||||
* <p>
|
||||
* Description: <b></b><br/>
|
||||
* Type: <b>reference</b><br/>
|
||||
* Path: <b>Encounter.fulfills</b><br/>
|
||||
* </p>
|
||||
*/
|
||||
public static final ReferenceParam FULFILLS = new ReferenceParam(SP_FULFILLS);
|
||||
|
||||
/**
|
||||
* Constant for fluent queries to be used to add include statements. Specifies
|
||||
* the path value of "<b>Encounter.fulfills</b>".
|
||||
*/
|
||||
public static final Include INCLUDE_FULFILLS = new Include("Encounter.fulfills");
|
||||
|
||||
/**
|
||||
* Search parameter constant for <b>length</b>
|
||||
* <p>
|
||||
|
@ -498,11 +451,11 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*
|
||||
* @return Returns a reference to this object, to allow for simple chaining.
|
||||
*/
|
||||
public Encounter addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
|
||||
public Encounter addIdentifier( String theSystem, String theValue) {
|
||||
if (myIdentifier == null) {
|
||||
myIdentifier = new java.util.ArrayList<IdentifierDt>();
|
||||
}
|
||||
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
|
||||
myIdentifier.add(new IdentifierDt(theSystem, theValue));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -516,11 +469,11 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*
|
||||
* @return Returns a reference to this object, to allow for simple chaining.
|
||||
*/
|
||||
public Encounter addIdentifier( String theSystem, String theValue) {
|
||||
public Encounter addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
|
||||
if (myIdentifier == null) {
|
||||
myIdentifier = new java.util.ArrayList<IdentifierDt>();
|
||||
}
|
||||
myIdentifier.add(new IdentifierDt(theSystem, theValue));
|
||||
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -651,8 +604,24 @@ public class Encounter extends BaseResource implements IResource {
|
|||
* Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)
|
||||
* </p>
|
||||
*/
|
||||
public void addType(EncounterTypeEnum theValue) {
|
||||
getType().add(new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER, theValue));
|
||||
public BoundCodeableConceptDt<EncounterTypeEnum> addType(EncounterTypeEnum theValue) {
|
||||
BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER, theValue);
|
||||
getType().add(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a value for <b>type</b> (Specific type of encounter)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)
|
||||
* </p>
|
||||
*/
|
||||
public BoundCodeableConceptDt<EncounterTypeEnum> addType() {
|
||||
BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER);
|
||||
getType().add(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1157,8 +1126,24 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
public void addType(ParticipantTypeEnum theValue) {
|
||||
getType().add(new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue));
|
||||
public BoundCodeableConceptDt<ParticipantTypeEnum> addType(ParticipantTypeEnum theValue) {
|
||||
BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue);
|
||||
getType().add(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a value for <b>type</b> (Role of participant in encounter)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
*
|
||||
* </p>
|
||||
*/
|
||||
public BoundCodeableConceptDt<ParticipantTypeEnum> addType() {
|
||||
BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER);
|
||||
getType().add(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1187,6 +1172,9 @@ public class Encounter extends BaseResource implements IResource {
|
|||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt getIndividual() {
|
||||
if (myIndividual == null) {
|
||||
myIndividual = new ResourceReferenceDt();
|
||||
}
|
||||
return myIndividual;
|
||||
}
|
||||
|
||||
|
@ -1355,8 +1343,8 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
public Hospitalization setPreAdmissionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
|
||||
myPreAdmissionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
|
||||
public Hospitalization setPreAdmissionIdentifier( String theSystem, String theValue) {
|
||||
myPreAdmissionIdentifier = new IdentifierDt(theSystem, theValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -1368,8 +1356,8 @@ public class Encounter extends BaseResource implements IResource {
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
public Hospitalization setPreAdmissionIdentifier( String theSystem, String theValue) {
|
||||
myPreAdmissionIdentifier = new IdentifierDt(theSystem, theValue);
|
||||
public Hospitalization setPreAdmissionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
|
||||
myPreAdmissionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -2040,4 +2028,4 @@ public class Encounter extends BaseResource implements IResource {
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -60,7 +61,6 @@ import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
|||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
||||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -58,7 +59,6 @@ import ca.uhn.fhir.model.primitive.DateDt;
|
|||
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.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -55,7 +56,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -53,7 +54,6 @@ import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -57,7 +58,6 @@ import ca.uhn.fhir.model.primitive.DateDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.CompositeParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -66,7 +67,6 @@ import ca.uhn.fhir.model.primitive.OidDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -66,7 +67,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -62,7 +63,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -61,7 +62,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -60,7 +61,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -57,7 +58,6 @@ import ca.uhn.fhir.model.primitive.BooleanDt;
|
|||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -64,7 +65,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -67,7 +68,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -70,7 +71,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -61,7 +62,6 @@ import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
|||
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
|
||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -58,7 +59,6 @@ import ca.uhn.fhir.model.primitive.DateDt;
|
|||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -75,7 +76,6 @@ import ca.uhn.fhir.model.primitive.InstantDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.CompositeParam;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.QuantityParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -59,7 +60,6 @@ import ca.uhn.fhir.model.dstu.composite.ScheduleDt;
|
|||
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -59,7 +60,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -61,7 +62,6 @@ import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum;
|
|||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
||||
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -54,7 +55,6 @@ import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|||
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
||||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -71,7 +72,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -65,7 +66,6 @@ import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum;
|
|||
import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum;
|
||||
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -59,7 +60,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -74,7 +75,6 @@ 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.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -62,7 +63,6 @@ import ca.uhn.fhir.model.primitive.InstantDt;
|
|||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.model.primitive.UriDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -71,7 +72,6 @@ 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.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
@ -454,7 +454,10 @@ public class Questionnaire extends BaseResource implements IResource {
|
|||
* The subject of the questionnaires: this is the patient that the answers apply to, but this person is not necessarily the source of information
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReferenceDt getSubject() {
|
||||
public ResourceReferenceDt getSubject() {
|
||||
if (mySubject==null) {
|
||||
mySubject = new ResourceReferenceDt();
|
||||
}
|
||||
return mySubject;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
@ -57,7 +58,6 @@ import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
|
|||
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
|
||||
import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum;
|
||||
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -71,7 +72,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -57,7 +58,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -58,7 +59,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -57,7 +58,6 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import ca.uhn.fhir.model.api.IDatatype;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -67,7 +68,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
|||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
|||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.rest.gclient.DateParam;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.NumberParam;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -44,6 +44,7 @@ import ca.uhn.fhir.model.api.BaseResource;
|
|||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
@ -63,7 +64,6 @@ import ca.uhn.fhir.model.dstu.valueset.SupplyTypeEnum;
|
|||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
||||
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import java.util.List;
|
|||
import ca.uhn.fhir.model.api.BaseResource;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
@ -53,7 +54,6 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
|||
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.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.gclient.ReferenceParam;
|
||||
import ca.uhn.fhir.rest.gclient.StringParam;
|
||||
import ca.uhn.fhir.rest.gclient.TokenParam;
|
||||
|
|
|
@ -34,6 +34,8 @@ import java.util.TimeZone;
|
|||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.apache.commons.lang3.time.FastDateFormat;
|
||||
|
||||
import ca.uhn.fhir.model.api.BasePrimitive;
|
||||
|
@ -44,17 +46,17 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
|
||||
private static final FastDateFormat ourYearFormat = FastDateFormat.getInstance("yyyy");
|
||||
private static final FastDateFormat ourYearMonthDayFormat = FastDateFormat.getInstance("yyyy-MM-dd");
|
||||
private static final FastDateFormat ourYearMonthFormat = FastDateFormat.getInstance("yyyy-MM");
|
||||
private static final FastDateFormat ourYearMonthDayNoDashesFormat = FastDateFormat.getInstance("yyyyMMdd");
|
||||
private static final FastDateFormat ourYearMonthDayTimeFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss");
|
||||
private static final FastDateFormat ourYearMonthDayTimeZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ");
|
||||
private static final FastDateFormat ourYearMonthDayTimeMilliZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSSZZ");
|
||||
private static final FastDateFormat ourYearMonthDayTimeMilliFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS");
|
||||
private static final FastDateFormat ourYearMonthDayTimeMilliZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSSZZ");
|
||||
private static final FastDateFormat ourYearMonthDayTimeZoneFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ");
|
||||
private static final FastDateFormat ourYearMonthFormat = FastDateFormat.getInstance("yyyy-MM");
|
||||
|
||||
private TemporalPrecisionEnum myPrecision = TemporalPrecisionEnum.SECOND;
|
||||
private Date myValue;
|
||||
private TimeZone myTimeZone;
|
||||
private boolean myTimeZoneZulu = false;
|
||||
private Date myValue;
|
||||
|
||||
/**
|
||||
* Gets the precision for this datatype using field values from
|
||||
|
@ -67,6 +69,10 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
return myPrecision;
|
||||
}
|
||||
|
||||
public TimeZone getTimeZone() {
|
||||
return myTimeZone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getValue() {
|
||||
return myValue;
|
||||
|
@ -113,6 +119,20 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isTimeZoneZulu() {
|
||||
return myTimeZoneZulu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if this object represents a date that is today's date
|
||||
*
|
||||
* @throws NullPointerException if {@link #getValue()} returns <code>null</code>
|
||||
*/
|
||||
public boolean isToday() {
|
||||
Validate.notNull(myValue, getClass().getSimpleName() + " contains null value");
|
||||
return DateUtils.isSameDay(new Date(), myValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the precision for this datatype using field values from
|
||||
* {@link Calendar}. Valid values are:
|
||||
|
@ -132,6 +152,14 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
myPrecision = thePrecision;
|
||||
}
|
||||
|
||||
public void setTimeZone(TimeZone theTimeZone) {
|
||||
myTimeZone = theTimeZone;
|
||||
}
|
||||
|
||||
public void setTimeZoneZulu(boolean theTimeZoneZulu) {
|
||||
myTimeZoneZulu = theTimeZoneZulu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(Date theValue) throws DataFormatException {
|
||||
myValue = theValue;
|
||||
|
@ -214,22 +242,6 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
}
|
||||
}
|
||||
|
||||
public TimeZone getTimeZone() {
|
||||
return myTimeZone;
|
||||
}
|
||||
|
||||
public void setTimeZone(TimeZone theTimeZone) {
|
||||
myTimeZone = theTimeZone;
|
||||
}
|
||||
|
||||
public boolean isTimeZoneZulu() {
|
||||
return myTimeZoneZulu;
|
||||
}
|
||||
|
||||
public void setTimeZoneZulu(boolean theTimeZoneZulu) {
|
||||
myTimeZoneZulu = theTimeZoneZulu;
|
||||
}
|
||||
|
||||
private void clearTimeZone() {
|
||||
myTimeZone = null;
|
||||
myTimeZoneZulu = false;
|
||||
|
@ -240,5 +252,5 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
|||
* is allowed by this type
|
||||
*/
|
||||
abstract boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import ca.uhn.fhir.model.api.annotation.SimpleSetter;
|
|||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
|
||||
@DatatypeDef(name = "decimal")
|
||||
public class DecimalDt extends BasePrimitive<BigDecimal> {
|
||||
public class DecimalDt extends BasePrimitive<BigDecimal> implements Comparable<DecimalDt> {
|
||||
|
||||
private BigDecimal myValue;
|
||||
|
||||
|
@ -144,4 +144,18 @@ public class DecimalDt extends BasePrimitive<BigDecimal> {
|
|||
return myValue.intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(DecimalDt theObj) {
|
||||
if (myValue == null && theObj.getValue() == null) {
|
||||
return 0;
|
||||
}
|
||||
if (myValue != null && theObj.getValue() == null) {
|
||||
return 1;
|
||||
}
|
||||
if (myValue == null && theObj.getValue() != null) {
|
||||
return -1;
|
||||
}
|
||||
return myValue.compareTo(theObj.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import static org.apache.commons.lang3.StringUtils.*;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
|
@ -71,7 +72,7 @@ public class IdDt extends BasePrimitive<String> {
|
|||
setValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a new ID using a long
|
||||
*/
|
||||
|
@ -95,18 +96,33 @@ public class IdDt extends BasePrimitive<String> {
|
|||
public IdDt(@SimpleSetter.Parameter(name = "theId") String theValue) {
|
||||
setValue(theValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param theResourceType
|
||||
* The resource type (e.g. "Patient")
|
||||
* @param theId
|
||||
* The ID (e.g. "123")
|
||||
*/
|
||||
public IdDt(String theResourceType, String theId) {
|
||||
this(theResourceType,theId,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param theResourceType The resource type (e.g. "Patient")
|
||||
* @param theId The ID (e.g. "123")
|
||||
* @param theVersionId The version ID ("e.g. "456")
|
||||
* @param theResourceType
|
||||
* The resource type (e.g. "Patient")
|
||||
* @param theId
|
||||
* The ID (e.g. "123")
|
||||
* @param theVersionId
|
||||
* The version ID ("e.g. "456")
|
||||
*/
|
||||
public IdDt(String theResourceType, String theId, String theVersionId) {
|
||||
Validate.notBlank(theResourceType, "Resource type must not be blank");
|
||||
Validate.notBlank(theId, "ID must not be blank");
|
||||
|
||||
|
||||
myResourceType = theResourceType;
|
||||
myUnqualifiedId = theId;
|
||||
myUnqualifiedVersionId = StringUtils.defaultIfBlank(theVersionId, null);
|
||||
|
@ -117,14 +133,41 @@ public class IdDt extends BasePrimitive<String> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this IdDt matches the given IdDt in terms of resource type and ID, but ignores the URL base
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean equalsIgnoreBase(IdDt theId) {
|
||||
if (theId == null) {
|
||||
return false;
|
||||
}
|
||||
if (theId.isEmpty()) {
|
||||
return isEmpty();
|
||||
}
|
||||
return ObjectUtils.equals(getResourceType(), theId.getResourceType()) && ObjectUtils.equals(getIdPart(), theId.getIdPart()) && ObjectUtils.equals(getVersionIdPart(), theId.getVersionIdPart());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to <code>this</code> IdDt. It is generally not neccesary to use this method but it is
|
||||
* provided for consistency with the rest of the API.
|
||||
*/
|
||||
@Override
|
||||
public IdDt getId() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdPart() {
|
||||
return myUnqualifiedId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unqualified portion of this ID as a big decimal, or <code>null</code> if the value is null
|
||||
*
|
||||
* @throws NumberFormatException
|
||||
* If the value is not a valid BigDecimal
|
||||
*/
|
||||
public BigDecimal asBigDecimal() {
|
||||
String val = getUnqualifiedId();
|
||||
public BigDecimal getIdPartAsBigDecimal() {
|
||||
String val = getIdPart();
|
||||
if (isBlank(val)) {
|
||||
return null;
|
||||
}
|
||||
|
@ -137,48 +180,23 @@ public class IdDt extends BasePrimitive<String> {
|
|||
* @throws NumberFormatException
|
||||
* If the value is not a valid Long
|
||||
*/
|
||||
public Long asLong() {
|
||||
String val = getUnqualifiedId();
|
||||
public Long getIdPartAsLong() {
|
||||
String val = getIdPart();
|
||||
if (isBlank(val)) {
|
||||
return null;
|
||||
}
|
||||
return Long.parseLong(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to <code>this</code> IdDt. It is generally not neccesary to use this method but it is
|
||||
* provided for consistency with the rest of the API.
|
||||
*/
|
||||
@Override
|
||||
public IdDt getId() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return myResourceType;
|
||||
}
|
||||
|
||||
public String getUnqualifiedId() {
|
||||
return myUnqualifiedId;
|
||||
}
|
||||
|
||||
public String getUnqualifiedVersionId() {
|
||||
return myUnqualifiedVersionId;
|
||||
}
|
||||
|
||||
public Long getUnqualifiedVersionIdAsLong() {
|
||||
if (!hasUnqualifiedVersionId()) {
|
||||
return null;
|
||||
}else {
|
||||
return Long.parseLong(getUnqualifiedVersionId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a
|
||||
* simple ID. Use {@link #getUnqualifiedId()} to get just the ID portion.
|
||||
* simple ID. Use {@link #getIdPart()} to get just the ID portion.
|
||||
*
|
||||
* @see #getUnqualifiedId()
|
||||
* @see #getIdPart()
|
||||
*/
|
||||
@Override
|
||||
public String getValue() {
|
||||
|
@ -190,20 +208,39 @@ public class IdDt extends BasePrimitive<String> {
|
|||
return myValue;
|
||||
}
|
||||
|
||||
public boolean hasUnqualifiedId() {
|
||||
return isNotBlank(getUnqualifiedId());
|
||||
public String getVersionIdPart() {
|
||||
return myUnqualifiedVersionId;
|
||||
}
|
||||
|
||||
public boolean hasUnqualifiedVersionId() {
|
||||
return isNotBlank(getUnqualifiedVersionId());
|
||||
public Long getVersionIdPartAsLong() {
|
||||
if (!hasVersionIdPart()) {
|
||||
return null;
|
||||
} else {
|
||||
return Long.parseLong(getVersionIdPart());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasIdPart() {
|
||||
return isNotBlank(getIdPart());
|
||||
}
|
||||
|
||||
public boolean hasVersionIdPart() {
|
||||
return isNotBlank(getVersionIdPart());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the ID is a local reference (in other words, it begins with the '#' character)
|
||||
*/
|
||||
public boolean isLocal() {
|
||||
return myUnqualifiedId != null && myUnqualifiedId.isEmpty() == false && myUnqualifiedId.charAt(0) == '#';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the unqualified ID is a valid {@link Long} value (in other words, it consists only
|
||||
* of digits)
|
||||
*/
|
||||
public boolean isValidLong() {
|
||||
String id = getUnqualifiedId();
|
||||
public boolean isIdPartValidLong() {
|
||||
String id = getIdPart();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -287,49 +324,88 @@ public class IdDt extends BasePrimitive<String> {
|
|||
setValue(theValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view of this ID as a fully qualified URL, given a server base and resource name
|
||||
* (which will only be used if the ID does not already contain those respective parts). Essentially,
|
||||
* because IdDt can contain either a complete URL or a partial one (or even jut a simple ID), this
|
||||
* method may be used to translate into a complete URL.
|
||||
*
|
||||
* @param theServerBase The server base (e.g. "http://example.com/fhir")
|
||||
* @param theResourceType The resource name (e.g. "Patient")
|
||||
* @return A fully qualified URL for this ID (e.g. "http://example.com/fhir/Patient/1")
|
||||
*/
|
||||
public String toQualifiedUrl(String theServerBase, String theResourceType) {
|
||||
if (getValue().startsWith("http")) {
|
||||
return getValue();
|
||||
}
|
||||
StringBuilder retVal = new StringBuilder();
|
||||
retVal.append(theServerBase);
|
||||
if (retVal.charAt(retVal.length()-1) != '/') {
|
||||
retVal.append('/');
|
||||
}
|
||||
if (isNotBlank(getResourceType())) {
|
||||
retVal.append(getResourceType());
|
||||
}else {
|
||||
retVal.append(theResourceType);
|
||||
}
|
||||
retVal.append('/');
|
||||
retVal.append(getUnqualifiedId());
|
||||
return retVal.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
public IdDt withoutVersion() {
|
||||
public IdDt toUnqualified() {
|
||||
return new IdDt(getResourceType(), getIdPart(), getVersionIdPart());
|
||||
}
|
||||
|
||||
public IdDt toUnqualifiedVersionless() {
|
||||
return new IdDt(getResourceType(), getIdPart());
|
||||
}
|
||||
|
||||
public IdDt toVersionless() {
|
||||
int i = myValue.indexOf(Constants.PARAM_HISTORY);
|
||||
if (i > 1) {
|
||||
return new IdDt(myValue.substring(0, i-1));
|
||||
}else {
|
||||
return new IdDt(myValue.substring(0, i - 1));
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be
|
||||
* used if the ID does not already contain those respective parts). Essentially, because IdDt can contain either a
|
||||
* complete URL or a partial one (or even jut a simple ID), this method may be used to translate into a complete
|
||||
* URL.
|
||||
*
|
||||
* @param theServerBase
|
||||
* The server base (e.g. "http://example.com/fhir")
|
||||
* @param theResourceType
|
||||
* The resource name (e.g. "Patient")
|
||||
* @return A fully qualified URL for this ID (e.g. "http://example.com/fhir/Patient/1")
|
||||
*/
|
||||
public String withServerBase(String theServerBase, String theResourceType) {
|
||||
if (getValue().startsWith("http")) {
|
||||
return getValue();
|
||||
}
|
||||
StringBuilder retVal = new StringBuilder();
|
||||
retVal.append(theServerBase);
|
||||
if (retVal.charAt(retVal.length() - 1) != '/') {
|
||||
retVal.append('/');
|
||||
}
|
||||
if (isNotBlank(getResourceType())) {
|
||||
retVal.append(getResourceType());
|
||||
} else {
|
||||
retVal.append(theResourceType);
|
||||
}
|
||||
retVal.append('/');
|
||||
retVal.append(getIdPart());
|
||||
return retVal.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID
|
||||
* noted by theVersion.
|
||||
*
|
||||
* @param theVersion
|
||||
* The actual version string, e.g. "1"
|
||||
* @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted
|
||||
* by theVersion.
|
||||
*/
|
||||
public IdDt withVersion(String theVersion) {
|
||||
Validate.notBlank(theVersion, "Version may not be null or empty");
|
||||
|
||||
int i = myValue.indexOf(Constants.PARAM_HISTORY);
|
||||
String value;
|
||||
if (i > 1) {
|
||||
value = myValue.substring(0, i - 1);
|
||||
} else {
|
||||
value = myValue;
|
||||
}
|
||||
|
||||
return new IdDt(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getIdPartAsBigDecimal()} instead
|
||||
*/
|
||||
public BigDecimal asBigDecimal() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,6 +55,10 @@ public class IntegerDt extends BasePrimitive<Integer> {
|
|||
setValueAsString(theIntegerAsString);
|
||||
}
|
||||
|
||||
public IntegerDt(Long theCount) {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return myValue;
|
||||
|
|
|
@ -181,7 +181,9 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
for (BundleEntry nextEntry : theBundle.getEntries()) {
|
||||
eventWriter.writeStartObject();
|
||||
|
||||
writeTagWithTextNode(eventWriter, "deleted", nextEntry.getDeletedAt());
|
||||
if (nextEntry.getDeletedAt() !=null&&nextEntry.getDeletedAt().isEmpty()==false) {
|
||||
writeTagWithTextNode(eventWriter, "deleted", nextEntry.getDeletedAt());
|
||||
}
|
||||
writeTagWithTextNode(eventWriter, "title", nextEntry.getTitle());
|
||||
writeTagWithTextNode(eventWriter, "id", nextEntry.getId());
|
||||
|
||||
|
@ -273,7 +275,7 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
}
|
||||
case RESOURCE_REF: {
|
||||
ResourceReferenceDt referenceDt = (ResourceReferenceDt) theValue;
|
||||
IdDt value = referenceDt.getResourceId();
|
||||
IdDt value = referenceDt.getReference();
|
||||
if (theChildName != null) {
|
||||
theWriter.writeStartObject(theChildName);
|
||||
} else {
|
||||
|
@ -282,8 +284,8 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
|
||||
String reference = value.getValue();
|
||||
if (StringUtils.isBlank(reference)) {
|
||||
if (value.getResourceType() != null && StringUtils.isNotBlank(value.getUnqualifiedId())) {
|
||||
reference = myContext.getResourceDefinition(value.getResourceType()).getName() + '/' + value.getUnqualifiedId();
|
||||
if (value.getResourceType() != null && StringUtils.isNotBlank(value.getIdPart())) {
|
||||
reference = myContext.getResourceDefinition(value.getResourceType()).getName() + '/' + value.getIdPart();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,8 +468,8 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren());
|
||||
}
|
||||
|
||||
private void encodeResourceToJsonStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, JsonGenerator theEventWriter, String theObjectNameOrNull, boolean theIncludedResource) throws IOException {
|
||||
if (!theIncludedResource) {
|
||||
private void encodeResourceToJsonStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, JsonGenerator theEventWriter, String theObjectNameOrNull, boolean theIsSubElementWithinResource) throws IOException {
|
||||
if (!theIsSubElementWithinResource) {
|
||||
super.containResourcesForEncoding(theResource);
|
||||
}
|
||||
|
||||
|
@ -480,7 +482,7 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
}
|
||||
|
||||
theEventWriter.write("resourceType", resDef.getName());
|
||||
if (theResource.getId() != null && isNotBlank(theResource.getId().getValue())) {
|
||||
if (theIsSubElementWithinResource && theResource.getId() != null && isNotBlank(theResource.getId().getValue())) {
|
||||
theEventWriter.write("id", theResource.getId().getValue());
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,12 @@ class ParserState<T> {
|
|||
|
||||
IResource resource = entry.getResource();
|
||||
if (resource == null && id != null && isNotBlank(id.getResourceType())) {
|
||||
resource = myContext.getResourceDefinition(id.getResourceType()).newInstance();
|
||||
String resourceType = id.getResourceType();
|
||||
RuntimeResourceDefinition def = myContext.getResourceDefinition(resourceType);
|
||||
if (def == null) {
|
||||
throw new DataFormatException("Entry references unknown resource type: " + resourceType);
|
||||
}
|
||||
resource = def.newInstance();
|
||||
resource.setId(id);
|
||||
entry.setResource(resource);
|
||||
}
|
||||
|
@ -405,25 +410,25 @@ class ParserState<T> {
|
|||
myEntry.getResource().setId(id);
|
||||
}
|
||||
|
||||
Map<ResourceMetadataKeyEnum, Object> metadata = myEntry.getResource().getResourceMetadata();
|
||||
Map<ResourceMetadataKeyEnum<?>, Object> metadata = myEntry.getResource().getResourceMetadata();
|
||||
if (myEntry.getPublished().isEmpty() == false) {
|
||||
metadata.put(ResourceMetadataKeyEnum.PUBLISHED, myEntry.getPublished());
|
||||
ResourceMetadataKeyEnum.PUBLISHED.put(myEntry.getResource(), myEntry.getPublished());
|
||||
}
|
||||
if (myEntry.getUpdated().isEmpty() == false) {
|
||||
metadata.put(ResourceMetadataKeyEnum.UPDATED, myEntry.getUpdated());
|
||||
ResourceMetadataKeyEnum.UPDATED.put(myEntry.getResource(), myEntry.getUpdated());
|
||||
}
|
||||
if (myEntry.getCategories().isEmpty() == false) {
|
||||
TagList tagList = new TagList();
|
||||
for (Tag next : myEntry.getCategories()) {
|
||||
tagList.add(next);
|
||||
}
|
||||
metadata.put(ResourceMetadataKeyEnum.TAG_LIST, tagList);
|
||||
ResourceMetadataKeyEnum.TAG_LIST.put(myEntry.getResource(), tagList);
|
||||
}
|
||||
if (!myEntry.getLinkSelf().isEmpty()) {
|
||||
String linkSelfValue = myEntry.getLinkSelf().getValue();
|
||||
IdDt linkSelf = new IdDt(linkSelfValue);
|
||||
myEntry.getResource().setId(linkSelf);
|
||||
if (isNotBlank(linkSelf.getUnqualifiedVersionId())) {
|
||||
if (isNotBlank(linkSelf.getVersionIdPart())) {
|
||||
metadata.put(ResourceMetadataKeyEnum.VERSION_ID, linkSelf);
|
||||
}
|
||||
}
|
||||
|
@ -808,7 +813,7 @@ class ParserState<T> {
|
|||
case RESOURCE_REF: {
|
||||
ResourceReferenceDt newChildInstance = new ResourceReferenceDt();
|
||||
myDefinition.getMutator().addValue(myParentInstance, newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), (RuntimeResourceReferenceDefinition) target, newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), newChildInstance);
|
||||
push(newState);
|
||||
return;
|
||||
}
|
||||
|
@ -914,7 +919,7 @@ class ParserState<T> {
|
|||
ResourceReferenceDt newChildInstance = new ResourceReferenceDt();
|
||||
getPreResourceState().getResourceReferences().add(newChildInstance);
|
||||
child.getMutator().addValue(myInstance, newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), resourceRefTarget, newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), newChildInstance);
|
||||
push(newState);
|
||||
return;
|
||||
}
|
||||
|
@ -1021,7 +1026,7 @@ class ParserState<T> {
|
|||
case RESOURCE_REF: {
|
||||
ResourceReferenceDt newChildInstance = new ResourceReferenceDt();
|
||||
myExtension.setValue(newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), null, newChildInstance);
|
||||
ResourceReferenceState newState = new ResourceReferenceState(getPreResourceState(), newChildInstance);
|
||||
push(newState);
|
||||
return;
|
||||
}
|
||||
|
@ -1124,7 +1129,10 @@ class ParserState<T> {
|
|||
} else {
|
||||
definition = myContext.getResourceDefinition(myResourceType);
|
||||
if (!StringUtils.equals(theLocalPart, definition.getName())) {
|
||||
throw new DataFormatException("Incorrect resource root element '" + theLocalPart + "', expected: '" + definition.getName() + "'");
|
||||
definition = myContext.getResourceDefinition(theLocalPart);
|
||||
if (!(definition instanceof RuntimeResourceDefinition)) {
|
||||
throw new DataFormatException("Element '" + theLocalPart + "' is not a resource, expected a resource at this position");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1286,7 +1294,7 @@ class ParserState<T> {
|
|||
private ResourceReferenceDt myInstance;
|
||||
private ResourceReferenceSubState mySubState;
|
||||
|
||||
public ResourceReferenceState(PreResourceState thePreResourceState, RuntimeResourceReferenceDefinition theTarget, ResourceReferenceDt theInstance) {
|
||||
public ResourceReferenceState(PreResourceState thePreResourceState, ResourceReferenceDt theInstance) {
|
||||
super(thePreResourceState);
|
||||
myInstance = theInstance;
|
||||
mySubState = ResourceReferenceSubState.INITIAL;
|
||||
|
|
|
@ -59,4 +59,9 @@ public @interface Read {
|
|||
// NB: Read, Search (maybe others) share this annotation, so update the javadocs everywhere
|
||||
Class<? extends IResource> type() default IResource.class;
|
||||
|
||||
/**
|
||||
* If set to true (default is false), this method supports vread operation as well as read
|
||||
*/
|
||||
boolean version() default false;
|
||||
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.apache.commons.io.IOUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpEntityEnclosingRequest;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
|
@ -118,6 +119,13 @@ public abstract class BaseClient {
|
|||
|
||||
if (theLogRequestAndResponse) {
|
||||
ourLog.info("Client invoking: {}", httpRequest);
|
||||
if (httpRequest instanceof HttpEntityEnclosingRequest) {
|
||||
HttpEntity entity = ((HttpEntityEnclosingRequest) httpRequest).getEntity();
|
||||
if (entity.isRepeatable()) {
|
||||
String content = IOUtils.toString(entity.getContent());
|
||||
ourLog.info("Client request body: {}", content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response = myClient.execute(httpRequest);
|
||||
|
@ -161,6 +169,8 @@ public abstract class BaseClient {
|
|||
message = message+": " + body;
|
||||
}
|
||||
|
||||
keepResponseAndLogIt(theLogRequestAndResponse, response, body);
|
||||
|
||||
BaseServerResponseException exception = BaseServerResponseException.newInstance(response.getStatusLine().getStatusCode(), message);
|
||||
|
||||
if(body!=null) {
|
||||
|
@ -201,20 +211,7 @@ public abstract class BaseClient {
|
|||
|
||||
if (ourLog.isTraceEnabled() || myKeepResponses || theLogRequestAndResponse) {
|
||||
String responseString = IOUtils.toString(reader);
|
||||
if (myKeepResponses) {
|
||||
myLastResponse = response;
|
||||
myLastResponseBody = responseString;
|
||||
}
|
||||
if (theLogRequestAndResponse) {
|
||||
String message = "HTTP " + response.getStatusLine().getStatusCode()+" " +response.getStatusLine().getReasonPhrase();
|
||||
if (StringUtils.isNotBlank(responseString)) {
|
||||
ourLog.info("Client response: {}\n{}", message, responseString);
|
||||
}else {
|
||||
ourLog.info("Client response: {}", message, responseString);
|
||||
}
|
||||
}else {
|
||||
ourLog.trace("FHIR response:\n{}\n{}", response, responseString);
|
||||
}
|
||||
keepResponseAndLogIt(theLogRequestAndResponse, response, responseString);
|
||||
reader = new StringReader(responseString);
|
||||
}
|
||||
|
||||
|
@ -239,6 +236,23 @@ public abstract class BaseClient {
|
|||
}
|
||||
}
|
||||
|
||||
private void keepResponseAndLogIt(boolean theLogRequestAndResponse, HttpResponse response, String responseString) {
|
||||
if (myKeepResponses) {
|
||||
myLastResponse = response;
|
||||
myLastResponseBody = responseString;
|
||||
}
|
||||
if (theLogRequestAndResponse) {
|
||||
String message = "HTTP " + response.getStatusLine().getStatusCode()+" " +response.getStatusLine().getReasonPhrase();
|
||||
if (StringUtils.isNotBlank(responseString)) {
|
||||
ourLog.info("Client response: {}\n{}", message, responseString);
|
||||
}else {
|
||||
ourLog.info("Client response: {}", message, responseString);
|
||||
}
|
||||
}else {
|
||||
ourLog.trace("FHIR response:\n{}\n{}", response, responseString);
|
||||
}
|
||||
}
|
||||
|
||||
protected Map<String, List<String>> createExtraParams() {
|
||||
HashMap<String, List<String>> retVal = new LinkedHashMap<String, List<String>>();
|
||||
|
||||
|
|
|
@ -20,9 +20,12 @@ package ca.uhn.fhir.rest.client;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -37,18 +40,24 @@ import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
|||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IQueryParameterType;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.api.TagList;
|
||||
import ca.uhn.fhir.model.dstu.resource.Conformance;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
import ca.uhn.fhir.parser.IParser;
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException;
|
||||
import ca.uhn.fhir.rest.gclient.IClientExecutable;
|
||||
import ca.uhn.fhir.rest.gclient.ICriterion;
|
||||
import ca.uhn.fhir.rest.gclient.ICriterionInternal;
|
||||
import ca.uhn.fhir.rest.gclient.IGetPage;
|
||||
import ca.uhn.fhir.rest.gclient.IGetPageTyped;
|
||||
import ca.uhn.fhir.rest.gclient.IGetTags;
|
||||
import ca.uhn.fhir.rest.gclient.IParam;
|
||||
import ca.uhn.fhir.rest.gclient.IQuery;
|
||||
import ca.uhn.fhir.rest.gclient.ISort;
|
||||
import ca.uhn.fhir.rest.gclient.IUntypedQuery;
|
||||
import ca.uhn.fhir.rest.gclient.Include;
|
||||
import ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.ConformanceMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.CreateMethodBinding;
|
||||
|
@ -56,6 +65,7 @@ import ca.uhn.fhir.rest.method.DeleteMethodBinding;
|
|||
import ca.uhn.fhir.rest.method.HistoryMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.HttpDeleteClientInvocation;
|
||||
import ca.uhn.fhir.rest.method.HttpGetClientInvocation;
|
||||
import ca.uhn.fhir.rest.method.HttpSimpleGetClientInvocation;
|
||||
import ca.uhn.fhir.rest.method.IClientResponseHandler;
|
||||
import ca.uhn.fhir.rest.method.ReadMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.SearchMethodBinding;
|
||||
|
@ -134,8 +144,15 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T extends IResource> Bundle history(final Class<T> theType, IdDt theIdDt) {
|
||||
HttpGetClientInvocation invocation = HistoryMethodBinding.createHistoryInvocation(toResourceName(theType), theIdDt);
|
||||
public IGetTags getTags() {
|
||||
return new GetTagsInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IResource> Bundle history(final Class<T> theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit) {
|
||||
String resourceName = theType != null ? toResourceName(theType) : null;
|
||||
IdDt id = theIdDt != null && theIdDt.isEmpty() == false ? theIdDt : null;
|
||||
HttpGetClientInvocation invocation = HistoryMethodBinding.createHistoryInvocation(resourceName, id, theSince, theLimit);
|
||||
if (isKeepResponses()) {
|
||||
myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
|
||||
}
|
||||
|
@ -147,8 +164,8 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T extends IResource> Bundle history(Class<T> theType, String theId) {
|
||||
return history(theType, new IdDt(theId));
|
||||
public <T extends IResource> Bundle history(Class<T> theType, String theId, DateTimeDt theSince, Integer theLimit) {
|
||||
return history(theType, new IdDt(theId), theSince, theLimit);
|
||||
}
|
||||
|
||||
public boolean isLogRequestAndResponse() {
|
||||
|
@ -213,10 +230,6 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
myLogRequestAndResponse = theLogRequestAndResponse;
|
||||
}
|
||||
|
||||
private String toResourceName(Class<? extends IResource> theType) {
|
||||
return myContext.getResourceDefinition(theType).getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IResource> transaction(List<IResource> theResources) {
|
||||
BaseHttpClientInvocation invocation = TransactionMethodBinding.createTransactionInvocation(theResources, myContext);
|
||||
|
@ -281,6 +294,68 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
return vread(theType, new IdDt(theId), new IdDt(theVersionId));
|
||||
}
|
||||
|
||||
private String toResourceName(Class<? extends IResource> theType) {
|
||||
return myContext.getResourceDefinition(theType).getName();
|
||||
}
|
||||
|
||||
private abstract class BaseClientExecutable<T extends IClientExecutable<?, ?>, Y> implements IClientExecutable<T, Y> {
|
||||
private EncodingEnum myParamEncoding;
|
||||
private Boolean myPrettyPrint;
|
||||
private boolean myQueryLogRequestAndResponse;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public T andLogRequestAndResponse(boolean theLogRequestAndResponse) {
|
||||
myQueryLogRequestAndResponse = theLogRequestAndResponse;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public T encodedJson() {
|
||||
myParamEncoding = EncodingEnum.JSON;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T encodedXml() {
|
||||
myParamEncoding = EncodingEnum.XML;
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public T prettyPrint() {
|
||||
myPrettyPrint = true;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
protected void addParam(Map<String, List<String>> params, String parameterName, String parameterValue) {
|
||||
if (!params.containsKey(parameterName)) {
|
||||
params.put(parameterName, new ArrayList<String>());
|
||||
}
|
||||
params.get(parameterName).add(parameterValue);
|
||||
}
|
||||
|
||||
protected <Z> Z invoke(Map<String, List<String>> theParams, IClientResponseHandler<Z> theHandler, BaseHttpClientInvocation theInvocation) {
|
||||
if (myParamEncoding != null) {
|
||||
theParams.put(Constants.PARAM_FORMAT, Collections.singletonList(myParamEncoding.getFormatContentType()));
|
||||
}
|
||||
|
||||
if (myPrettyPrint != null) {
|
||||
theParams.put(Constants.PARAM_PRETTY, Collections.singletonList(myPrettyPrint.toString()));
|
||||
}
|
||||
|
||||
if (isKeepResponses()) {
|
||||
myLastRequest = theInvocation.asHttpRequest(getServerBase(), null, getEncoding());
|
||||
}
|
||||
|
||||
Z resp = invokeClient(theHandler, theInvocation, myQueryLogRequestAndResponse || myLogRequestAndResponse);
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private final class BundleResponseHandler implements IClientResponseHandler<Bundle> {
|
||||
|
||||
private Class<? extends IResource> myType;
|
||||
|
@ -300,17 +375,20 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
}
|
||||
}
|
||||
|
||||
private class ForInternal implements IQuery {
|
||||
private class ForInternal extends BaseClientExecutable<IQuery, Bundle> implements IQuery {
|
||||
|
||||
private List<ICriterionInternal> myCriterion = new ArrayList<ICriterionInternal>();
|
||||
private List<Include> myInclude = new ArrayList<Include>();
|
||||
private EncodingEnum myParamEncoding;
|
||||
private Integer myParamLimit;
|
||||
private boolean myQueryLogRequestAndResponse;
|
||||
private String myResourceName;
|
||||
private Class<? extends IResource> myResourceType;
|
||||
private final String myResourceName;
|
||||
private final Class<? extends IResource> myResourceType;
|
||||
private List<SortInternal> mySort = new ArrayList<SortInternal>();
|
||||
|
||||
public ForInternal() {
|
||||
myResourceType = null;
|
||||
myResourceName = null;
|
||||
}
|
||||
|
||||
public ForInternal(Class<? extends IResource> theResourceType) {
|
||||
myResourceType = theResourceType;
|
||||
myResourceName = myContext.getResourceDefinition(theResourceType).getName();
|
||||
|
@ -321,47 +399,21 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
myResourceName = theResourceName;
|
||||
}
|
||||
|
||||
private void addParam(Map<String, List<String>> params, String parameterName, String parameterValue) {
|
||||
if (!params.containsKey(parameterName)) {
|
||||
params.put(parameterName, new ArrayList<String>());
|
||||
}
|
||||
params.get(parameterName).add(parameterValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery and(ICriterion theCriterion) {
|
||||
myCriterion.add((ICriterionInternal) theCriterion);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery andLogRequestAndResponse(boolean theLogRequestAndResponse) {
|
||||
myQueryLogRequestAndResponse = theLogRequestAndResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery encodedJson() {
|
||||
myParamEncoding = EncodingEnum.JSON;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery encodedXml() {
|
||||
myParamEncoding = EncodingEnum.XML;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle execute() {
|
||||
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(getServerBase());
|
||||
b.append('/');
|
||||
b.append(myResourceType);
|
||||
b.append('?');
|
||||
|
||||
Map<String, List<String>> params = new LinkedHashMap<String, List<String>>();
|
||||
Map<String, List<String>> initial = createExtraParams();
|
||||
if (initial != null) {
|
||||
params.putAll(initial);
|
||||
}
|
||||
|
||||
for (ICriterionInternal next : myCriterion) {
|
||||
String parameterName = next.getParameterName();
|
||||
String parameterValue = next.getParameterValue();
|
||||
|
@ -369,30 +421,21 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
}
|
||||
|
||||
for (Include next : myInclude) {
|
||||
addParam(params, Constants.PARAM_INCLUDE, next.getInclude());
|
||||
addParam(params, Constants.PARAM_INCLUDE, next.getValue());
|
||||
}
|
||||
|
||||
for (SortInternal next : mySort) {
|
||||
addParam(params, next.getParamName(), next.getParamValue());
|
||||
}
|
||||
|
||||
if (myParamEncoding != null) {
|
||||
addParam(params, Constants.PARAM_FORMAT, myParamEncoding.getFormatContentType());
|
||||
}
|
||||
|
||||
if (myParamLimit != null) {
|
||||
addParam(params, Constants.PARAM_COUNT, Integer.toString(myParamLimit));
|
||||
}
|
||||
|
||||
HttpGetClientInvocation invocation = new HttpGetClientInvocation(params, myResourceName);
|
||||
if (isKeepResponses()) {
|
||||
myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
|
||||
}
|
||||
|
||||
BundleResponseHandler binding = new BundleResponseHandler(myResourceType);
|
||||
HttpGetClientInvocation invocation = new HttpGetClientInvocation(params, myResourceName);
|
||||
|
||||
Bundle resp = invokeClient(binding, invocation, myQueryLogRequestAndResponse || myLogRequestAndResponse);
|
||||
return resp;
|
||||
return invoke(params, binding, invocation);
|
||||
|
||||
}
|
||||
|
||||
|
@ -412,12 +455,6 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery prettyPrint() {
|
||||
setPrettyPrint(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISort sort() {
|
||||
SortInternal retVal = new SortInternal(this);
|
||||
|
@ -433,6 +470,72 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
|
||||
}
|
||||
|
||||
private class GetTagsInternal extends BaseClientExecutable<IGetTags, TagList> implements IGetTags {
|
||||
|
||||
private String myResourceName;
|
||||
private String myId;
|
||||
private String myVersionId;
|
||||
|
||||
@Override
|
||||
public TagList execute() {
|
||||
|
||||
Map<String, List<String>> params = new LinkedHashMap<String, List<String>>();
|
||||
Map<String, List<String>> initial = createExtraParams();
|
||||
if (initial != null) {
|
||||
params.putAll(initial);
|
||||
}
|
||||
|
||||
TagListResponseHandler binding = new TagListResponseHandler();
|
||||
List<String> urlFragments = new ArrayList<String>();
|
||||
if (isNotBlank(myResourceName)) {
|
||||
urlFragments.add(myResourceName);
|
||||
if (isNotBlank(myId)) {
|
||||
urlFragments.add(myId);
|
||||
if (isNotBlank(myVersionId)) {
|
||||
urlFragments.add(Constants.PARAM_HISTORY);
|
||||
urlFragments.add(myVersionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
urlFragments.add(Constants.PARAM_TAGS);
|
||||
|
||||
HttpGetClientInvocation invocation = new HttpGetClientInvocation(params, urlFragments);
|
||||
|
||||
return invoke(params, binding, invocation);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetTags forResource(Class<? extends IResource> theClass) {
|
||||
setResourceClass(theClass);
|
||||
return this;
|
||||
}
|
||||
|
||||
private void setResourceClass(Class<? extends IResource> theClass) {
|
||||
if (theClass != null) {
|
||||
myResourceName = myContext.getResourceDefinition(theClass).getName();
|
||||
} else {
|
||||
myResourceName = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetTags forResource(Class<? extends IResource> theClass, String theId) {
|
||||
setResourceClass(theClass);
|
||||
myId = theId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetTags forResource(Class<? extends IResource> theClass, String theId, String theVersionId) {
|
||||
setResourceClass(theClass);
|
||||
myId = theId;
|
||||
myVersionId = theVersionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private final class OutcomeResponseHandler implements IClientResponseHandler<MethodOutcome> {
|
||||
private final String myResourceName;
|
||||
|
||||
|
@ -449,6 +552,11 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
|
||||
private class QueryInternal implements IUntypedQuery {
|
||||
|
||||
@Override
|
||||
public IQuery forAllResources() {
|
||||
return new ForInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuery forResource(Class<? extends IResource> theResourceType) {
|
||||
return new ForInternal(theResourceType);
|
||||
|
@ -518,4 +626,59 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
|||
|
||||
}
|
||||
|
||||
private final class TagListResponseHandler implements IClientResponseHandler<TagList> {
|
||||
|
||||
@Override
|
||||
public TagList invokeClient(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException, BaseServerResponseException {
|
||||
EncodingEnum respType = EncodingEnum.forContentType(theResponseMimeType);
|
||||
IParser parser = respType.newParser(myContext);
|
||||
return parser.parseTagList(theResponseReader);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetPage loadPage() {
|
||||
return new LoadPageInternal();
|
||||
}
|
||||
|
||||
private final class LoadPageInternal implements IGetPage {
|
||||
|
||||
@Override
|
||||
public IGetPageTyped previous(Bundle theBundle) {
|
||||
return new GetPageInternal(theBundle.getLinkPrevious().getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetPageTyped next(Bundle theBundle) {
|
||||
return new GetPageInternal(theBundle.getLinkNext().getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGetPageTyped url(String thePageUrl) {
|
||||
return new GetPageInternal(thePageUrl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class GetPageInternal extends BaseClientExecutable<IGetPageTyped, Bundle> implements IGetPageTyped {
|
||||
|
||||
private String myUrl;
|
||||
|
||||
public GetPageInternal(String theUrl) {
|
||||
myUrl = theUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle execute() {
|
||||
|
||||
BundleResponseHandler binding = new BundleResponseHandler(null);
|
||||
HttpSimpleGetClientInvocation invocation = new HttpSimpleGetClientInvocation(myUrl);
|
||||
|
||||
Map<String, List<String>> params = null;
|
||||
return invoke(params, binding, invocation);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,8 +27,12 @@ import ca.uhn.fhir.model.api.Bundle;
|
|||
import ca.uhn.fhir.model.api.IQueryParameterType;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.dstu.resource.Conformance;
|
||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.gclient.IGetPage;
|
||||
import ca.uhn.fhir.rest.gclient.IGetPageTyped;
|
||||
import ca.uhn.fhir.rest.gclient.IGetTags;
|
||||
import ca.uhn.fhir.rest.gclient.IUntypedQuery;
|
||||
|
||||
public interface IGenericClient {
|
||||
|
@ -47,16 +51,16 @@ public interface IGenericClient {
|
|||
*/
|
||||
MethodOutcome create(IResource theResource);
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the "transaction" method.
|
||||
*
|
||||
* @param theResources
|
||||
* The resources to create/update in a single transaction
|
||||
* @return A list of resource stubs (<b>these will not be fully populated</b>) containing IDs and other {@link IResource#getResourceMetadata() metadata}
|
||||
* @return A list of resource stubs (<b>these will not be fully populated</b>) containing IDs and other
|
||||
* {@link IResource#getResourceMetadata() metadata}
|
||||
*/
|
||||
List<IResource> transaction(List<IResource> theResources);
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the "delete instance" method.
|
||||
*
|
||||
|
@ -83,23 +87,39 @@ public interface IGenericClient {
|
|||
* Implementation of the "history instance" method.
|
||||
*
|
||||
* @param theType
|
||||
* The type of resource to return the history for
|
||||
* The type of resource to return the history for, or
|
||||
* <code>null<code> to search for history across all resources
|
||||
* @param theId
|
||||
* the ID of the resource to return the history for
|
||||
* @return An outcome
|
||||
* The ID of the resource to return the history for, or <code>null</code> to search for all resource
|
||||
* instances. Note that if this param is not null, <code>theType</code> must also not be null
|
||||
* @param theSince
|
||||
* If not null, request that the server only return resources updated since this time
|
||||
* @param theLimit
|
||||
* If not null, request that the server return no more than this number of resources. Note that the
|
||||
* server may return less even if more are available, but should not return more according to the FHIR
|
||||
* specification.
|
||||
* @return A bundle containing returned resources
|
||||
*/
|
||||
<T extends IResource> Bundle history(Class<T> theType, IdDt theIdDt);
|
||||
<T extends IResource> Bundle history(Class<T> theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit);
|
||||
|
||||
/**
|
||||
* Implementation of the "history instance" method.
|
||||
*
|
||||
* @param theType
|
||||
* The type of resource to return the history for
|
||||
* The type of resource to return the history for, or
|
||||
* <code>null<code> to search for history across all resources
|
||||
* @param theId
|
||||
* the ID of the resource to return the history for
|
||||
* @return An outcome
|
||||
* The ID of the resource to return the history for, or <code>null</code> to search for all resource
|
||||
* instances. Note that if this param is not null, <code>theType</code> must also not be null
|
||||
* @param theSince
|
||||
* If not null, request that the server only return resources updated since this time
|
||||
* @param theLimit
|
||||
* If not null, request that the server return no more than this number of resources. Note that the
|
||||
* server may return less even if more are available, but should not return more according to the FHIR
|
||||
* specification.
|
||||
* @return A bundle containing returned resources
|
||||
*/
|
||||
<T extends IResource> Bundle history(Class<T> theType, String theIdDt);
|
||||
<T extends IResource> Bundle history(Class<T> theType, String theIdDt, DateTimeDt theSince, Integer theLimit);
|
||||
|
||||
/**
|
||||
* Implementation of the "instance read" method.
|
||||
|
@ -195,12 +215,25 @@ public interface IGenericClient {
|
|||
<T extends IResource> T vread(Class<T> theType, String theId, String theVersionId);
|
||||
|
||||
/**
|
||||
* If set to <code>true</code>, the client will log all requests and all responses. This
|
||||
* is probably not a good production setting since it will result in a lot of extra logging, but
|
||||
* it can be useful for troubleshooting.
|
||||
* If set to <code>true</code>, the client will log all requests and all responses. This is probably not a good
|
||||
* production setting since it will result in a lot of extra logging, but it can be useful for troubleshooting.
|
||||
*
|
||||
* @param theLogRequestAndResponse Should requests and responses be logged
|
||||
* @param theLogRequestAndResponse
|
||||
* Should requests and responses be logged
|
||||
*/
|
||||
void setLogRequestAndResponse(boolean theLogRequestAndResponse);
|
||||
|
||||
/**
|
||||
* Fluent method for the "get tags" operation
|
||||
*/
|
||||
IGetTags getTags();
|
||||
|
||||
/**
|
||||
* Loads the previous/next bundle of resources from a paged set, using the link specified in the
|
||||
* "link type=next" tag within the atom bundle.
|
||||
*
|
||||
* @see Bundle#getLinkNext()
|
||||
*/
|
||||
IGetPage loadPage();
|
||||
|
||||
}
|
||||
|
|
|
@ -64,4 +64,6 @@ public interface IRestfulClient {
|
|||
*/
|
||||
String getServerBase();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
|
||||
public interface IClientExecutable<T extends IClientExecutable<?,?>, Y> {
|
||||
|
||||
Y execute();
|
||||
|
||||
T encodedJson();
|
||||
|
||||
T encodedXml();
|
||||
|
||||
/**
|
||||
* If set to true, the client will log the request and response to the SLF4J logger. This can be useful for
|
||||
* debugging, but is generally not desirable in a production situation.
|
||||
*/
|
||||
T andLogRequestAndResponse(boolean theLogRequestAndResponse);
|
||||
|
||||
T prettyPrint();
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
|
||||
public interface IGetPage {
|
||||
|
||||
IGetPageTyped previous(Bundle theBundle);
|
||||
|
||||
IGetPageTyped next(Bundle theBundle);
|
||||
|
||||
IGetPageTyped url(String thePageUrl);
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
|
||||
public interface IGetPageTyped extends IClientExecutable<IGetPageTyped, Bundle> {
|
||||
|
||||
// nothing for now
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.TagList;
|
||||
|
||||
public interface IGetTags extends IClientExecutable<IGetTags, TagList> {
|
||||
|
||||
IGetTags forResource(Class<? extends IResource> theClass);
|
||||
|
||||
IGetTags forResource(Class<? extends IResource> theClass, String theId);
|
||||
|
||||
IGetTags forResource(Class<? extends IResource> theClass, String theId, String theVersionId);
|
||||
|
||||
}
|
|
@ -21,31 +21,18 @@ package ca.uhn.fhir.rest.gclient;
|
|||
*/
|
||||
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
|
||||
public interface IQuery {
|
||||
public interface IQuery extends IClientExecutable<IQuery,Bundle> {
|
||||
|
||||
IQuery where(ICriterion theCriterion);
|
||||
|
||||
|
||||
IQuery and(ICriterion theCriterion);
|
||||
|
||||
Bundle execute();
|
||||
|
||||
IQuery include(Include theIncludeManagingorganization);
|
||||
|
||||
IQuery encodedJson();
|
||||
|
||||
IQuery encodedXml();
|
||||
|
||||
ISort sort();
|
||||
|
||||
IQuery limitTo(int theLimitTo);
|
||||
|
||||
/**
|
||||
* If set to true, the client will log the request and response to the SLF4J logger. This
|
||||
* can be useful for debugging, but is generally not desirable in a production situation.
|
||||
*/
|
||||
IQuery andLogRequestAndResponse(boolean theLogRequestAndResponse);
|
||||
|
||||
IQuery prettyPrint();
|
||||
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ import ca.uhn.fhir.model.api.IResource;
|
|||
|
||||
public interface IUntypedQuery {
|
||||
|
||||
IQuery forAllResources();
|
||||
|
||||
IQuery forResource(String theResourceName);
|
||||
|
||||
IQuery forResource(Class<? extends IResource> theClass);
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR Library
|
||||
* %%
|
||||
* Copyright (C) 2014 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
public class Include {
|
||||
|
||||
private String myInclude;
|
||||
|
||||
public Include(String theInclude) {
|
||||
myInclude = theInclude;
|
||||
}
|
||||
|
||||
public String getInclude() {
|
||||
return myInclude;
|
||||
}
|
||||
|
||||
}
|
|
@ -32,7 +32,7 @@ class TokenCriterion implements ICriterion, ICriterionInternal {
|
|||
if (StringUtils.isNotBlank(theSystem)) {
|
||||
myValue = theSystem + "|" + StringUtils.defaultString(theCode);
|
||||
} else {
|
||||
myValue = StringUtils.defaultString(theCode);
|
||||
myValue = "|" + StringUtils.defaultString(theCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR Library
|
||||
|
@ -58,6 +60,11 @@ public class TokenParam implements IParam {
|
|||
public ICriterion identifier(String theIdentifier) {
|
||||
return new TokenCriterion(getParamName(), null, theIdentifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICriterion identifier(IdentifierDt theIdentifier) {
|
||||
return new TokenCriterion(getParamName(), theIdentifier.getSystem().getValueAsString(), theIdentifier.getValue().getValue());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -101,6 +108,15 @@ public class TokenParam implements IParam {
|
|||
* @return A criterion
|
||||
*/
|
||||
ICriterion code(String theIdentifier);
|
||||
|
||||
/**
|
||||
* Creates a search criterion that matches against the given identifier (system and code if both are present, or whatever is present)
|
||||
*
|
||||
* @param theIdentifier
|
||||
* The identifier
|
||||
* @return A criterion
|
||||
*/
|
||||
ICriterion identifier(IdentifierDt theIdentifier);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import ca.uhn.fhir.parser.IParser;
|
|||
import ca.uhn.fhir.rest.client.BaseHttpClientInvocation;
|
||||
import ca.uhn.fhir.rest.server.Constants;
|
||||
import ca.uhn.fhir.rest.server.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer.NarrativeModeEnum;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClientInvocation {
|
||||
|
||||
|
@ -56,7 +56,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
|
|||
myResource = theResource;
|
||||
myUrlExtension = theUrlExtension;
|
||||
myTagList = null;
|
||||
myResources=null;
|
||||
myResources = null;
|
||||
}
|
||||
|
||||
public BaseHttpClientInvocationWithContents(FhirContext theContext, TagList theTagList, String... theUrlExtension) {
|
||||
|
@ -68,16 +68,16 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
|
|||
myResource = null;
|
||||
myContext = theContext;
|
||||
myTagList = theTagList;
|
||||
myResources=null;
|
||||
myResources = null;
|
||||
|
||||
myUrlExtension = StringUtils.join(theUrlExtension, '/');
|
||||
}
|
||||
|
||||
public BaseHttpClientInvocationWithContents(FhirContext theContext, List<IResource> theResources) {
|
||||
myContext=theContext;
|
||||
myResource=null;
|
||||
myTagList=null;
|
||||
myUrlExtension=null;
|
||||
myContext = theContext;
|
||||
myResource = null;
|
||||
myTagList = null;
|
||||
myUrlExtension = null;
|
||||
myResources = theResources;
|
||||
}
|
||||
|
||||
|
@ -90,16 +90,16 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
|
|||
}
|
||||
b.append(StringUtils.defaultString(myUrlExtension));
|
||||
|
||||
appendExtraParamsWithQuestionMark(theExtraParams, b, true);
|
||||
appendExtraParamsWithQuestionMark(theExtraParams, b, b.indexOf("?") == -1);
|
||||
String url = b.toString();
|
||||
|
||||
if (myResource != null && Binary.class.isAssignableFrom(myResource.getClass())) {
|
||||
Binary binary = (Binary)myResource;
|
||||
Binary binary = (Binary) myResource;
|
||||
ByteArrayEntity entity = new ByteArrayEntity(binary.getContent(), ContentType.parse(binary.getContentType()));
|
||||
HttpRequestBase retVal = createRequest(url, entity);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
IParser parser;
|
||||
String contentType;
|
||||
if (theEncoding == EncodingEnum.JSON) {
|
||||
|
@ -114,7 +114,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
|
|||
if (myTagList != null) {
|
||||
contents = parser.encodeTagListToString(myTagList);
|
||||
} else if (myResources != null) {
|
||||
Bundle bundle = BaseResourceReturningMethodBinding.createBundleFromResourceList(myContext, "", myResources, theEncoding, "", "", false, NarrativeModeEnum.NORMAL);
|
||||
Bundle bundle = RestfulServer.createBundleFromResourceList(myContext, "", myResources, "", "", myResources.size());
|
||||
contents = parser.encodeBundleToString(bundle);
|
||||
} else {
|
||||
contents = parser.encodeResourceToString(myResource);
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.lang.reflect.Method;
|
|||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -62,8 +61,10 @@ import ca.uhn.fhir.rest.client.BaseHttpClientInvocation;
|
|||
import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException;
|
||||
import ca.uhn.fhir.rest.param.IParameter;
|
||||
import ca.uhn.fhir.rest.param.ParameterUtil;
|
||||
import ca.uhn.fhir.rest.server.BundleProviders;
|
||||
import ca.uhn.fhir.rest.server.Constants;
|
||||
import ca.uhn.fhir.rest.server.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.server.IBundleProvider;
|
||||
import ca.uhn.fhir.rest.server.IResourceProvider;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
|
||||
|
@ -261,6 +262,8 @@ public abstract class BaseMethodBinding<T> implements IClientResponseHandler<T>
|
|||
}
|
||||
} else if (MethodOutcome.class.equals(returnTypeFromMethod)) {
|
||||
// returns a method outcome
|
||||
} else if (IBundleProvider.class.equals(returnTypeFromMethod)) {
|
||||
// returns a bundle provider
|
||||
} else if (Bundle.class.equals(returnTypeFromMethod)) {
|
||||
// returns a bundle
|
||||
} else if (void.class.equals(returnTypeFromMethod)) {
|
||||
|
@ -274,7 +277,7 @@ public abstract class BaseMethodBinding<T> implements IClientResponseHandler<T>
|
|||
} else {
|
||||
if (!IResource.class.equals(returnTypeFromMethod) && !verifyIsValidResourceReturnType(returnTypeFromMethod)) {
|
||||
throw new ConfigurationException("Method '" + theMethod.getName() + "' from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName() + " returns " + toLogString(returnTypeFromMethod)
|
||||
+ " - Must return a resource type");
|
||||
+ " - Must return a resource type (eg Patient, " + Bundle.class.getSimpleName() + ", " + IBundleProvider.class.getSimpleName() + ", etc., see the documentation for more details)");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -428,17 +431,19 @@ public abstract class BaseMethodBinding<T> implements IClientResponseHandler<T>
|
|||
return retVal;
|
||||
}
|
||||
|
||||
protected static List<IResource> toResourceList(Object response) throws InternalErrorException {
|
||||
protected static IBundleProvider toResourceList(Object response) throws InternalErrorException {
|
||||
if (response == null) {
|
||||
return Collections.emptyList();
|
||||
return BundleProviders.newEmptyList();
|
||||
} else if (response instanceof IBundleProvider) {
|
||||
return (IBundleProvider) response;
|
||||
} else if (response instanceof IResource) {
|
||||
return Collections.singletonList((IResource) response);
|
||||
return BundleProviders.newList((IResource) response);
|
||||
} else if (response instanceof Collection) {
|
||||
List<IResource> retVal = new ArrayList<IResource>();
|
||||
for (Object next : ((Collection<?>) response)) {
|
||||
retVal.add((IResource) next);
|
||||
}
|
||||
return retVal;
|
||||
return BundleProviders.newList(retVal);
|
||||
} else {
|
||||
throw new InternalErrorException("Unexpected return type: " + response.getClass().getCanonicalName());
|
||||
}
|
||||
|
|
|
@ -324,10 +324,10 @@ public abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBindin
|
|||
while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') {
|
||||
theBuffer.deleteCharAt(0);
|
||||
}
|
||||
theTagList.add(new Tag(term, label, scheme));
|
||||
theTagList.add(new Tag(scheme, term, label));
|
||||
parseTagValue(theTagList, theCompleteHeaderValue, theBuffer);
|
||||
} else {
|
||||
theTagList.add(new Tag(term, label, scheme));
|
||||
theTagList.add(new Tag(scheme, term, label));
|
||||
}
|
||||
|
||||
if (theBuffer.length() > 0) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue