use of org.talend.core.model.components.IODataComponentContainer in project tdi-studio-se by Talend.
the class DbMapComponent method addInput.
/*
* (non-Javadoc)
*
* @see org.talend.core.model.process.AbstractNode#addInput(org.talend.core.model.process.IConnection)
*/
@Override
public void addInput(IConnection connection) {
Object eData = getExternalEmfData();
if (eData == null) {
return;
}
DBMapData externalEmfData = (DBMapData) eData;
ExternalNodeUtils.prepareExternalNodeReadyToOpen(this);
IODataComponentContainer iContainer = getIODataComponents();
if (iContainer != null) {
mapperMain.initIOConnections(iContainer);
mapperMain.getMapperManager().initInternalData();
}
buildExternalData(externalEmfData);
}
use of org.talend.core.model.components.IODataComponentContainer in project tdi-studio-se by Talend.
the class DbMapComponent method removeInput.
/*
* (non-Javadoc)
*
* @see org.talend.core.model.process.AbstractNode#removeInput(org.talend.core.model.process.IConnection)
*/
@Override
public void removeInput(IConnection connection) {
Connection conn = null;
DBMapData externalEmfData = (DBMapData) getExternalEmfData();
InputTable toRemove = null;
for (InputTable inputTable : externalEmfData.getInputTables()) {
if (inputTable.getTableName() != null && inputTable.getTableName().equals(connection.getName())) {
toRemove = inputTable;
break;
}
}
if (toRemove != null) {
EList<InputTable> inputTableList = externalEmfData.getInputTables();
inputTableList.remove(toRemove);
ExternalNodeUtils.prepareExternalNodeReadyToOpen(getExternalNode());
IODataComponentContainer iContainer = getIODataComponents();
if (iContainer != null) {
mapperMain.initIOConnections(iContainer);
mapperMain.getMapperManager().initInternalData();
}
buildExternalData(externalEmfData);
}
}
use of org.talend.core.model.components.IODataComponentContainer in project tdi-studio-se by Talend.
the class RowGeneratorComponent method getIODataComponents.
@Override
public IODataComponentContainer getIODataComponents() {
IODataComponentContainer inAndOut = new IODataComponentContainer();
List<IODataComponent> outputs = inAndOut.getOuputs();
for (IConnection currentConnection : getOutgoingConnections()) {
if (currentConnection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
IODataComponent component = new IODataComponent(currentConnection, metadataListOut.get(0));
outputs.add(component);
}
}
return inAndOut;
}
use of org.talend.core.model.components.IODataComponentContainer in project tdi-studio-se by Talend.
the class WebServiceComponent method getIODataComponents.
@Override
public IODataComponentContainer getIODataComponents() {
IODataComponentContainer inAndOut = new IODataComponentContainer();
List<IODataComponent> outputs = inAndOut.getOuputs();
for (IConnection currentConnection : getOutgoingConnections()) {
if (currentConnection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
IODataComponent component = new IODataComponent(currentConnection, getMetadataList().get(1));
outputs.add(component);
}
}
List<IODataComponent> inputs = inAndOut.getInputs();
for (IConnection currentConnection : getIncomingConnections()) {
if (currentConnection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
IODataComponent component = new IODataComponent(currentConnection, inputMetadata);
inputs.add(component);
}
}
return inAndOut;
}
use of org.talend.core.model.components.IODataComponentContainer in project tdi-studio-se by Talend.
the class spssComponent method getIODataComponents.
@Override
public IODataComponentContainer getIODataComponents() {
IODataComponentContainer inAndOut = new IODataComponentContainer();
List<IODataComponent> outputs = inAndOut.getOuputs();
if (null != getOutgoingConnections()) {
for (IConnection currentConnection : getOutgoingConnections()) {
IODataComponent component = new IODataComponent(currentConnection, getMetadataList().get(0));
outputs.add(component);
}
}
List<IODataComponent> inputs = inAndOut.getInputs();
if (null != getIncomingConnections()) {
for (IConnection currentConnection : getIncomingConnections()) {
IODataComponent component = new IODataComponent(currentConnection, getMetadataList().get(0));
inputs.add(component);
}
}
return inAndOut;
}
Aggregations