本文整理匯總了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));
}