WIP: selector widget
This commit is contained in:
parent
b6894435d3
commit
1ff9bd5915
|
@ -24,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
*/
|
*/
|
||||||
public class CliContext {
|
public class CliContext {
|
||||||
|
|
||||||
|
@JsonProperty("baseEngine")
|
||||||
|
private String baseEngine = null;
|
||||||
@JsonProperty("doNative")
|
@JsonProperty("doNative")
|
||||||
private boolean doNative = false;
|
private boolean doNative = false;
|
||||||
@JsonProperty("hintAboutNonMustSupport")
|
@JsonProperty("hintAboutNonMustSupport")
|
||||||
|
@ -156,7 +158,17 @@ public class CliContext {
|
||||||
|
|
||||||
@JsonProperty("bestPracticeLevel")
|
@JsonProperty("bestPracticeLevel")
|
||||||
private BestPracticeWarningLevel bestPracticeLevel = BestPracticeWarningLevel.Warning;
|
private BestPracticeWarningLevel bestPracticeLevel = BestPracticeWarningLevel.Warning;
|
||||||
|
|
||||||
|
@JsonProperty("baseEngine")
|
||||||
|
public String getBaseEngine() {
|
||||||
|
return baseEngine;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("baseEngine")
|
||||||
|
public CliContext setBaseEngine(String baseEngine) {
|
||||||
|
this.baseEngine = baseEngine;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty("map")
|
@JsonProperty("map")
|
||||||
public String getMap() {
|
public String getMap() {
|
||||||
|
@ -745,7 +757,8 @@ public class CliContext {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
CliContext that = (CliContext) o;
|
CliContext that = (CliContext) o;
|
||||||
return doNative == that.doNative &&
|
return Objects.equals(baseEngine, that.baseEngine) &&
|
||||||
|
doNative == that.doNative &&
|
||||||
hintAboutNonMustSupport == that.hintAboutNonMustSupport &&
|
hintAboutNonMustSupport == that.hintAboutNonMustSupport &&
|
||||||
recursive == that.recursive &&
|
recursive == that.recursive &&
|
||||||
doDebug == that.doDebug &&
|
doDebug == that.doDebug &&
|
||||||
|
@ -798,7 +811,7 @@ public class CliContext {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(doNative, extensions, hintAboutNonMustSupport, recursive, doDebug, assumeValidRestReferences, canDoNative, noInternalCaching,
|
return Objects.hash(baseEngine, doNative, extensions, hintAboutNonMustSupport, recursive, doDebug, assumeValidRestReferences, canDoNative, noInternalCaching,
|
||||||
noExtensibleBindingMessages, noInvariants, displayWarnings, wantInvariantsInMessages, map, output, outputSuffix, htmlOutput, txServer, sv, txLog, txCache, mapLog, lang, srcLang, tgtLang, fhirpath, snomedCT,
|
noExtensibleBindingMessages, noInvariants, displayWarnings, wantInvariantsInMessages, map, output, outputSuffix, htmlOutput, txServer, sv, txLog, txCache, mapLog, lang, srcLang, tgtLang, fhirpath, snomedCT,
|
||||||
targetVer, igs, questionnaireMode, level, profiles, sources, inputs, mode, locale, locations, crumbTrails, forPublication, showTimes, allowExampleUrls, outputStyle, jurisdiction, noUnicodeBiDiControlChars, watchMode, watchScanDelay, watchSettleTime, bestPracticeLevel,
|
targetVer, igs, questionnaireMode, level, profiles, sources, inputs, mode, locale, locations, crumbTrails, forPublication, showTimes, allowExampleUrls, outputStyle, jurisdiction, noUnicodeBiDiControlChars, watchMode, watchScanDelay, watchSettleTime, bestPracticeLevel,
|
||||||
htmlInMarkdownCheck, allowDoubleQuotesInFHIRPath, checkIPSCodes);
|
htmlInMarkdownCheck, allowDoubleQuotesInFHIRPath, checkIPSCodes);
|
||||||
|
@ -807,7 +820,8 @@ public class CliContext {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CliContext{" +
|
return "CliContext{" +
|
||||||
"doNative=" + doNative +
|
" baseEngine=" + baseEngine +
|
||||||
|
", doNative=" + doNative +
|
||||||
", extensions=" + extensions +
|
", extensions=" + extensions +
|
||||||
", hintAboutNonMustSupport=" + hintAboutNonMustSupport +
|
", hintAboutNonMustSupport=" + hintAboutNonMustSupport +
|
||||||
", recursive=" + recursive +
|
", recursive=" + recursive +
|
||||||
|
|
|
@ -88,6 +88,8 @@ public class ValidationService {
|
||||||
return baseEngines.get(key);
|
return baseEngines.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasBaseEngineForKey(String key) { return baseEngines.containsKey(key); }
|
||||||
|
|
||||||
public ValidationService() {
|
public ValidationService() {
|
||||||
sessionCache = new PassiveExpiringSessionCache();
|
sessionCache = new PassiveExpiringSessionCache();
|
||||||
runDate = new SimpleDateFormat("hh:mm:ss", new Locale("en", "US")).format(new Date());
|
runDate = new SimpleDateFormat("hh:mm:ss", new Locale("en", "US")).format(new Date());
|
||||||
|
@ -460,9 +462,9 @@ public class ValidationService {
|
||||||
System.out.println("No such cached session exists for session id " + sessionId + ", re-instantiating validator.");
|
System.out.println("No such cached session exists for session id " + sessionId + ", re-instantiating validator.");
|
||||||
}
|
}
|
||||||
ValidationEngine validator;
|
ValidationEngine validator;
|
||||||
if (cliContext.isCheckIPSCodes()) {
|
if (hasBaseEngineForKey(cliContext.getBaseEngine())) {
|
||||||
System.out.println("Getting base engine: IPS");
|
System.out.println("Getting base engine: IPS");
|
||||||
validator = new ValidationEngine(baseEngines.get("ips"));
|
validator = new ValidationEngine(getBaseEngine(cliContext.getBaseEngine()));
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Building new validator engine.");
|
System.out.println("Building new validator engine.");
|
||||||
validator = buildValidationEngine(cliContext, definitions, tt);
|
validator = buildValidationEngine(cliContext, definitions, tt);
|
||||||
|
|
Loading…
Reference in New Issue