Search in sources :

Example 1 with TypeDerivationRule

use of org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule in project org.hl7.fhir.core by hapifhir.

the class StructureDefinition method setProperty.

@Override
public Base setProperty(String name, Base value) throws FHIRException {
    if (name.equals("url")) {
        // UriType
        this.url = castToUri(value);
    } else if (name.equals("identifier")) {
        this.getIdentifier().add(castToIdentifier(value));
    } else if (name.equals("version")) {
        // StringType
        this.version = castToString(value);
    } else if (name.equals("name")) {
        // StringType
        this.name = castToString(value);
    } else if (name.equals("title")) {
        // StringType
        this.title = castToString(value);
    } else if (name.equals("status")) {
        value = new PublicationStatusEnumFactory().fromType(castToCode(value));
        // Enumeration<PublicationStatus>
        this.status = (Enumeration) value;
    } else if (name.equals("experimental")) {
        // BooleanType
        this.experimental = castToBoolean(value);
    } else if (name.equals("date")) {
        // DateTimeType
        this.date = castToDateTime(value);
    } else if (name.equals("publisher")) {
        // StringType
        this.publisher = castToString(value);
    } else if (name.equals("contact")) {
        this.getContact().add(castToContactDetail(value));
    } else if (name.equals("description")) {
        // MarkdownType
        this.description = castToMarkdown(value);
    } else if (name.equals("useContext")) {
        this.getUseContext().add(castToUsageContext(value));
    } else if (name.equals("jurisdiction")) {
        this.getJurisdiction().add(castToCodeableConcept(value));
    } else if (name.equals("purpose")) {
        // MarkdownType
        this.purpose = castToMarkdown(value);
    } else if (name.equals("copyright")) {
        // MarkdownType
        this.copyright = castToMarkdown(value);
    } else if (name.equals("keyword")) {
        this.getKeyword().add(castToCoding(value));
    } else if (name.equals("fhirVersion")) {
        // IdType
        this.fhirVersion = castToId(value);
    } else if (name.equals("mapping")) {
        this.getMapping().add((StructureDefinitionMappingComponent) value);
    } else if (name.equals("kind")) {
        value = new StructureDefinitionKindEnumFactory().fromType(castToCode(value));
        // Enumeration<StructureDefinitionKind>
        this.kind = (Enumeration) value;
    } else if (name.equals("abstract")) {
        // BooleanType
        this.abstract_ = castToBoolean(value);
    } else if (name.equals("contextType")) {
        value = new ExtensionContextEnumFactory().fromType(castToCode(value));
        // Enumeration<ExtensionContext>
        this.contextType = (Enumeration) value;
    } else if (name.equals("context")) {
        this.getContext().add(castToString(value));
    } else if (name.equals("contextInvariant")) {
        this.getContextInvariant().add(castToString(value));
    } else if (name.equals("type")) {
        // CodeType
        this.type = castToCode(value);
    } else if (name.equals("baseDefinition")) {
        // UriType
        this.baseDefinition = castToUri(value);
    } else if (name.equals("derivation")) {
        value = new TypeDerivationRuleEnumFactory().fromType(castToCode(value));
        // Enumeration<TypeDerivationRule>
        this.derivation = (Enumeration) value;
    } else if (name.equals("snapshot")) {
        // StructureDefinitionSnapshotComponent
        this.snapshot = (StructureDefinitionSnapshotComponent) value;
    } else if (name.equals("differential")) {
        // StructureDefinitionDifferentialComponent
        this.differential = (StructureDefinitionDifferentialComponent) value;
    } else
        return super.setProperty(name, value);
    return value;
}
Also used : PublicationStatusEnumFactory(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory)

Aggregations

PublicationStatusEnumFactory (org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory)1