当前位置: 首页>>代码示例>>Java>>正文


Java IdDt.isEmpty方法代码示例

本文整理汇总了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;

}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:15,代码来源:GenericClient.java

示例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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:16,代码来源:ValidateMethodBinding.java

示例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);
	}
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:12,代码来源:BaseFhirDao.java

示例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());
	}

}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:45,代码来源:ParserState.java

示例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;
		}
	};
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:52,代码来源:HistoryMethodBinding.java


注:本文中的ca.uhn.fhir.model.primitive.IdDt.isEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。