Search in sources :

Example 81 with Element

use of org.hl7.fhir.r4b.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeValueSet.

protected void composeValueSet(Complex parent, String parentType, String name, ValueSet element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "ValueSet", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "ValueSet", "url", element.getUrlElement(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "ValueSet", "identifier", element.getIdentifier(), -1);
    if (element.hasVersionElement())
        composeString(t, "ValueSet", "version", element.getVersionElement(), -1);
    if (element.hasNameElement())
        composeString(t, "ValueSet", "name", element.getNameElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "ValueSet", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "ValueSet", "experimental", element.getExperimentalElement(), -1);
    if (element.hasPublisherElement())
        composeString(t, "ValueSet", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeValueSetValueSetContactComponent(t, "ValueSet", "contact", element.getContact().get(i), i);
    if (element.hasDateElement())
        composeDateTime(t, "ValueSet", "date", element.getDateElement(), -1);
    if (element.hasLockedDateElement())
        composeDate(t, "ValueSet", "lockedDate", element.getLockedDateElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "ValueSet", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getUseContext().size(); i++) composeCodeableConcept(t, "ValueSet", "useContext", element.getUseContext().get(i), i);
    if (element.hasImmutableElement())
        composeBoolean(t, "ValueSet", "immutable", element.getImmutableElement(), -1);
    if (element.hasRequirementsElement())
        composeString(t, "ValueSet", "requirements", element.getRequirementsElement(), -1);
    if (element.hasCopyrightElement())
        composeString(t, "ValueSet", "copyright", element.getCopyrightElement(), -1);
    if (element.hasExtensibleElement())
        composeBoolean(t, "ValueSet", "extensible", element.getExtensibleElement(), -1);
    if (element.hasCompose())
        composeValueSetValueSetComposeComponent(t, "ValueSet", "compose", element.getCompose(), -1);
    if (element.hasExpansion())
        composeValueSetValueSetExpansionComponent(t, "ValueSet", "expansion", element.getExpansion(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 82 with Element

use of org.hl7.fhir.r4b.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeQuestionnaireQuestionnaireItemOptionComponent.

protected void composeQuestionnaireQuestionnaireItemOptionComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemOptionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "option", name, element, index);
    if (element.hasValue())
        composeType(t, "Questionnaire", "value", element.getValue(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 83 with Element

use of org.hl7.fhir.r4b.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeListResourceListEntryComponent.

protected void composeListResourceListEntryComponent(Complex parent, String parentType, String name, ListResource.ListEntryComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "entry", name, element, index);
    if (element.hasFlag())
        composeCodeableConcept(t, "List", "flag", element.getFlag(), -1);
    if (element.hasDeletedElement())
        composeBoolean(t, "List", "deleted", element.getDeletedElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "List", "date", element.getDateElement(), -1);
    if (element.hasItem())
        composeReference(t, "List", "item", element.getItem(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 84 with Element

use of org.hl7.fhir.r4b.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeExpansionProfileDesignationIncludeDesignationComponent.

protected void composeExpansionProfileDesignationIncludeDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationIncludeDesignationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "designation", name, element, index);
    if (element.hasLanguageElement())
        composeCode(t, "ExpansionProfile", "language", element.getLanguageElement(), -1);
    if (element.hasUse())
        composeCoding(t, "ExpansionProfile", "use", element.getUse(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 85 with Element

use of org.hl7.fhir.r4b.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeAuditEventAuditEventAgentNetworkComponent.

protected void composeAuditEventAuditEventAgentNetworkComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentNetworkComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "network", name, element, index);
    if (element.hasAddressElement())
        composeString(t, "AuditEvent", "address", element.getAddressElement(), -1);
    if (element.hasTypeElement())
        composeEnum(t, "AuditEvent", "type", element.getTypeElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)659 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)488 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)486 ArrayList (java.util.ArrayList)240 FHIRException (org.hl7.fhir.exceptions.FHIRException)162 Element (org.hl7.fhir.r5.elementmodel.Element)98 IOException (java.io.IOException)97 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)91 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)84 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)84 Element (org.w3c.dom.Element)74 JsonElement (com.google.gson.JsonElement)62 FHIRFormatError (org.hl7.fhir.exceptions.FHIRFormatError)61 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)60 HashSet (java.util.HashSet)53 SpecialElement (org.hl7.fhir.r5.elementmodel.Element.SpecialElement)49 NamedElement (org.hl7.fhir.r5.elementmodel.ParserBase.NamedElement)48 Cell (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell)47 CommaSeparatedStringBuilder (org.hl7.fhir.utilities.CommaSeparatedStringBuilder)46 IndexedElement (org.hl7.fhir.validation.instance.utils.IndexedElement)43