Search in sources :

Example 46 with DataSource

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

the class AtlasEndpointTest method noConversionIfXmlTargetDataSource.

@Test(expected = ComparisonFailure.class)
public void noConversionIfXmlTargetDataSource() throws Exception {
    final List<DataSource> dataSources = new ArrayList<>();
    final DataSource dataSource = new DataSource();
    dataSource.setDataSourceType(DataSourceType.TARGET);
    dataSource.setUri("atlas:xml:SomeType");
    dataSources.add(dataSource);
    perform(dataSources, null, null, true);
}
Also used : ArrayList(java.util.ArrayList) DataSource(io.atlasmap.v2.DataSource) Test(org.junit.Test)

Example 47 with DataSource

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

the class AtlasEndpointTest method doConversionIfXmlDataSource.

@Test
public void doConversionIfXmlDataSource() throws Exception {
    final List<DataSource> dataSources = new ArrayList<>();
    final DataSource dataSource = new DataSource();
    dataSource.setDataSourceType(DataSourceType.SOURCE);
    dataSource.setUri("atlas:xml:SomeType");
    dataSources.add(dataSource);
    perform(dataSources, null, null, true);
}
Also used : ArrayList(java.util.ArrayList) DataSource(io.atlasmap.v2.DataSource) Test(org.junit.Test)

Example 48 with DataSource

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

the class XmlJsonFlatMappingTest method generateDataSource.

protected DataSource generateDataSource(String uri, DataSourceType type) {
    DataSource ds = new DataSource();
    ds.setUri(uri);
    ds.setDataSourceType(type);
    return ds;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Example 49 with DataSource

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

the class XmlJavaFlatMappingTest method generateDataSource.

protected DataSource generateDataSource(String uri, DataSourceType type) {
    DataSource ds = new DataSource();
    ds.setUri(uri);
    ds.setDataSourceType(type);
    return ds;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Example 50 with DataSource

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

the class JsonJavaFlatMappingTest method generateDataSource.

protected DataSource generateDataSource(String uri, DataSourceType type) {
    DataSource ds = new DataSource();
    ds.setUri(uri);
    ds.setDataSourceType(type);
    return ds;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Aggregations

DataSource (io.atlasmap.v2.DataSource)54 AtlasMapping (io.atlasmap.v2.AtlasMapping)16 ArrayList (java.util.ArrayList)14 Mapping (io.atlasmap.v2.Mapping)11 XmlDataSource (io.atlasmap.xml.v2.XmlDataSource)10 Mappings (io.atlasmap.v2.Mappings)8 JsonDataSource (io.atlasmap.json.v2.JsonDataSource)7 Test (org.junit.Test)7 File (java.io.File)6 AtlasContext (io.atlasmap.api.AtlasContext)5 AtlasSession (io.atlasmap.api.AtlasSession)5 JavaField (io.atlasmap.java.v2.JavaField)5 AtlasException (io.atlasmap.api.AtlasException)4 XmlNamespaces (io.atlasmap.xml.v2.XmlNamespaces)4 ByteArrayInputStream (java.io.ByteArrayInputStream)4 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 AtlasModule (io.atlasmap.spi.AtlasModule)3 HashMap (java.util.HashMap)3 Exchange (org.apache.camel.Exchange)3