Search in sources :

Example 26 with JsonField

use of io.atlasmap.json.v2.JsonField in project atlasmap by atlasmap.

the class JsonFieldWriterTest method write.

private void write(Path path, String fieldPath, Object testObject, FieldType fieldType) throws Exception, IOException, JsonGenerationException, JsonMappingException {
    JsonField field = AtlasJsonModelFactory.createJsonField();
    field.setPath(fieldPath);
    field.setValue(testObject);
    field.setFieldType(fieldType);
    write(field);
    writer.getObjectMapper().writeValue(path.toFile(), writer.getRootNode());
}
Also used : JsonField(io.atlasmap.json.v2.JsonField)

Example 27 with JsonField

use of io.atlasmap.json.v2.JsonField in project atlasmap by atlasmap.

the class JsonFieldWriterTest method writeString.

public void writeString(String path, String value) throws Exception {
    JsonField field = AtlasJsonModelFactory.createJsonField();
    field.setValue(value);
    field.setStatus(FieldStatus.SUPPORTED);
    field.setFieldType(FieldType.STRING);
    field.setPath(path);
    write(field);
}
Also used : JsonField(io.atlasmap.json.v2.JsonField)

Example 28 with JsonField

use of io.atlasmap.json.v2.JsonField in project atlasmap by atlasmap.

the class JsonJsonFieldActionsTest method createField.

protected Field createField(String path) {
    JsonField f = new JsonField();
    f.setPath(path);
    f.setFieldType(FieldType.STRING);
    return f;
}
Also used : JsonField(io.atlasmap.json.v2.JsonField)

Example 29 with JsonField

use of io.atlasmap.json.v2.JsonField in project atlasmap by atlasmap.

the class XmlJsonFlatMappingTest method generateJsonField.

protected JsonField generateJsonField(String path) {
    JsonField jsonField = AtlasJsonModelFactory.createJsonField();
    jsonField.setPath(path);
    return jsonField;
}
Also used : JsonField(io.atlasmap.json.v2.JsonField)

Example 30 with JsonField

use of io.atlasmap.json.v2.JsonField in project atlasmap by atlasmap.

the class JsonJsonFlatMappingTest method generateJsonField.

protected JsonField generateJsonField(String path) {
    JsonField field = AtlasJsonModelFactory.createJsonField();
    field.setPath(path);
    return field;
}
Also used : JsonField(io.atlasmap.json.v2.JsonField)

Aggregations

JsonField (io.atlasmap.json.v2.JsonField)63 Test (org.junit.Test)45 JsonDocument (io.atlasmap.json.v2.JsonDocument)30 JsonComplexType (io.atlasmap.json.v2.JsonComplexType)15 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)10 Head (io.atlasmap.spi.AtlasInternalSession.Head)8 AtlasMapping (io.atlasmap.v2.AtlasMapping)7 Mapping (io.atlasmap.v2.Mapping)7 JsonNode (com.fasterxml.jackson.databind.JsonNode)4 Field (io.atlasmap.v2.Field)4 Validation (io.atlasmap.v2.Validation)4 AtlasMappingUtil (io.atlasmap.core.AtlasMappingUtil)2 DefaultAtlasConversionService (io.atlasmap.core.DefaultAtlasConversionService)2 AtlasJsonModelFactory (io.atlasmap.json.v2.AtlasJsonModelFactory)2 AtlasModuleDetail (io.atlasmap.spi.AtlasModuleDetail)2 AtlasModuleMode (io.atlasmap.spi.AtlasModuleMode)2 AtlasModelFactory (io.atlasmap.v2.AtlasModelFactory)2 DataSource (io.atlasmap.v2.DataSource)2 DataSourceType (io.atlasmap.v2.DataSourceType)2 FieldType (io.atlasmap.v2.FieldType)2