use of jdk.incubator.sql2.DataSource in project atlasmap by atlasmap.
the class JavaValidationServiceTest method generateDataSource.
protected DataSource generateDataSource(String uri, DataSourceType type, String docId) {
DataSource ds = new DataSource();
ds.setUri(uri);
ds.setDataSourceType(type);
ds.setId(docId);
return ds;
}
use of jdk.incubator.sql2.DataSource in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateDataSource.
private DataSource generateDataSource(String id, String uri, DataSourceType type) {
DataSource dataSource = new DataSource();
dataSource.setId(id);
dataSource.setUri(uri);
dataSource.setDataSourceType(type);
return dataSource;
}
use of jdk.incubator.sql2.DataSource in project atlasmap by atlasmap.
the class JsonJsonFlatMappingTest method generateDataSource.
protected DataSource generateDataSource(String uri, DataSourceType type) {
DataSource ds = new DataSource();
ds.setUri(uri);
ds.setDataSourceType(type);
return ds;
}
use of jdk.incubator.sql2.DataSource in project atlasmap by atlasmap.
the class XmlFieldReaderTest method mockDataSources.
private void mockDataSources(String docId, AtlasInternalSession session) {
AtlasMapping atlasMapping = mock(AtlasMapping.class);
List<DataSource> dataSources = new ArrayList<>();
XmlDataSource xmlDataSource = new XmlDataSource();
xmlDataSource.setId(docId);
xmlDataSource.setDataSourceType(DataSourceType.SOURCE);
XmlNamespaces atlasNamespaces = new XmlNamespaces();
XmlNamespace xmlNamespaceQ = new XmlNamespace();
xmlNamespaceQ.setAlias("q");
xmlNamespaceQ.setUri("http://www.example.com/q/");
XmlNamespace xmlNamespaceX = new XmlNamespace();
xmlNamespaceX.setAlias("");
xmlNamespaceX.setUri("http://www.example.com/x/");
XmlNamespace xmlNamespaceY = new XmlNamespace();
xmlNamespaceY.setAlias("y");
xmlNamespaceY.setUri("http://www.example.com/y/");
atlasNamespaces.getXmlNamespace().add(xmlNamespaceQ);
atlasNamespaces.getXmlNamespace().add(xmlNamespaceX);
atlasNamespaces.getXmlNamespace().add(xmlNamespaceY);
xmlDataSource.setXmlNamespaces(atlasNamespaces);
dataSources.add(xmlDataSource);
when(atlasMapping.getDataSource()).thenReturn(dataSources);
when(session.getMapping()).thenReturn(atlasMapping);
}
use of jdk.incubator.sql2.DataSource in project syndesis-qe by syndesisio.
the class AtlasMapperGenerator method processSources.
/**
* Gets list of output data shapes for preceding steps.
*
* @return list of datasources from preceding steps
*/
private List<DataSource> processSources() {
List<DataSource> sources = new ArrayList<>();
precedingSteps.stream().filter(s -> s.getStep().getAction().isPresent()).forEach(s -> {
DataShape outDataShape = s.getStep().getAction().get().getOutputDataShape().get();
// Steps with "ANY" or "NONE" are ignored for sources and only those that have proper datashape are used
if (outDataShape.getKind() != DataShapeKinds.ANY && outDataShape.getKind() != DataShapeKinds.NONE) {
sources.add(createDataSource(outDataShape, s, DataSourceType.SOURCE));
}
});
return sources;
}
Aggregations