Skip to content

Commit

Permalink
Add logical element
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamegrieve committed Dec 14, 2023
1 parent a5b1bba commit 6620931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class FetchedResource {
private String path; // where published
private Resource resource;
private Element element;
private Element logicalElement;
private JsonObject config;
private boolean validated;
private boolean validateAsResource;
Expand Down Expand Up @@ -291,5 +292,13 @@ public String getNameForErrors() {
public void setNameForErrors(String nameForErrors) {
this.nameForErrors = nameForErrors;
}

public Element getLogicalElement() {
return logicalElement;
}

public void setLogicalElement(Element logicalElement) {
this.logicalElement = logicalElement;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7097,7 +7097,7 @@ private void validate() throws Exception {

private void validate(FetchedFile f, FetchedResource r, Binary bin, List<ValidationMessage> errs, FhirFormat fmt, List<StructureDefinition> profiles) {
long ts = System.currentTimeMillis();
validator.validate(r.getElement(), errs, new ByteArrayInputStream(bin.getContent()), fmt, profiles);
r.setLogicalElement(validator.validate(r.getElement(), errs, new ByteArrayInputStream(bin.getContent()), fmt, profiles));
long tf = System.currentTimeMillis();
if (tf-ts > validationLogTime && validationLogTime > 0) {
reportLongValidation(f, r, tf-ts);
Expand Down

0 comments on commit 6620931

Please sign in to comment.