Merge branch 'master' into Eclipse_fix_from_james
This commit is contained in:
commit
9d203b111c
|
@ -0,0 +1,75 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.MetadataResource;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class KeyGenerator {
|
||||
|
||||
private String canonical;
|
||||
int i = 0;
|
||||
|
||||
public KeyGenerator(String canonical) {
|
||||
super();
|
||||
this.canonical = canonical;
|
||||
}
|
||||
|
||||
public void genId(DomainResource dr) {
|
||||
i++;
|
||||
dr.setId(getAcronym(dr.fhirType())+Integer.toString(i));
|
||||
if (dr instanceof MetadataResource) {
|
||||
MetadataResource mr = (MetadataResource) dr;
|
||||
mr.setUrl(Utilities.pathURL(canonical, mr.fhirType(), mr.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
private String getAcronym(String rt) {
|
||||
if ("CapabilityStatement".equals(rt)) {
|
||||
return "cs";
|
||||
}
|
||||
if ("ValueSet".equals(rt)) {
|
||||
return "vs";
|
||||
}
|
||||
if ("CodeSystem".equals(rt)) {
|
||||
return "cs";
|
||||
}
|
||||
if ("StructureDefinition".equals(rt)) {
|
||||
return "sd";
|
||||
}
|
||||
if ("StructureMap".equals(rt)) {
|
||||
return "sm";
|
||||
}
|
||||
if ("ConceptMap".equals(rt)) {
|
||||
return "cm";
|
||||
}
|
||||
if ("ImplementationGuide".equals(rt)) {
|
||||
return "";
|
||||
}
|
||||
if ("SearchParameter".equals(rt)) {
|
||||
return "sp";
|
||||
}
|
||||
if ("MessageDefinition".equals(rt)) {
|
||||
return "md";
|
||||
}
|
||||
if ("OperationDefinition".equals(rt)) {
|
||||
return "od";
|
||||
}
|
||||
if ("CompartmentDefinition".equals(rt)) {
|
||||
return "cd";
|
||||
}
|
||||
if ("GraphDefinition".equals(rt)) {
|
||||
return "gd";
|
||||
}
|
||||
if ("ExampleScenario".equals(rt)) {
|
||||
return "es";
|
||||
}
|
||||
if ("NamingSystem".equals(rt)) {
|
||||
return "ns";
|
||||
}
|
||||
if ("TerminologyCapabilities".equals(rt)) {
|
||||
return "tc";
|
||||
}
|
||||
return "r";
|
||||
}
|
||||
|
||||
}
|
|
@ -20,6 +20,7 @@ import org.junit.runners.Suite.SuiteClasses;
|
|||
BaseDateTimeTypeTest.class,
|
||||
OpenApiGeneratorTest.class,
|
||||
SnapShotGenerationTests.class})
|
||||
|
||||
public class AllR5Tests {
|
||||
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ import org.junit.runners.Suite.SuiteClasses;
|
|||
ValidationTestSuite.class,
|
||||
ValidationEngineTests.class,
|
||||
JsonSchemaTests.class,
|
||||
ProfileComparisonTests.class,
|
||||
CDAValidationTestCase.class})
|
||||
// CDAValidationTestCase.class,
|
||||
ProfileComparisonTests.class})
|
||||
public class AllR5ValidationTests {
|
||||
|
||||
}
|
||||
|
|
|
@ -2,11 +2,13 @@ package org.hl7.fhir.validation.tests;
|
|||
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.hl7.fhir.r5.conformance.ProfileComparer;
|
||||
import org.hl7.fhir.r5.model.FhirPublication;
|
||||
import org.hl7.fhir.r5.model.OperationOutcome;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.utils.KeyGenerator;
|
||||
import org.hl7.fhir.r5.model.OperationOutcome.OperationOutcomeIssueComponent;
|
||||
import org.hl7.fhir.r5.validation.ValidationEngine;
|
||||
import org.hl7.fhir.validation.tests.utilities.TestUtilities;
|
||||
|
@ -32,7 +34,7 @@ public class ProfileComparisonTests {
|
|||
|
||||
// ok now set up the comparison
|
||||
StructureDefinition sdL = ve.getContext().fetchResource(StructureDefinition.class, left);
|
||||
ProfileComparer pc = new ProfileComparer(ve.getContext());
|
||||
ProfileComparer pc = new ProfileComparer(ve.getContext(), new KeyGenerator("http://fhir.org/temp/"+UUID.randomUUID().toString().toLowerCase()));
|
||||
if (sdL == null) {
|
||||
System.out.println("Unable to locate left profile " +left);
|
||||
} else {
|
||||
|
@ -50,7 +52,6 @@ public class ProfileComparisonTests {
|
|||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
Desktop.getDesktop().browse(htmlFile.toURI());
|
||||
System.out.println("Done");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<slicing>
|
||||
<discriminator>
|
||||
<type value="value"/>
|
||||
<path value="extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').valueCode"/>
|
||||
<path value="extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').value"/>
|
||||
</discriminator>
|
||||
<rules value="open"/>
|
||||
</slicing>
|
||||
|
|
22
pom.xml
22
pom.xml
|
@ -150,12 +150,14 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<testFailureIgnore>false</testFailureIgnore>
|
||||
<argLine>-Xmx4096m</argLine>
|
||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||
<includes>
|
||||
<include>**/All*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/org/hl7/fhir/dstu2/**</exclude>
|
||||
<exclude>**/org/hl7/fhir/dstu3/**</exclude>
|
||||
<exclude>**/org/hl7/fhir/dstu2016may/**</exclude>
|
||||
<exclude>**/org/hl7/fhir/r4/**</exclude>
|
||||
<exclude>**/R3R4ConversionTests/**</exclude>
|
||||
<exclude>**/*dstu*/**</exclude>
|
||||
<exclude>**/*r4*/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -260,6 +262,16 @@
|
|||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<meminitial>512m</meminitial>
|
||||
<maxmem>4000m</maxmem>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -18,7 +18,11 @@ call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\build" --fileMask "*.xm
|
|||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\fhir-ig-publisher" --fileMask "*.xml" --find "%oldver%-SNAPSHOT" --replace "%newver%-SNAPSHOT"
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\latest-ig-publisher" --fileMask "*.html" --find "%oldver%" --replace "%newver%"
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\latest-ig-publisher" --fileMask "*.json" --find "%oldver%" --replace "%newver%"
|
||||
call mvn deploy
|
||||
call mvn clean deploy -Dmaven.test.redirectTestOutputToFile=false -DdeployAtEnd=true
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
GOTO DONE
|
||||
)
|
||||
|
||||
copy org.hl7.fhir.validation.cli\target\org.hl7.fhir.validation.cli-%newver%-SNAPSHOT.jar ..\latest-ig-publisher\org.hl7.fhir.validator.jar
|
||||
cd ..\latest-ig-publisher
|
||||
call git commit -a -m "Release new version %newver%-SNAPSHOT"
|
||||
|
@ -26,6 +30,7 @@ call git push origin master
|
|||
cd ..\org.hl7.fhir.core
|
||||
call python c:\tools\zulip-api\zulip\zulip\send.py --stream committers/notification --subject "java core" -m "New Java Core v%newver%-SNAPSHOT released. New Validator at https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation.cli&v=%newver%-SNAPSHOT&e=jar, and also deployed at https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.validator.jar" --config-file zuliprc
|
||||
|
||||
:DONE
|
||||
echo ===============================================================
|
||||
echo all done
|
||||
echo ===============================================================
|
||||
|
|
Loading…
Reference in New Issue