001package org.hl7.fhir.validation.cli.model;
002
003import org.hl7.fhir.r5.model.ImplementationGuide;
004import org.hl7.fhir.r5.model.OperationOutcome;
005import org.hl7.fhir.r5.model.StructureDefinition;
006
007public class ScanOutputItem {
008  private String ref;
009  private ImplementationGuide ig;
010  private StructureDefinition profile;
011  private OperationOutcome outcome;
012  private String id;
013
014  public ScanOutputItem(String ref, ImplementationGuide ig, StructureDefinition profile, OperationOutcome outcome) {
015    super();
016    this.ref = ref;
017    this.ig = ig;
018    this.profile = profile;
019    this.outcome = outcome;
020  }
021
022  public String getRef() {
023    return ref;
024  }
025
026  public ImplementationGuide getIg() {
027    return ig;
028  }
029
030  public StructureDefinition getProfile() {
031    return profile;
032  }
033
034  public OperationOutcome getOutcome() {
035    return outcome;
036  }
037
038  public String getId() {
039    return id;
040  }
041
042  public void setId(String id) {
043    this.id = id;
044  }
045
046  public String getTitle() {
047    if (profile != null)
048      return "Validate " + ref + " against " + profile.present() + " (" + profile.getUrl() + ")";
049    if (ig != null)
050      return "Validate " + ref + " against global profile specified in " + ig.present() + " (" + ig.getUrl() + ")";
051    return "Validate " + ref + " against FHIR Spec";
052  }
053}