@DatatypeDef(name = "idref") public class IdrefDt extends StringDt { private IElement myTarget; public IElement getTarget() { return myTarget; } public void setTarget(IElement theTarget) { myTarget = theTarget; } }
public RuntimeCompositeDatatypeDefinition(DatatypeDef theDef, Class<? extends ICompositeType> theImplementingClass, boolean theStandardType, FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) { super(theDef.name(), theImplementingClass, theStandardType, theContext, theClassToElementDefinitions); String resourceName = theDef.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theImplementingClass.getCanonicalName()); } mySpecialization = theDef.isSpecialization(); myProfileOfType = theDef.profileOf(); if (myProfileOfType.equals(IBaseDatatype.class)) { myProfileOfType = null; } }
private String scanPrimitiveDatatype(Class<? extends IPrimitiveType<?>> theClass, DatatypeDef theDatatypeDefinition) { ourLog.debug("Scanning resource class: {}", theClass.getName()); String resourceName = theDatatypeDefinition.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theClass.getCanonicalName()); if (!theDatatypeDefinition.isSpecialization()) { if (myVersion.isRi() && IDatatype.class.isAssignableFrom(theClass)) { ourLog.debug("Not adding non RI type {} to RI context", theClass);
continue; ourLog.info("Found datatype: {}", annotation.name()); String name = annotation.name(); if (datatypeTypes.containsKey(name)) { name = annotation.name() + ".2"; Class<?> clazz = Class.forName("org.hl7.fhir.utilities.xhtml.XhtmlNode"); DatatypeDef annotation = clazz.getAnnotation(DatatypeDef.class); ourLog.info("Found datatype: {}", annotation.name()); datatypeTypes.put(annotation.name(), clazz); } catch (ClassNotFoundException e1) { throw new MojoFailureException("Unknown", e1);
private String scanPrimitiveDatatype(Class<? extends IPrimitiveType<?>> theClass, DatatypeDef theDatatypeDefinition) { ourLog.debug("Scanning resource class: {}", theClass.getName()); String resourceName = theDatatypeDefinition.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theClass.getCanonicalName()); if (!theDatatypeDefinition.isSpecialization()) { if (myVersion.isRi() && IDatatype.class.isAssignableFrom(theClass)) { ourLog.debug("Not adding non RI type {} to RI context", theClass);
@DatatypeDef(name = "oid", profileOf=UriDt.class) public class OidDt extends UriDt { // TODO: implement restrictions }
public RuntimePrimitiveDatatypeDefinition(DatatypeDef theDef, Class<? extends IPrimitiveType<?>> theImplementingClass, boolean theStandardType) { super(theDef.name(), theImplementingClass, theStandardType); String resourceName = theDef.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theImplementingClass.getCanonicalName()); } mySpecialization = theDef.isSpecialization(); myProfileOfType = theDef.profileOf(); if (myProfileOfType.equals(IBaseDatatype.class)) { myProfileOfType = null; } determineNativeType(theImplementingClass); }
@DatatypeDef(name="DistanceDt") public class DistanceDt extends QuantityDt { }
public RuntimeCompositeDatatypeDefinition(DatatypeDef theDef, Class<? extends ICompositeType> theImplementingClass, boolean theStandardType, FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) { super(theDef.name(), theImplementingClass, theStandardType, theContext, theClassToElementDefinitions); String resourceName = theDef.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theImplementingClass.getCanonicalName()); } mySpecialization = theDef.isSpecialization(); myProfileOfType = theDef.profileOf(); if (myProfileOfType.equals(IBaseDatatype.class)) { myProfileOfType = null; } }
@DatatypeDef(name="AgeDt", profileOf=QuantityDt.class) public class AgeDt extends QuantityDt { }
public RuntimePrimitiveDatatypeDefinition(DatatypeDef theDef, Class<? extends IPrimitiveType<?>> theImplementingClass, boolean theStandardType) { super(theDef.name(), theImplementingClass, theStandardType); String resourceName = theDef.name(); if (isBlank(resourceName)) { throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource name: " + theImplementingClass.getCanonicalName()); } mySpecialization = theDef.isSpecialization(); myProfileOfType = theDef.profileOf(); if (myProfileOfType.equals(IBaseDatatype.class)) { myProfileOfType = null; } determineNativeType(theImplementingClass); }
@DatatypeDef(name="AgeDt") public class AgeDt extends QuantityDt { }
@DatatypeDef(name="CountDt", profileOf=QuantityDt.class) public class CountDt extends QuantityDt { }
@DatatypeDef(name="DistanceDt", profileOf=QuantityDt.class) public class DistanceDt extends QuantityDt { }
@DatatypeDef(name="CountDt") public class CountDt extends QuantityDt { }
@DatatypeDef(name="DurationDt", profileOf=QuantityDt.class) public class DurationDt extends QuantityDt { }
@DatatypeDef(name="Money", profileOf=QuantityDt.class) public class MoneyDt extends QuantityDt { }
@DatatypeDef(name="DurationDt") public class DurationDt extends QuantityDt { }
@DatatypeDef(name="Money") public class MoneyDt extends QuantityDt { }