From 722f08de13d3a1581519a1a217da5e065d17c673 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 2 Mar 2015 17:04:09 -0500 Subject: [PATCH] Site updates --- .../src/main/java/example/Dstu2Examples.java | 8 ++-- .../uhn/fhir/rest/annotation/Operation.java | 42 ++++++++++++++++ src/site/site.xml | 48 ++++++++++++------- src/site/xdoc/doc_dstu2.xml | 6 +-- 4 files changed, 79 insertions(+), 25 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java diff --git a/examples/src/main/java/example/Dstu2Examples.java b/examples/src/main/java/example/Dstu2Examples.java index 24688e70e45..21c52dc087b 100644 --- a/examples/src/main/java/example/Dstu2Examples.java +++ b/examples/src/main/java/example/Dstu2Examples.java @@ -21,8 +21,8 @@ public class Dstu2Examples { @SuppressWarnings("unused") public void getResourceTags() { // START SNIPPET: context - // Create a "dev" context, which supports DSTU2 - FhirContext ctx = FhirContext.forDev(); + // Create a DSTU2 context, which will use DSTU2 semantics + FhirContext ctx = FhirContext.forDstu2(); // This parser supports DSTU2 IParser parser = ctx.newJsonParser(); @@ -40,10 +40,10 @@ public class Dstu2Examples { @Override protected void initialize() throws ServletException { - // In your initialize method, assign a DEV FhirContext. This + // In your initialize method, assign a DSTU2 FhirContext. This // is all that is required in order to put the server // into DSTU2 mode - setFhirContext(FhirContext.forDev()); + setFhirContext(FhirContext.forDstu2()); // Then set resource providers as normal, and do any other // configuration you need to do. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java new file mode 100644 index 00000000000..acbe6033d73 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Operation.java @@ -0,0 +1,42 @@ +package ca.uhn.fhir.rest.annotation; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 - 2015 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.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + +/** + * RESTful method annotation used for a method which provides + * FHIR "operations". + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(value=ElementType.METHOD) +public @interface Operation { + + /** + * The name of the operation + */ + String name(); + +} diff --git a/src/site/site.xml b/src/site/site.xml index 0e25b6f8964..c86f3003184 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -70,11 +70,6 @@ - - - - - @@ -110,8 +105,8 @@ - - + + @@ -126,8 +121,14 @@ + + + + + + - + @@ -175,27 +176,38 @@ false - + + + 2 + + + + bootswatch-united sidebar Documentation|Get Help|Test Servers HAPI FHIR|Test Servers - JavaDoc|JXR + JavaDocs|JXR Get Help|Maven Reports - - - +
+ Hosted on GitHub + ]]>
+ + HAPI FHIR + ]]> + http://jamesagnew.github.io/hapi-fhir/ + diff --git a/src/site/xdoc/doc_dstu2.xml b/src/site/xdoc/doc_dstu2.xml index 3f4ea72593d..be898303fbf 100644 --- a/src/site/xdoc/doc_dstu2.xml +++ b/src/site/xdoc/doc_dstu2.xml @@ -60,13 +60,13 @@

As of HAPI FHIR 0.9, support for DSTU2 has been added to the library. Although upgrading - existing applications from DSTU1 to DSTU2 will not be completely painless, we have + existing applications from DSTU1 to DSTU2 will not be painless, we have tried as much as possible to make it easy.

First, support for DSTU2 capabilities has been added in a second optional dependency JAR which - you must add to your classpath. This JAR is called hapi-structures-dev-[version].jar. + you must add to your classpath. This JAR is called hapi-structures-dstu2-[version].jar. See the download page for information on adding this JAR.

@@ -78,7 +78,7 @@

- To create a DSTU2 context, simply use the "forDev" factory method on the FhirContext class: + To create a DSTU2 context, simply use the "forDstu2" factory method on the FhirContext class: