From ac7074ffdda736763662a812e40a437798347e0c Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 26 Sep 2017 19:05:53 -0400 Subject: [PATCH] More notes --- .../ca/uhn/fhir/jpa/config/TestR4Config.java | 78 +++++++++---------- src/site/xdoc/download.xml.vm | 62 +++++++++++++++ 2 files changed, 101 insertions(+), 39 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index e211d55f9ac..aba24d2be56 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -1,40 +1,40 @@ package ca.uhn.fhir.jpa.config; +import ca.uhn.fhir.jpa.dao.DaoConfig; +import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; +import ca.uhn.fhir.validation.ResultSeverityEnum; +import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; +import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; +import org.apache.commons.dbcp2.BasicDataSource; +import org.hibernate.jpa.HibernatePersistenceProvider; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import javax.persistence.EntityManagerFactory; +import javax.sql.DataSource; import java.sql.Connection; import java.sql.SQLException; import java.util.Properties; import java.util.concurrent.TimeUnit; -import javax.persistence.EntityManagerFactory; -import javax.sql.DataSource; - -import org.apache.commons.dbcp2.BasicDataSource; -import org.hibernate.jpa.HibernatePersistenceProvider; -import org.springframework.context.annotation.*; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; -import ca.uhn.fhir.validation.ResultSeverityEnum; -import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; - -import static org.junit.Assert.fail; +import static org.junit.Assert.*; @Configuration @EnableTransactionManagement() public class TestR4Config extends BaseJavaConfigR4 { static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestR4Config.class); + private Exception myLastStackTrace; @Bean() public DaoConfig daoConfig() { return new DaoConfig(); } - private Exception myLastStackTrace; - @Bean() public DataSource dataSource() { BasicDataSource retVal = new BasicDataSource() { @@ -54,31 +54,31 @@ public class TestR4Config extends BaseJavaConfigR4 { // System.exit(1); retVal = null; } - + try { throw new Exception(); } catch (Exception e) { myLastStackTrace = e; } - + return retVal; } private void logGetConnectionStackTrace() { - StringBuilder b = new StringBuilder(); - b.append("Last connection request stack trace:"); - for (StackTraceElement next : myLastStackTrace.getStackTrace()) { - b.append("\n "); - b.append(next.getClassName()); - b.append("."); - b.append(next.getMethodName()); - b.append("("); - b.append(next.getFileName()); - b.append(":"); - b.append(next.getLineNumber()); - b.append(")"); - } - ourLog.info(b.toString()); + StringBuilder b = new StringBuilder(); + b.append("Last connection request stack trace:"); + for (StackTraceElement next : myLastStackTrace.getStackTrace()) { + b.append("\n "); + b.append(next.getClassName()); + b.append("."); + b.append(next.getMethodName()); + b.append("("); + b.append(next.getFileName()); + b.append(":"); + b.append(next.getLineNumber()); + b.append(")"); + } + ourLog.info(b.toString()); } }; @@ -97,11 +97,11 @@ public class TestR4Config extends BaseJavaConfigR4 { retVal.setMaxTotal(maxThreads); DataSource dataSource = ProxyDataSourceBuilder - .create(retVal) - // .logQueryBySlf4j(SLF4JLogLevel.INFO, "SQL") - .logSlowQueryBySlf4j(10, TimeUnit.SECONDS) - .countQuery() - .build(); + .create(retVal) + .logQueryBySlf4j(SLF4JLogLevel.INFO, "SQL") + .logSlowQueryBySlf4j(10, TimeUnit.SECONDS) + .countQuery() + .build(); return dataSource; } diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm index dbb5112a1b2..b8e72abeccd 100644 --- a/src/site/xdoc/download.xml.vm +++ b/src/site/xdoc/download.xml.vm @@ -221,6 +221,68 @@ client framework which has been tailed specifically to run on Android. + Validation + + hapi-fhir-validator + + This module contains the FHIR Profile Validator, which is used to + validate resource instances against FHIR Profiles (StructureDefinitions, + ValueSets, CodeSystems, etc.). + + + + hapi-fhir-validation-resources-dstu2 + + This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, + and Schematrons for FHIR DSTU2 + + + + hapi-fhir-validation-resources-dstu2.1 + + This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, + and Schematrons for FHIR DSTU2.1 + + + + hapi-fhir-validation-resources-dstu3 + + This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, + and Schematrons for FHIR DSTU3 + + + + hapi-fhir-validation-resources-r4 + + This module contains the StructureDefinitions, ValueSets, CodeSystems, Schemas, + and Schematrons for FHIR R4 + + + Server + + hapi-fhir-server + + This module contains the HAPI FHIR Server framework, which can be used to + develop FHIR compliant servers against your own data storage layer. + + + + hapi-fhir-jpaserver-base + + This module contains the HAPI FHIR "JPA Server", which is a complete + FHIR server solution including a database and implementations of many + advanced FHIR server features. + + + + hapi-fhir-testpage-overlay + + This module contains the web based "testpage overlay", which is the + UI that powers our + Public Demo Server + and can also be added to your applications. + +