本文整理汇总了Java中org.hl7.fhir.instance.model.api.IBaseElement类的典型用法代码示例。如果您正苦于以下问题:Java IBaseElement类的具体用法?Java IBaseElement怎么用?Java IBaseElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBaseElement类属于org.hl7.fhir.instance.model.api包,在下文中一共展示了IBaseElement类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveRuntimeDefinition
import org.hl7.fhir.instance.model.api.IBaseElement; //导入依赖的package包/类
@Override
// added support for IBaseElement types
protected BaseRuntimeElementCompositeDefinition<?> resolveRuntimeDefinition(IBase base) {
if (base instanceof IAnyResource) {
return getFhirContext().getResourceDefinition((IAnyResource) base);
}
else if (base instanceof IBaseBackboneElement || base instanceof IBaseDatatypeElement || base instanceof IBaseElement) {
return (BaseRuntimeElementCompositeDefinition<?>) getFhirContext().getElementDefinition(base.getClass());
}
else if (base instanceof ICompositeType) {
return (RuntimeCompositeDatatypeDefinition) getFhirContext().getElementDefinition(base.getClass());
}
throw new IllegalArgumentException(String.format("Unable to resolve the runtime definition for %s", base.getClass().getName()));
}
开发者ID:Discovery-Research-Network-SCCM,项目名称:FHIR-CQL-ODM-service,代码行数:16,代码来源:UsciitgFhirDataProviderHL7.java
示例2: attributeValue
import org.hl7.fhir.instance.model.api.IBaseElement; //导入依赖的package包/类
@Override
public void attributeValue(String theName, String theValue) throws DataFormatException {
if ("id".equals(theName)) {
if (myInstance instanceof IIdentifiableElement) {
((IIdentifiableElement) myInstance).setElementSpecificId((theValue));
} else if (myInstance instanceof IBaseElement) {
((IBaseElement) myInstance).setId(theValue);
} else if (myInstance instanceof IBaseResource) {
new IdDt(theValue).applyTo((IBaseResource) myInstance);
}
} else if ("url".equals(theName) && myInstance instanceof ExtensionDt) {
((ExtensionDt) myInstance).setUrl(theValue);
}
}
示例3: testElementHasInterface
import org.hl7.fhir.instance.model.api.IBaseElement; //导入依赖的package包/类
@Test
public void testElementHasInterface() {
assertTrue(IBaseElement.class.isAssignableFrom(Element.class));
}