@@ -0,0 +1,2442 @@
+package dataMapper.diagram.custom.configuration.operators;%0A%0Aimport dataMapper.Constant;%0Aimport dataMapper.Element;%0Aimport dataMapper.Operator;%0Aimport dataMapper.OutNode;%0Aimport dataMapper.SchemaDataType;%0Aimport dataMapper.TreeNode;%0Aimport dataMapper.diagram.custom.configuration.function.AssignmentStatement;%0A%0Apublic class ConstantTransformer implements OperatorsTransformer %7B%0A%0A%09private static final String INDEX = %22%5Bi%5D%22;%0A%09%0A%09@Override%0A%09public AssignmentStatement transform(Operator operator) %7B%0A%09%09StringBuilder assign = new StringBuilder();%0A%09%09Constant constant = (Constant) operator;%0A%09%09assign.append(getTreeHierarchy(getOutputElementParent(operator), getOutputRoot(operator))).append(%22.%22).append(getOutpuElement(operator).getName()).append(%22 = %5C%22%22).append(constant.getConstantValue()).append(%22%5C%22;%5Cn%22);                                           %0A%09%09AssignmentStatement statment = new AssignmentStatement();%0A%09%09statment.setStatement(assign.toString());%0A%09%09return statment;%0A%09%7D%0A%0A%09@Override%0A%09public TreeNode getOutputElementParent(Operator operator) %7B%0A%09%09if(getOutpuElement(operator) != null)%7B%0A%09%09%09return getOutpuElement(operator).getFieldParent();%0A%09%09%7D%0A%09%09%0A%09%09return null;%0A%09%7D%0A%09%0A%09private Element getOutpuElement(Operator operator) %7B%0A%09%09if(operator.getBasicContainer().getRightContainer().getRightConnectors().size() !=0)%7B%0A%09%09%09return operator.getBasicContainer().getRightContainer().getRightConnectors().get(0).getOutNode().getOutgoingLink().get(0).getInNode().getElementParent();%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public TreeNode getInputElementParent(Operator operator) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%09%0A%09private String getTreeHierarchy(TreeNode tree, TreeNode parent) %7B%0A%09%09StringBuilder hierarchy = new StringBuilder();%0A%0A%09%09while (!(tree.equals(parent))) %7B%0A%09%09%09if(tree.getSchemaDataType().equals(SchemaDataType.ARRAY))%7B%0A%09%09%09%09hierarchy.insert(0, (tree.getName()+INDEX));%0A%09%09%09%7Delse%7B%0A%09%09%09%09%0A%09%09%09%09hierarchy.insert(0, tree.getName());%0A%09%09%09%7D%0A%09%09%09hierarchy.insert(0, %22.%22);%0A%09%09%09tree = tree.getFieldParent();%0A%09%09%7D%0A%09%09%0A%09%09if(tree.getSchemaDataType().equals(SchemaDataType.ARRAY))%7B%0A%09%09%09hierarchy.insert(0, (tree.getName()+INDEX));%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09hierarchy.insert(0, tree.getName());%0A%09%09%7D%0A%0A%09%09return hierarchy.toString();%0A%0A%09%7D%0A%09%0A%09private TreeNode getOutputRoot(Operator operator)%7B%0A%09%09TreeNode tree = getOutputElementParent(operator);%0A%09%09while(tree.getFieldParent() != null)%7B%0A%09%09%09tree = tree.getFieldParent();%0A%09%09%09System.out.println();%0A%09%09%7D%0A%09%09%0A%09%09return tree;%0A%09%7D%0A%0A%7D%0A

add ConstantTransformer class