Search in sources :

Example 1 with CSVWriter

use of org.hl7.fhir.dstu3.utils.formats.CSVWriter in project org.hl7.fhir.core by hapifhir.

the class ProfileUtilities method generateCsvs.

// generate a CSV representation of the structure definition
public void generateCsvs(OutputStream dest, StructureDefinition structure, boolean asXml) throws IOException, DefinitionException, Exception {
    if (!structure.hasSnapshot())
        throw new DefinitionException("needs a snapshot");
    CSVWriter csv = new CSVWriter(dest, structure, asXml);
    for (ElementDefinition child : structure.getSnapshot().getElement()) {
        csv.processElement(child);
    }
    csv.dump();
}
Also used : CSVWriter(org.hl7.fhir.dstu3.utils.formats.CSVWriter) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) ElementDefinition(org.hl7.fhir.dstu3.model.ElementDefinition)

Example 2 with CSVWriter

use of org.hl7.fhir.dstu3.utils.formats.CSVWriter in project org.hl7.fhir.core by hapifhir.

the class ProfileUtilities method generateCsvs.

// generate a CSV representation of the structure definition
public void generateCsvs(OutputStream dest, StructureDefinition structure, boolean asXml) throws IOException, DefinitionException, Exception {
    if (!structure.hasSnapshot())
        throw new DefinitionException(context.formatMessage(I18nConstants.NEEDS_A_SNAPSHOT));
    CSVWriter csv = new CSVWriter(dest, structure, asXml);
    for (ElementDefinition child : structure.getSnapshot().getElement()) {
        csv.processElement(child);
    }
    csv.dump();
}
Also used : CSVWriter(org.hl7.fhir.r4b.utils.formats.CSVWriter) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) ElementDefinition(org.hl7.fhir.r4b.model.ElementDefinition)

Example 3 with CSVWriter

use of org.hl7.fhir.dstu3.utils.formats.CSVWriter in project org.hl7.fhir.core by hapifhir.

the class ProfileUtilities method generateCsvs.

// generate a CSV representation of the structure definition
public void generateCsvs(OutputStream dest, StructureDefinition structure, boolean asXml) throws IOException, DefinitionException, Exception {
    if (!structure.hasSnapshot())
        throw new DefinitionException("needs a snapshot");
    CSVWriter csv = new CSVWriter(dest, structure, asXml);
    for (ElementDefinition child : structure.getSnapshot().getElement()) {
        csv.processElement(child);
    }
    csv.dump();
}
Also used : CSVWriter(org.hl7.fhir.r4.utils.formats.CSVWriter) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) ElementDefinition(org.hl7.fhir.r4.model.ElementDefinition)

Example 4 with CSVWriter

use of org.hl7.fhir.dstu3.utils.formats.CSVWriter in project org.hl7.fhir.core by hapifhir.

the class ProfileUtilities method generateCsvs.

// generate a CSV representation of the structure definition
public void generateCsvs(OutputStream dest, StructureDefinition structure, boolean asXml) throws IOException, DefinitionException, Exception {
    if (!structure.hasSnapshot())
        throw new DefinitionException(context.formatMessage(I18nConstants.NEEDS_A_SNAPSHOT));
    CSVWriter csv = new CSVWriter(dest, structure, asXml);
    for (ElementDefinition child : structure.getSnapshot().getElement()) {
        csv.processElement(child);
    }
    csv.dump();
}
Also used : CSVWriter(org.hl7.fhir.r5.utils.formats.CSVWriter) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) ElementDefinition(org.hl7.fhir.r5.model.ElementDefinition)

Aggregations

DefinitionException (org.hl7.fhir.exceptions.DefinitionException)4 ElementDefinition (org.hl7.fhir.dstu3.model.ElementDefinition)1 CSVWriter (org.hl7.fhir.dstu3.utils.formats.CSVWriter)1 ElementDefinition (org.hl7.fhir.r4.model.ElementDefinition)1 CSVWriter (org.hl7.fhir.r4.utils.formats.CSVWriter)1 ElementDefinition (org.hl7.fhir.r4b.model.ElementDefinition)1 CSVWriter (org.hl7.fhir.r4b.utils.formats.CSVWriter)1 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)1 CSVWriter (org.hl7.fhir.r5.utils.formats.CSVWriter)1