if (isNotBlank(nextResource.getSourceReference().getReference())) { IdType id = new IdType(nextResource.getSourceReference().getReference()); if (isNotBlank(id.getResourceType())) { switch (id.getResourceType()) { case "CodeSystem": case "ConceptMap":
/** * Returns true if this IdType matches the given IdType in terms of resource * type and ID, but ignores the URL base */ @SuppressWarnings("deprecation") public boolean equalsIgnoreBase(IdType theId) { if (theId == null) { return false; } if (theId.isEmpty()) { return isEmpty(); } return ObjectUtils.equals(getResourceType(), theId.getResourceType()) && ObjectUtils.equals(getIdPart(), theId.getIdPart()) && ObjectUtils.equals(getVersionIdPart(), theId.getVersionIdPart()); }
@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 IdType toUnqualifiedVersionless() { if (isLocal() || isUrn()) { return new IdType(getValueAsString()); } return new IdType(getResourceType(), getIdPart()); }
@Override public IdType toVersionless() { if (isLocal() || isUrn()) { return new IdType(getValueAsString()); } return new IdType(getBaseUrl(), getResourceType(), getIdPart(), null); }
/** * Returns a new IdType containing this IdType's values but with no server * base URL if one is present in this IdType. For example, if this IdType * contains the ID "http://foo/Patient/1", this method will return a new * IdType containing ID "Patient/1". */ @Override public IdType toUnqualified() { if (isLocal() || isUrn()) { return new IdType(getValueAsString()); } return new IdType(getResourceType(), getIdPart(), getVersionIdPart()); }