Documentation and samples
This commit is contained in:
parent
23de3c53b7
commit
c01e2021d0
|
@ -22,11 +22,23 @@ package ca.uhn.fhir.model.api;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
import ca.uhn.fhir.model.dstu.composite.ContainedDt;
|
||||
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
|
||||
/**
|
||||
* This interface is the parent interface for all FHIR Resource definition
|
||||
* classes. Classes implementing this interface should be annotated
|
||||
* with the {@link ResourceDef @ResourceDef} annotation.
|
||||
*
|
||||
* <p>
|
||||
* Note that this class is a part of HAPI's model API, used to define
|
||||
* structure classes. Users will often interact with this interface, but
|
||||
* should not need to implement it directly.
|
||||
* <p>
|
||||
*/
|
||||
public interface IResource extends ICompositeElement {
|
||||
|
||||
/**
|
||||
|
@ -113,8 +125,11 @@ public interface IResource extends ICompositeElement {
|
|||
void setResourceMetadata(Map<ResourceMetadataKeyEnum<?>, Object> theMap);
|
||||
|
||||
/**
|
||||
* Returns a String representing the name of this Resource
|
||||
* @return the name of this Resource
|
||||
* Returns a String representing the name of this Resource. This return
|
||||
* value is not used for anything by HAPI itself, but is provided as a
|
||||
* convenience to developers using the API.
|
||||
*
|
||||
* @return the name of this resource, e.g. "Patient", or "Observation"
|
||||
*/
|
||||
String getResourceName();
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ public class CompleteResourceProviderTest {
|
|||
@Test
|
||||
public void testUpdateRejectsInvalidTypes() throws InterruptedException {
|
||||
deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system", "testUpdateRejectsInvalidTypes");
|
||||
|
||||
|
||||
Patient p1 = new Patient();
|
||||
p1.addIdentifier("urn:system", "testUpdateRejectsInvalidTypes");
|
||||
p1.addName().addFamily("Tester").addGiven("testUpdateRejectsInvalidTypes");
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.classpath
|
||||
.project
|
||||
/target/
|
|
@ -0,0 +1,91 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!--
|
||||
HAPI projects use the Sonatype OSS parent project.
|
||||
You do not need to use this in your own projects.
|
||||
-->
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>7</version>
|
||||
</parent>
|
||||
|
||||
<groupId>ca.uhn.hapi.example</groupId>
|
||||
<artifactId>hapi-fhir-example-skeleton-project</artifactId>
|
||||
<version>0.8-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HAPI FHIR Example - Skeleton Project</name>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>oss-snapshots</id>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- This dependency includes the core HAPI-FHIR classes -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>0.8-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- At least one "structures" JAR must also be included -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<version>0.8-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
HAPI-FHIR uses Logback for logging support. The logback library is included
|
||||
automatically by Maven as a part of the hapi-fhir-base dependency, but you
|
||||
also need to include a logging library. Logback is used here, but log4j
|
||||
would also be fine.
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
<!--
|
||||
Tell Maven which Java source version you want to use
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
This plugin is just a part of the HAPI internal build process, you do not
|
||||
need to incude it in your own projects
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>false</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
package ca.uhn.fhir.example;
|
||||
|
||||
public class Example01 {
|
||||
|
||||
public static void main(String[] theArgs) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue