001package org.hl7.fhir.validation.instance.utils;
002
003import java.util.ArrayList;
004import java.util.List;
005
006import org.hl7.fhir.r5.elementmodel.Element;
007
008public class EntrySummary {
009
010    Element entry;
011    Element resource;
012    List<EntrySummary> targets = new ArrayList<>();
013    private int index;
014
015    public Element getEntry() {
016        return entry;
017    }
018
019    public EntrySummary setEntry(Element entry) {
020        this.entry = entry;
021        return this;
022    }
023
024    public Element getResource() {
025        return resource;
026    }
027
028    public EntrySummary setResource(Element resource) {
029        this.resource = resource;
030        return this;
031    }
032
033    public List<EntrySummary> getTargets() {
034        return targets;
035    }
036
037    public EntrySummary setTargets(List<EntrySummary> targets) {
038        this.targets = targets;
039        return this;
040    }
041
042    public EntrySummary(int i, Element entry, Element resource) {
043      this.index = i;
044      this.entry = entry;
045      this.resource = resource;
046    }
047
048    public String dbg() {
049      return ""+index+"="+ entry.getChildValue("fullUrl")+" | "+resource.getIdBase() + "("+resource.fhirType()+")";
050    }
051
052    public String getIndex() {
053      return Integer.toString(index);
054    }
055}