Search in sources :

Example 31 with Field

use of org.talend.hl7.Field in project atlasmap by atlasmap.

the class BaseMappingTest method getAtlasMappingWithLookupTables.

protected AtlasMapping getAtlasMappingWithLookupTables(String... names) {
    AtlasMapping mapping = this.getAtlasMappingFullValid();
    LookupTables lookupTables = new LookupTables();
    mapping.setLookupTables(lookupTables);
    for (String name : names) {
        LookupTable lookupTable = new LookupTable();
        lookupTable.setName(name);
        lookupTable.setDescription("desc_".concat(name));
        lookupTables.getLookupTable().add(lookupTable);
        Mapping lookupFieldMapping = AtlasModelFactory.createMapping(MappingType.LOOKUP);
        lookupFieldMapping.setDescription("field_desc_".concat(name));
        lookupFieldMapping.setLookupTableName(name);
        Field inputField = createInputJavaField("inputName");
        Field outputField = createInputJavaField("outputName");
        lookupFieldMapping.getInputField().add(inputField);
        lookupFieldMapping.getOutputField().add(outputField);
        mapping.getMappings().getMapping().add(lookupFieldMapping);
    }
    return mapping;
}
Also used : MockField(io.atlasmap.v2.MockField) Field(io.atlasmap.v2.Field) AtlasMapping(io.atlasmap.v2.AtlasMapping) LookupTables(io.atlasmap.v2.LookupTables) LookupTable(io.atlasmap.v2.LookupTable) Mapping(io.atlasmap.v2.Mapping) AtlasMapping(io.atlasmap.v2.AtlasMapping)

Example 32 with Field

use of org.talend.hl7.Field in project atlasmap by atlasmap.

the class BaseDefaultAtlasContextTest method populateSourceField.

protected Field populateSourceField(Mapping mapping, FieldType type, Object value, int index) {
    Field field = populateSourceField(mapping, type, value);
    field.setIndex(index);
    return field;
}
Also used : SimpleField(io.atlasmap.v2.SimpleField) Field(io.atlasmap.v2.Field)

Example 33 with Field

use of org.talend.hl7.Field in project atlasmap by atlasmap.

the class BaseDefaultAtlasContextTest method populateSourceField.

protected Field populateSourceField(Mapping mapping, String docId, FieldType type, Object value) {
    Field field = populateSourceField(mapping, type, value);
    field.setDocId(docId);
    return field;
}
Also used : SimpleField(io.atlasmap.v2.SimpleField) Field(io.atlasmap.v2.Field)

Example 34 with Field

use of org.talend.hl7.Field in project atlasmap by atlasmap.

the class BaseDefaultAtlasContextTest method populateSourceField.

protected Field populateSourceField(Mapping mapping, String docId, FieldType type, Object value, int index) {
    Field field = populateSourceField(mapping, type, value);
    field.setDocId(docId);
    field.setIndex(index);
    return field;
}
Also used : SimpleField(io.atlasmap.v2.SimpleField) Field(io.atlasmap.v2.Field)

Example 35 with Field

use of org.talend.hl7.Field in project atlasmap by atlasmap.

the class BaseDefaultAtlasContextTest method prepareTargetField.

protected Field prepareTargetField(Mapping mapping, String path) {
    Field field = new SimpleField();
    field.setPath(path);
    mapping.getOutputField().add(field);
    return field;
}
Also used : SimpleField(io.atlasmap.v2.SimpleField) Field(io.atlasmap.v2.Field) SimpleField(io.atlasmap.v2.SimpleField)

Aggregations

Field (io.atlasmap.v2.Field)60 JavaField (io.atlasmap.java.v2.JavaField)15 Mapping (io.atlasmap.v2.Mapping)15 AtlasMapping (io.atlasmap.v2.AtlasMapping)14 SimpleField (io.atlasmap.v2.SimpleField)14 BaseMapping (io.atlasmap.v2.BaseMapping)12 JavaEnumField (io.atlasmap.java.v2.JavaEnumField)11 Test (org.junit.Test)11 JsonField (io.atlasmap.json.v2.JsonField)8 LookupTable (io.atlasmap.v2.LookupTable)8 XmlField (io.atlasmap.xml.v2.XmlField)7 AtlasException (io.atlasmap.api.AtlasException)6 ConstantField (io.atlasmap.v2.ConstantField)6 AtlasConversionException (io.atlasmap.api.AtlasConversionException)5 JsonDocument (io.atlasmap.json.v2.JsonDocument)5 PropertyField (io.atlasmap.v2.PropertyField)5 ArrayList (java.util.ArrayList)5 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)4 AtlasModule (io.atlasmap.spi.AtlasModule)3 FieldType (io.atlasmap.v2.FieldType)3