mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-02 09:29:13 +00:00
autofix slice names
This commit is contained in:
parent
06d6d9452a
commit
33d5462bcd
@ -660,6 +660,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||||||
List<ValidationMessage> msgs = new ArrayList<ValidationMessage>();
|
List<ValidationMessage> msgs = new ArrayList<ValidationMessage>();
|
||||||
List<String> errors = new ArrayList<String>();
|
List<String> errors = new ArrayList<String>();
|
||||||
ProfileUtilities pu = new ProfileUtilities(this, msgs, this);
|
ProfileUtilities pu = new ProfileUtilities(this, msgs, this);
|
||||||
|
pu.setAutoFixSliceNames(true);
|
||||||
pu.setThrowException(false);
|
pu.setThrowException(false);
|
||||||
if (sd.getDerivation() == TypeDerivationRule.CONSTRAINT) {
|
if (sd.getDerivation() == TypeDerivationRule.CONSTRAINT) {
|
||||||
pu.sortDifferential(sd, p, p.getUrl(), errors, true);
|
pu.sortDifferential(sd, p, p.getUrl(), errors, true);
|
||||||
@ -670,7 +671,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||||||
pu.generateSnapshot(sd, p, p.getUrl(), Utilities.extractBaseUrl(sd.getUserString("path")), p.getName());
|
pu.generateSnapshot(sd, p, p.getUrl(), Utilities.extractBaseUrl(sd.getUserString("path")), p.getName());
|
||||||
for (ValidationMessage msg : msgs) {
|
for (ValidationMessage msg : msgs) {
|
||||||
if ((!ignoreProfileErrors && msg.getLevel() == ValidationMessage.IssueSeverity.ERROR) || msg.getLevel() == ValidationMessage.IssueSeverity.FATAL)
|
if ((!ignoreProfileErrors && msg.getLevel() == ValidationMessage.IssueSeverity.ERROR) || msg.getLevel() == ValidationMessage.IssueSeverity.FATAL)
|
||||||
throw new DefinitionException("Profile "+p.getName()+" ("+p.getUrl()+"). Error generating snapshot: "+msg.getMessage());
|
throw new DefinitionException("Profile "+p.getName()+" ("+p.getUrl()+"), element "+msg.getLocation()+". Error generating snapshot: "+msg.getMessage());
|
||||||
}
|
}
|
||||||
if (!p.hasSnapshot())
|
if (!p.hasSnapshot())
|
||||||
throw new FHIRException("Profile "+p.getName()+" ("+p.getUrl()+"). Error generating snapshot");
|
throw new FHIRException("Profile "+p.getName()+" ("+p.getUrl()+"). Error generating snapshot");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user