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

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


            }
        });
    }

    private void suggestMappings() {
        Node selectedNode = tree.m_highLightedNode;
        if (!isMappable(selectedNode)) {
            return;
        }
        SuggestionsModel model = createModel(selectedNode);
        MappingSuggestionsDialog dialog = createDialog(model);
View Full Code Here


        @Override
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                        boolean cellHasFocus) {
            super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            if (value instanceof Node) {
                Node node = (Node) value;
                setText(getDisplayString(node));
                setToolTipText(node.m_deName);
            } else {
                setToolTipText(null);
            }
View Full Code Here

            }
            return this;
        }

        private String getDisplayString(Node node) {
            Node root = model.getCommonAncestor();
            String s = (root == null) ? node.m_deName : getRelativePath(node, root);
            return StringUtils.substringBeforeLast(s, "$");
        }
View Full Code Here

        EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                TreeMapper mapper = page.getTreeMapper();
                Node sourceNode = getSourceNode(mapper);
                Node targetNode = getTargetNode(mapper);
                if (sourceNode != null && targetNode != null) {
                    Future<?> mapJob = mapper.doStraightMappings(sourceNode, targetNode);
                    savePageAfterMappingIsDone(mapJob);
                }
            }
View Full Code Here

            if ((currentResult == null) || !params.equals(currentSearchParams)) {
                currentSearchParams = params;
                currentResult = new NodeSearchResult(params, tree);
                resultCallback.handle(currentResult);
            }
            Node node = currentResult.nextNode();
            if (node != null) {
                tree.highlightSearchResult(node);
            }
        }
View Full Code Here

      } else if(treeMapper.m_sourceTreeComponent.m_flat&&sourcePathListSize==1){
        targetLoopNode.setSourcePath(targetNode.m_mappingKits.getGenerator());
          setStatusSilently(RESOLVED);
      } else if(sourcePathListSize==1){
        targetLoopNode.setSourcePath(targetNode.m_mappingKits.getGenerator());
        Node parent=targetLoopNode.getRootLoopNode();
        if(parent!=null){
          String parentSourcePath=parent.getSourcePath();
          if((parentSourcePath != null) && parentSourcePath.equals(Node.c_blankString))parentSourcePath="";
          if(parentSourcePath!=null&&!targetLoopNode.getSourcePath().startsWith(parentSourcePath)){
                  setStatusSilently(CONFLICT_PATH);
            parent.setSourcePath(null);
            targetLoopNode.setSourcePath(null);
          } else {
                  setStatusSilently(DEFAUlT_PATH);
          }
        } else {
View Full Code Here

    }

    private void highlightMapping(MappingSearchMatch match) {
        NodeMapping mapping = match.getMapping();
        treeMapper.getMappingManager().changeHighLighted(mapping);
        Node node = treeMapper.findTargetNode(mapping.getTargetPath());
        if (node != null) {
            treeMapper.m_targetTreeComponent.showNode(node, true);
        }
    }
View Full Code Here

     */
    public boolean apply(NodeMapping mapping, String targetDE) {
        this.mapping = mapping;
        this.targetDE = targetDE;
        String expr = ui.getTranslatedExpression();
        Node target = treeMapper.findTargetNode(targetDE);
        if (isEmptyMapping(expr)) {
            saveEmptyFormula(expr, target);
        } else {
            saveNonEmptyFormula(expr, target);
        }
View Full Code Here

        }
    }

    private void saveNonEmptyFormula(String expr, Node target) {
        String err = treeMapper.verifyExpression(expr);
        Node targetRootLoopNode = target.getRootLoopNode();
        boolean hasFixedGenerator = targetRootLoopNode.m_mappingKits.hasFixedGenerator();
        String fixedGenerator = hasFixedGenerator ? targetRootLoopNode.m_mappingKits.getGenerator() : null;
        if (err.isEmpty()) {
            saveFormulaThatAppearsToBeValid(expr, fixedGenerator);
        } else {
View Full Code Here

        TreeComponent sourceTree = mapper.m_sourceTreeComponent;
        return getRootTable(sourceTree);
    }

    private Node getRootTable(TreeComponent tree) {
        Node root = tree.m_root;
        if (root.getChildCount() == 1) {
            return root.getChildAt(0);
        }
        return null;
    }
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.