diff --git a/hapi-fhir-base/examples/.classpath b/examples/.classpath similarity index 100% rename from hapi-fhir-base/examples/.classpath rename to examples/.classpath diff --git a/hapi-fhir-base/examples/.gitignore b/examples/.gitignore similarity index 100% rename from hapi-fhir-base/examples/.gitignore rename to examples/.gitignore diff --git a/hapi-fhir-base/examples/.project b/examples/.project similarity index 100% rename from hapi-fhir-base/examples/.project rename to examples/.project diff --git a/hapi-fhir-base/examples/pom.xml b/examples/pom.xml similarity index 96% rename from hapi-fhir-base/examples/pom.xml rename to examples/pom.xml index d20bcfb8574..6f01017290a 100644 --- a/hapi-fhir-base/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir 0.8-SNAPSHOT - ../../pom.xml + ../pom.xml hapi-fhir-base-examples diff --git a/hapi-fhir-base/examples/pom.xml.orig b/examples/pom.xml.orig similarity index 100% rename from hapi-fhir-base/examples/pom.xml.orig rename to examples/pom.xml.orig diff --git a/hapi-fhir-base/examples/pom.xml.versionsBackup b/examples/pom.xml.versionsBackup similarity index 100% rename from hapi-fhir-base/examples/pom.xml.versionsBackup rename to examples/pom.xml.versionsBackup diff --git a/hapi-fhir-base/examples/src/main/java/example/ClientExamples.java b/examples/src/main/java/example/ClientExamples.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ClientExamples.java rename to examples/src/main/java/example/ClientExamples.java diff --git a/hapi-fhir-base/examples/src/main/java/example/CompleteExampleClient.java b/examples/src/main/java/example/CompleteExampleClient.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/CompleteExampleClient.java rename to examples/src/main/java/example/CompleteExampleClient.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ExampleProviders.java b/examples/src/main/java/example/ExampleProviders.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ExampleProviders.java rename to examples/src/main/java/example/ExampleProviders.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ExampleRestfulClient.java b/examples/src/main/java/example/ExampleRestfulClient.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ExampleRestfulClient.java rename to examples/src/main/java/example/ExampleRestfulClient.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ExampleRestfulServlet.java b/examples/src/main/java/example/ExampleRestfulServlet.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ExampleRestfulServlet.java rename to examples/src/main/java/example/ExampleRestfulServlet.java diff --git a/hapi-fhir-base/examples/src/main/java/example/Extensions.java b/examples/src/main/java/example/Extensions.java similarity index 82% rename from hapi-fhir-base/examples/src/main/java/example/Extensions.java rename to examples/src/main/java/example/Extensions.java index e0f63af25b7..57e2a934928 100644 --- a/hapi-fhir-base/examples/src/main/java/example/Extensions.java +++ b/examples/src/main/java/example/Extensions.java @@ -35,12 +35,18 @@ patient.addUndeclaredExtension(ext); //START SNIPPET: resourceStringExtension +// Continuing the example from above, we will add a name to the patient, and then +// add an extension to part of that name HumanNameDt name = patient.addName(); name.addFamily().setValue("Shmoe"); + +// Add a new "given name", which is of type StringDt StringDt given = name.addGiven(); given.setValue("Joe"); -ExtensionDt ext2 = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); -given.addUndeclaredExtension(ext2); + +// Create an extension and add it to the StringDt +ExtensionDt givenExt = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); +given.addUndeclaredExtension(givenExt); //END SNIPPET: resourceStringExtension String output = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); @@ -64,10 +70,12 @@ List modExts = patient.getUndeclaredModifierExtensions(); public void foo() { //START SNIPPET: subExtension Patient patient = new Patient(); - + +// Add an extension (initially with no contents) to the resource ExtensionDt parent = new ExtensionDt(false, "http://example.com#parent"); patient.addUndeclaredExtension(parent); +// Add two extensions as children to the parent extension ExtensionDt child1 = new ExtensionDt(false, "http://example.com#childOne", new StringDt("value1")); parent.addUndeclaredExtension(child1); diff --git a/hapi-fhir-base/examples/src/main/java/example/FhirContextIntro.java b/examples/src/main/java/example/FhirContextIntro.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/FhirContextIntro.java rename to examples/src/main/java/example/FhirContextIntro.java diff --git a/hapi-fhir-base/examples/src/main/java/example/FhirDataModel.java b/examples/src/main/java/example/FhirDataModel.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/FhirDataModel.java rename to examples/src/main/java/example/FhirDataModel.java diff --git a/hapi-fhir-base/examples/src/main/java/example/GenericClientExample.java b/examples/src/main/java/example/GenericClientExample.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/GenericClientExample.java rename to examples/src/main/java/example/GenericClientExample.java diff --git a/hapi-fhir-base/examples/src/main/java/example/IRestfulClient.java b/examples/src/main/java/example/IRestfulClient.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/IRestfulClient.java rename to examples/src/main/java/example/IRestfulClient.java diff --git a/hapi-fhir-base/examples/src/main/java/example/MyPatient.java b/examples/src/main/java/example/MyPatient.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/MyPatient.java rename to examples/src/main/java/example/MyPatient.java diff --git a/hapi-fhir-base/examples/src/main/java/example/MyPatientUse.java b/examples/src/main/java/example/MyPatientUse.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/MyPatientUse.java rename to examples/src/main/java/example/MyPatientUse.java diff --git a/hapi-fhir-base/examples/src/main/java/example/Narrative.java b/examples/src/main/java/example/Narrative.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/Narrative.java rename to examples/src/main/java/example/Narrative.java diff --git a/hapi-fhir-base/examples/src/main/java/example/NarrativeGenerator.java b/examples/src/main/java/example/NarrativeGenerator.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/NarrativeGenerator.java rename to examples/src/main/java/example/NarrativeGenerator.java diff --git a/hapi-fhir-base/examples/src/main/java/example/PagingPatientProvider.java b/examples/src/main/java/example/PagingPatientProvider.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/PagingPatientProvider.java rename to examples/src/main/java/example/PagingPatientProvider.java diff --git a/hapi-fhir-base/examples/src/main/java/example/PagingServer.java b/examples/src/main/java/example/PagingServer.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/PagingServer.java rename to examples/src/main/java/example/PagingServer.java diff --git a/hapi-fhir-base/examples/src/main/java/example/QuickUsage.java b/examples/src/main/java/example/QuickUsage.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/QuickUsage.java rename to examples/src/main/java/example/QuickUsage.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ResourceRefs.java b/examples/src/main/java/example/ResourceRefs.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ResourceRefs.java rename to examples/src/main/java/example/ResourceRefs.java diff --git a/hapi-fhir-base/examples/src/main/java/example/RestfulObservationResourceProvider.java b/examples/src/main/java/example/RestfulObservationResourceProvider.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/RestfulObservationResourceProvider.java rename to examples/src/main/java/example/RestfulObservationResourceProvider.java diff --git a/hapi-fhir-base/examples/src/main/java/example/RestfulPatientResourceProvider.java b/examples/src/main/java/example/RestfulPatientResourceProvider.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/RestfulPatientResourceProvider.java rename to examples/src/main/java/example/RestfulPatientResourceProvider.java diff --git a/hapi-fhir-base/examples/src/main/java/example/RestfulPatientResourceProviderMore.java b/examples/src/main/java/example/RestfulPatientResourceProviderMore.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/RestfulPatientResourceProviderMore.java rename to examples/src/main/java/example/RestfulPatientResourceProviderMore.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ServerExceptionsExample.java b/examples/src/main/java/example/ServerExceptionsExample.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ServerExceptionsExample.java rename to examples/src/main/java/example/ServerExceptionsExample.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ServerInterceptors.java b/examples/src/main/java/example/ServerInterceptors.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ServerInterceptors.java rename to examples/src/main/java/example/ServerInterceptors.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ServerMetadataExamples.java b/examples/src/main/java/example/ServerMetadataExamples.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ServerMetadataExamples.java rename to examples/src/main/java/example/ServerMetadataExamples.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ServletExamples.java b/examples/src/main/java/example/ServletExamples.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ServletExamples.java rename to examples/src/main/java/example/ServletExamples.java diff --git a/hapi-fhir-base/examples/src/main/java/example/TagsExamples.java b/examples/src/main/java/example/TagsExamples.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/TagsExamples.java rename to examples/src/main/java/example/TagsExamples.java diff --git a/hapi-fhir-base/examples/src/main/java/example/ValidatorExamples.java b/examples/src/main/java/example/ValidatorExamples.java similarity index 100% rename from hapi-fhir-base/examples/src/main/java/example/ValidatorExamples.java rename to examples/src/main/java/example/ValidatorExamples.java diff --git a/hapi-fhir-base/examples/.settings/org.eclipse.core.resources.prefs b/hapi-fhir-base/examples/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index e9441bb123e..00000000000 --- a/hapi-fhir-base/examples/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding/=UTF-8 diff --git a/hapi-fhir-base/examples/.settings/org.eclipse.jdt.core.prefs b/hapi-fhir-base/examples/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 96bb6730c79..00000000000 --- a/hapi-fhir-base/examples/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,289 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -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_lambda_body=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=80 -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=3 -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_after_type_annotation=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_lambda_arrow=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_lambda_arrow=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=160 -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=space -org.eclipse.jdt.core.formatter.tabulation.size=3 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true -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 diff --git a/hapi-fhir-base/examples/.settings/org.eclipse.jdt.ui.prefs b/hapi-fhir-base/examples/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index fb44b15814d..00000000000 --- a/hapi-fhir-base/examples/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -formatter_profile=_examples-format -formatter_settings_version=12 diff --git a/hapi-fhir-base/examples/.settings/org.eclipse.m2e.core.prefs b/hapi-fhir-base/examples/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb2..00000000000 --- a/hapi-fhir-base/examples/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/pom.xml b/pom.xml index 2d7ebf36f0f..3a57da31431 100644 --- a/pom.xml +++ b/pom.xml @@ -540,6 +540,7 @@ hapi-fhir-base hapi-fhir-structures-dstu hapi-fhir-structures-dev + examples @@ -551,7 +552,6 @@ hapi-deployable-pom hapi-fhir-base hapi-fhir-oauth2 - hapi-fhir-base/examples hapi-fhir-base/testmindeps hapi-tinder-plugin hapi-tinder-test diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 5ae1263600b..07bab91a013 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -19,6 +19,15 @@ Remove unnessecary IOException from narrative generator API. Thanks to Petro Mykhailysyn for the pull request! + + Introduced a new + @ProvidesResources]]> annotation which can be added to + resource provider and servers to allow them to declare additional resource + classes they are able to serve. This is useful if you have a server which can + serve up multiple classes for the same resource type (e.g. a server that sometimes + returns a default Patient, but sometimes uses a custom subclass). + Thanks to Bill de Beaubien for the pull request! + diff --git a/src/site/site.xml b/src/site/site.xml index aa1b0d4d4f0..165665dd701 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -60,7 +60,7 @@ - + @@ -85,9 +85,9 @@ - - - + + + diff --git a/src/site/xdoc/doc_extensions.xml b/src/site/xdoc/doc_extensions.xml index 003c86bf4f7..2cf3f9dee25 100644 --- a/src/site/xdoc/doc_extensions.xml +++ b/src/site/xdoc/doc_extensions.xml @@ -2,7 +2,7 @@ - Extensions - HAPI FHIR + Profiles and Extensions - HAPI FHIR James Agnew @@ -13,19 +13,21 @@ -

- Extensions are a key part of the FHIR specification, providing a standardized - way of placing additional data in a resource. -

-

- All HAPI FHIR Resource objects support "undeclared extensions", - which are arbitrary extensions you can add. + Extensions are a key part of the FHIR specification, providing a standardized + way of placing additional data in a resource.

+ +

+ The simplest way to interact with extensions (i.e. to add them to resources you are creating, or + to read them from resources you are consuming) is to treat them as "undeclared extensions". + Undeclared extensions can be added to any of the built in FHIR resource types that come with HAPI-FHIR. +

+ @@ -56,8 +58,8 @@

- HAPI provides a few ways of getting data back out of - an extension value (i.e. from a received resource): + HAPI provides a few ways of accessing extension values in resources + which are receieved from other sources (i.e. downloaded by a client).