@Override public List<IBaseResource> toListOfResources() { ArrayList<IBaseResource> retVal = new ArrayList<IBaseResource>(); for (BundleEntryComponent next : myBundle.getEntry()) { if (next.getResource() != null) { retVal.add(next.getResource()); } else if (next.getResponse().getLocationElement().isEmpty() == false) { IdType id = new IdType(next.getResponse().getLocation()); String resourceType = id.getResourceType(); if (isNotBlank(resourceType)) { IAnyResource res = (IAnyResource) myContext.getResourceDefinition(resourceType).newInstance(); res.setId(id); retVal.add(res); } } } return retVal; }
@Override public List<IBaseResource> toListOfResources() { ArrayList<IBaseResource> retVal = new ArrayList<IBaseResource>(); for (BundleEntryComponent next : myBundle.getEntry()) { if (next.getResource() != null) { retVal.add(next.getResource()); } else if (next.getResponse().getLocationElement().isEmpty() == false) { IdType id = new IdType(next.getResponse().getLocation()); String resourceType = id.getResourceType(); if (isNotBlank(resourceType)) { IAnyResource res = (IAnyResource) myContext.getResourceDefinition(resourceType).newInstance(); res.setId(id); retVal.add(res); } } } return retVal; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -892481550: return getStatusElement(); case 1901043637: return getLocationElement(); case 3123477: return getEtagElement(); case 1959003007: return getLastModifiedElement(); case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Resource default: return super.makeProperty(hash, name); } }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -892481550: return getStatusElement(); case 1901043637: return getLocationElement(); case 3123477: return getEtagElement(); case 1959003007: return getLastModifiedElement(); case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Resource default: return super.makeProperty(hash, name); } }