Search in sources :

Example 6 with StringList

use of io.atlasmap.v2.StringList in project atlasmap by atlasmap.

the class BaseMarshallerTest method generateCombineMapping.

protected AtlasMapping generateCombineMapping() {
    Actions actions = generateActions();
    StringList annotations = generateAnnotations();
    ModifierList modifierList = generateModifierList();
    StringList parameterizedTypes = generateParameterizedTypes();
    JavaField inputJavaField = generateJavaField(actions, annotations, modifierList, parameterizedTypes);
    JavaField inputJavaFieldB = generateJavaField(actions, annotations, modifierList, parameterizedTypes);
    JavaField outputJavaFieldA = generateJavaField(actions, annotations, modifierList, parameterizedTypes);
    Mapping fm = (Mapping) AtlasModelFactory.createMapping(MappingType.COMBINE);
    fm.getInputField().add(inputJavaField);
    fm.getInputField().add(inputJavaFieldB);
    fm.getOutputField().add(outputJavaFieldA);
    populateMapping(fm, MappingType.COMBINE, "MapPropertyFieldAlias", ",", ",");
    populateMappingString(fm, "description", "id", "lookupTableName", "strategy", "strategyClassName");
    AtlasMapping mapping = generateAtlasMapping();
    mapping.getMappings().getMapping().clear();
    mapping.getMappings().getMapping().add(fm);
    generateProperties(mapping);
    return mapping;
}
Also used : AtlasMapping(io.atlasmap.v2.AtlasMapping) Actions(io.atlasmap.v2.Actions) StringList(io.atlasmap.v2.StringList) Mapping(io.atlasmap.v2.Mapping) AtlasMapping(io.atlasmap.v2.AtlasMapping)

Example 7 with StringList

use of io.atlasmap.v2.StringList in project atlasmap by atlasmap.

the class BaseMarshallerTest method generateAtlasMapping.

protected AtlasMapping generateAtlasMapping() {
    AtlasMapping atlasMapping = AtlasModelFactory.createAtlasMapping();
    atlasMapping.setName("junit");
    generateDataSource(atlasMapping);
    generateLookupTables(atlasMapping);
    Actions actions = generateActions();
    StringList annotations = generateAnnotations();
    ModifierList modifierList = generateModifierList();
    StringList parameterizedTypes = generateParameterizedTypes();
    JavaField inputField = generateJavaField(actions, annotations, modifierList, parameterizedTypes);
    JavaField outputField = generateJavaField(actions, annotations, modifierList, parameterizedTypes);
    Mapping fm = AtlasModelFactory.createMapping(MappingType.MAP);
    fm.getInputField().add(inputField);
    fm.getOutputField().add(outputField);
    populateMapping(fm, MappingType.MAP, "MapPropertyFieldAlias", ",", ",");
    populateMappingString(fm, "description", "id", "lookupTableName", "strategy", "strategyClassName");
    atlasMapping.getMappings().getMapping().add(fm);
    generateProperties(atlasMapping);
    return atlasMapping;
}
Also used : AtlasMapping(io.atlasmap.v2.AtlasMapping) Actions(io.atlasmap.v2.Actions) StringList(io.atlasmap.v2.StringList) Mapping(io.atlasmap.v2.Mapping) AtlasMapping(io.atlasmap.v2.AtlasMapping)

Example 8 with StringList

use of io.atlasmap.v2.StringList in project atlasmap by atlasmap.

the class BaseMarshallerTest method generateAnnotations.

private StringList generateAnnotations() {
    StringList annotations = new StringList();
    annotations.getString().add("XmlAccessorType");
    annotations.getString().add("XmlType");
    return annotations;
}
Also used : StringList(io.atlasmap.v2.StringList)

Aggregations

StringList (io.atlasmap.v2.StringList)8 Actions (io.atlasmap.v2.Actions)4 AtlasMapping (io.atlasmap.v2.AtlasMapping)4 Mapping (io.atlasmap.v2.Mapping)4 JavaClass (io.atlasmap.java.v2.JavaClass)1 JavaField (io.atlasmap.java.v2.JavaField)1 ModifierList (io.atlasmap.java.v2.ModifierList)1 Annotation (java.lang.annotation.Annotation)1