本文整理汇总了Java中ca.uhn.fhir.model.primitive.IdDt.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java IdDt.isEmpty方法的具体用法?Java IdDt.isEmpty怎么用?Java IdDt.isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca.uhn.fhir.model.primitive.IdDt
的用法示例。
在下文中一共展示了IdDt.isEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: history
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public <T extends IResource> Bundle history(final Class<T> theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit) {
String resourceName = theType != null ? toResourceName(theType) : null;
String id = theIdDt != null && theIdDt.isEmpty() == false ? theIdDt.getValue() : null;
HttpGetClientInvocation invocation = HistoryMethodBinding.createHistoryInvocation(resourceName, id, theSince, theLimit);
if (isKeepResponses()) {
myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
}
BundleResponseHandler binding = new BundleResponseHandler(theType);
Bundle resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse);
return resp;
}
示例2: createValidateInvocation
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
public static HttpPostClientInvocation createValidateInvocation(IResource theResource, IdDt theId, FhirContext theContext) {
StringBuilder urlExtension = new StringBuilder();
urlExtension.append(theContext.getResourceDefinition(theResource).getName());
urlExtension.append('/');
urlExtension.append(Constants.PARAM_VALIDATE);
if (theId != null && theId.isEmpty() == false) {
String id = theId.getValue();
urlExtension.append('/');
urlExtension.append(id);
}
// TODO: is post correct here?
HttpPostClientInvocation retVal = new HttpPostClientInvocation(theContext, theResource, urlExtension.toString());
return retVal;
}
示例3: createForcedIdIfNeeded
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
protected void createForcedIdIfNeeded(ResourceTable entity, IdDt id) {
if (id.isEmpty() == false && id.hasIdPart()) {
if (isValidPid(id)) {
return;
}
ForcedId fid = new ForcedId();
fid.setForcedId(id.getIdPart());
fid.setResource(entity);
entity.setForcedId(fid);
}
}
示例4: populateResourceMetadata
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
private void populateResourceMetadata() {
if (myEntry.getResource() == null) {
return;
}
IdDt id = myEntry.getId();
if (id != null && id.isEmpty() == false) {
myEntry.getResource().setId(id);
}
Map<ResourceMetadataKeyEnum<?>, Object> metadata = myEntry.getResource().getResourceMetadata();
if (myEntry.getPublished().isEmpty() == false) {
ResourceMetadataKeyEnum.PUBLISHED.put(myEntry.getResource(), myEntry.getPublished());
}
if (myEntry.getUpdated().isEmpty() == false) {
ResourceMetadataKeyEnum.UPDATED.put(myEntry.getResource(), myEntry.getUpdated());
}
ResourceMetadataKeyEnum.TITLE.put(myEntry.getResource(), myEntry.getTitle().getValue());
if (myEntry.getCategories().isEmpty() == false) {
TagList tagList = new TagList();
for (Tag next : myEntry.getCategories()) {
tagList.add(next);
}
ResourceMetadataKeyEnum.TAG_LIST.put(myEntry.getResource(), tagList);
}
if (!myEntry.getLinkSelf().isEmpty()) {
String linkSelfValue = myEntry.getLinkSelf().getValue();
IdDt linkSelf = new IdDt(linkSelfValue);
myEntry.getResource().setId(linkSelf);
if (isNotBlank(linkSelf.getVersionIdPart())) {
metadata.put(ResourceMetadataKeyEnum.VERSION_ID, linkSelf);
}
}
if (!myEntry.getLinkAlternate().isEmpty()) {
ResourceMetadataKeyEnum.LINK_ALTERNATE.put(myEntry.getResource(), myEntry.getLinkAlternate().getValue());
}
if (!myEntry.getLinkSearch().isEmpty()) {
ResourceMetadataKeyEnum.LINK_SEARCH.put(myEntry.getResource(), myEntry.getLinkSearch().getValue());
}
}
示例5: invokeServer
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public IBundleProvider invokeServer(RequestDetails theRequest, Object[] theMethodParams) throws InvalidRequestException, InternalErrorException {
if (myIdParamIndex != null) {
theMethodParams[myIdParamIndex] = theRequest.getId();
}
Object response = invokeServerMethod(theMethodParams);
final IBundleProvider resources = toResourceList(response);
/*
* We wrap the response so we can verify that it has the ID and version set,
* as is the contract for history
*/
return new IBundleProvider() {
@Override
public InstantDt getPublished() {
return resources.getPublished();
}
@Override
public List<IResource> getResources(int theFromIndex, int theToIndex) {
List<IResource> retVal = resources.getResources(theFromIndex, theToIndex);
int index = theFromIndex;
for (IResource nextResource : retVal) {
if (nextResource.getId() == null || isBlank(nextResource.getId().getIdPart())) {
throw new InternalErrorException("Server provided resource at index " + index + " with no ID set (using IResource#setId(IdDt))");
}
if (isBlank(nextResource.getId().getVersionIdPart())) {
IdDt versionId = (IdDt) ResourceMetadataKeyEnum.VERSION_ID.get(nextResource);
if (versionId == null || versionId.isEmpty()) {
throw new InternalErrorException("Server provided resource at index " + index + " with no Version ID set (using IResource#setId(IdDt))");
}
}
index++;
}
return retVal;
}
@Override
public int size() {
return resources.size();
}
@Override
public Integer preferredPageSize() {
return null;
}
};
}