private IBaseExtension createEmptyModifierExtension(IBaseHasModifierExtensions theBaseHasModifierExtensions, String theUrl) { return (IBaseExtension) theBaseHasModifierExtensions.addModifierExtension().setUrl(theUrl); }
public HttpPatchClientInvocation(FhirContext theContext, IIdType theId, String theContentType, String theContents) { super(theContext); myUrlPath = theId.toUnqualifiedVersionless().getValue(); myContentType = theContentType; myContents = theContents; }
@Override public String toString() { return value.getValueAsString(); } };
/** * Constructor which creates an error message based on a given resource ID * * @param theResourceId The ID of the resource that could not be found */ public ResourceGoneException(IIdType theResourceId) { super(STATUS_CODE, "Resource " + (theResourceId != null ? theResourceId.getValue() : "") + " is gone/deleted"); }
protected String getPreferredId(IBaseResource theResource, String theId) { if (isNotBlank(theId)) { return theId; } return theResource.getIdElement().getIdPart(); }
private ArrayList<TagDefinition> toTagList(IBaseMetaType theMeta) { ArrayList<TagDefinition> retVal = new ArrayList<TagDefinition>(); for (IBaseCoding next : theMeta.getTag()) { retVal.add(new TagDefinition(TagTypeEnum.TAG, next.getSystem(), next.getCode(), next.getDisplay())); } for (IBaseCoding next : theMeta.getSecurity()) { retVal.add(new TagDefinition(TagTypeEnum.SECURITY_LABEL, next.getSystem(), next.getCode(), next.getDisplay())); } for (IPrimitiveType<String> next : theMeta.getProfile()) { retVal.add(new TagDefinition(TagTypeEnum.PROFILE, BaseHapiFhirDao.NS_JPA_PROFILE, next.getValue(), null)); } return retVal; }
/** * Constructor * * @param theRequestDetails The request details to wrap * @param theId The ID of the resource being created (note that the ID should have the resource type populated) */ public ActionRequestDetails(RequestDetails theRequestDetails, IIdType theId) { this(theRequestDetails, theId.getResourceType(), theId); }
public QuantityParam setValue(IPrimitiveType<BigDecimal> theValue) { myValue = null; if (theValue != null) { myValue = theValue.getValue(); } return this; }
@Override public IOperationUnnamed onInstance(IIdType theId) { myId = theId.toVersionless(); return this; }
private Date getLastModified(IBaseResource theRes) { return theRes.getMeta().getLastUpdated(); }
public static boolean isEmpty(IBase... theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.length; i++) { IBase next = theElements[i]; if (next != null && !next.isEmpty()) { return false; } } return true; }
private IBaseExtension createEmptyExtension(IBaseHasExtensions theBaseHasExtensions, String theUrl) { return (IBaseExtension) theBaseHasExtensions.addExtension().setUrl(theUrl); }
public void setIdElement(IIdType theIdElement) { myIdElement = null; if (theIdElement != null) { myIdElement = theIdElement.toUnqualifiedVersionless().getValue(); } }
public void setPayloadId(IIdType thePayloadId) { myPayloadId = null; if (thePayloadId != null) { myPayloadId = thePayloadId.getValue(); } } }
@Override protected String doEncode(IPrimitiveType<?> theString) { return theString.getValueAsString(); }
public QuantityParam setSystem(IPrimitiveType<String> theSystem) { mySystem = null; if (theSystem != null) { mySystem = theSystem.getValue(); } return this; }
public static boolean isEmpty(IElement... theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.length; i++) { IBase next = theElements[i]; if (next != null && !next.isEmpty()) { return false; } } return true; }
public HttpDeleteClientInvocation(FhirContext theContext, IIdType theId) { super(theContext); myUrlPath = theId.toUnqualifiedVersionless().getValue(); }
public void setId(IIdType theId) { myId = null; if (theId != null) { myId = theId.getValue(); } }
private static String createErrorMessage(IIdType theId) { return "Resource " + (theId != null ? theId.getValue() : "") + " is not known"; }