Package org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils

Examples of org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils.Node


            NodeMapping existingMapping = mappingManager.findMapping(targetDe);
            if (existingMapping != null) {
                sourceExpr = existingMapping.getExpression();
            }
            if (m_sourceTreeComponent.m_highLightedNode != null && sourceExpr == "") {
                Node source = m_sourceTreeComponent.m_highLightedNode;
                if (!isValidSourceNodeForMapping(target, source)) {
                    return;
                }
                if (targetDe.length() == 0) {
                    Alert.error(this, "This target data element cannot be mapped.", "Illegal Mapping");
                    return;
                }
                if (source.isFolder()) {
                    showFormula("", targetDe, existingMapping, result);
                    return;
                }
                NodeMapping newMapping = addMappingImpl(source, target);
                if (showFormulaBuilder) {
View Full Code Here


            addMappingImpl(source, target);
        }
  }

    public void saveMaps() {
      Node targetRoot=m_targetTreeComponent.m_root;
      if(getCurrentMappings().size()>0) {
        saveGeneratorMappings(targetRoot);
      }
        m_Transformation.setMapList(getCurrentMappings());
        m_Transformation.setInvalidMappings(Arrays.asList(mappingManager.getInvalidMappings()));
View Full Code Here

    for(Node cs0:s.getChildren()){
        if (cs0.isHidden()) {
            continue;
        }
      Node cs=cs0;
      String sName=cs.getMappingName();
        for (Node ct:t.getChildren()) {
        if(ct.isPrecondition())continue;
                if(ct.isLinkKey() || ct.isPopulatedAutomatically() || ct.isIdentifier())continue;
                String tName=ct.getMappingName();
                if(similarNames(tName, sName)){
          if(!ct.isFolder()||!cs.isFolder()){
            if(ct.isFolder()){
              ct=ct.getValueNode();
            }
            else if(cs.isFolder()){
              cs=cs.getValueNode();
            }
          }
          if(addMapPairs(cs,ct, job))bChanged=true;
          break;
        }
View Full Code Here

  private Node source_saved;
    private NodeMapping mp_saved;
    private int iSource_saved, iTarget_saved;

    public void selectSourceNode(Node node, boolean bControlDown){
    Node source=(node!=null && node.isSourceUsed())?node:null;
    m_targetTreeComponent.updateUnderlineNodes(source);
    int nTarget=m_targetTreeComponent.m_selectedNodes.size();
    if(source!=null && nTarget>0 && m_bMappingMode==bControlDown){
      if(source==source_saved)iTarget_saved++;
      else iTarget_saved=0;
      iTarget_saved=iTarget_saved%nTarget;
      source_saved=source;
      Node target0=
        m_targetTreeComponent.m_selectedNodes.get(iTarget_saved);
      m_targetTreeComponent.showNode(target0,false);
    }
    m_sourceTreeComponent.showNode(node, true);
    }
View Full Code Here

            else {
                iSource_saved = 0;
            }
            iSource_saved = iSource_saved % nSource;
            mp_saved = mp;
            Node source0 = m_sourceTreeComponent.m_selectedNodes.get(iSource_saved);
            m_sourceTreeComponent.showNode(source0, false);
        }
        m_targetTreeComponent.showNode(node, true);
    }
View Full Code Here

    }

    public void updateMappingFlag(){
        m_targetTreeComponent.m_root.clearRequireMappingFlag();
        for (NodeMapping mp : mappingManager.getMappings()) {
            Node targetNode = m_targetTreeComponent.findNode(mp.getTargetPath());
            if (targetNode == null) {
                // This can happen if there are any invalid mappings, e.g. if the target
                // structure has been edited so that a mapped target node no longer
                // exists.
                // TODO: Loop over valid mappings only here?
                continue;
            }
            if (!targetNode.isFolder()) {
                // set all parent folders as require mapping since leaf has already mapped
                targetNode.setRequireMappingFolders();
                targetNode.setMapped();
            }
        }
        m_targetTreeComponent.m_root.updateRequireMappingFlag();
        m_targetTreeComponent.m_root.clearMappedHiddenTypes();
        m_sourceTreeComponent.m_root.clearMappedHiddenTypes();
View Full Code Here

     *            the <code>TestResult</code> to display
     */
    public void showTestResult(TestResult result) {
        BreakLocation location = result.getCurrentLocation();
        String targetNodePath = location.getTargetNodePath();
        Node node = m_targetTreeComponent.findNode_expandTreeIfNotExist(targetNodePath);
        if (node != null) {
            showFormulaBuilder(node, result);
        }
    }
View Full Code Here

    assert target!=null : "checkIfOneToOneMapping() should not be called with target being null.";
    if(!target.isFolder() && m_stackVector!=null && m_stackVector.size()==1){
      Token token=m_stackVector.get(0);
      if(token.m_id==Transform.t_DE){
        String str=token.m_str;
        Node source=m_sourceTreeComponent.findNode(str);
        if(source!=null && !source.isFolder()){
          setDataTypeWarning(target, source);
          return;
        }
      }
    }
View Full Code Here

      else tag=tag.substring(0,k);
      return lastIntanceNumber_map.get(node.m_deName+tag);
    }

    private static Node find_last_folder(Node node){
      Node parent=node.m_parent;
    String name=StringUtils.substringBefore(node.getName(), "#");
    Node last_folder=null;
      for(Node child: parent.getChildren()){
        if(child==node)break;
        if(child.isFolder() && name.equals(StringUtils.substringBefore(child.getName(), "#")))
          last_folder=child;
      }
View Full Code Here

          String sourceTag=lineItems.get(1);
          String targetPath=lineItems.get(2);
          if(targetPath==null||targetPath=="NULL")targetPath="";
          String targetTag=lineItems.get(3);
          if(targetTag==null || targetTag.equals("skip"))continue;
          Node target=m_targetTreeComponent.findNode("["+targetPath+"]");
          if(target==null && bIsFlatTarget){
            target=m_targetTreeComponent.m_root.getFirstChild();
          }
          if(target!=null && target.isMultipleMap()){ // this is the case of multiple mapping folder
            if(getLastIntanceNumber(lastIntanceNumber_map, target, targetTag)==null){
              Node last_folder=find_last_folder(target);
              Integer lastInstanceNumber=getLastIntanceNumber(lastIntanceNumber_map, last_folder, targetTag);
              if(lastInstanceNumber==null)lastInstanceNumber=0;
              moveInstances(last_folder, targetPath, targetTag, target, lastInstanceNumber);
              targetReassigned=true;
            }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.