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 final FillDataElementKit fillDataElementKit;

    public DataElementFactoryImpl(TreeMapperSourceTree sourceTree, TransformationExpressionSource source) {
        this.sourceTree = sourceTree;
        Node generator = sourceTree.getGenerator(source.getTargetNode());
        fillDataElementKit = new FillDataElementKit(sourceTree.m_DocReader, generator);
    }
View Full Code Here


        this.treeMapper = treeMapper;
    }
   
    public NodeMapping newMapping(Mapping m) {
        String targetPath = m.getTargetPath().toString();
        Node targetLoopNode = treeMapper.m_targetTreeComponent.getTlnDtdRoot(targetPath);
        return new NodeMapping(treeMapper, m, targetLoopNode);
    }
View Full Code Here

        }
        return nodes;
    }

    private List<Node> collectMultiPartCandidates(String[] parts) {
        Node parent = findDescendant(tree.m_root, parts[0]);
        if (parent == null) {
            return null;
        }
        for (int n = 1; n < parts.length - 1; ++n) {
            parent = findChild(parent, parts[n]);
View Full Code Here

        String nodeName = getName(root);
        if (nodeName.equals(name)) {
            return root;
        }
        for (Node child : root.getChildren()) {
            Node match = findDescendant(child, name);
            if (match != null) {
                return match;
            }
        }
        return null;
View Full Code Here

            return completeMultipleNodes(fragment, lastFragment, candidates);
        }
    }

    private static Completion completeSingleNode(String fragment, String lastFragment, List<Node> candidates) {
        Node node = candidates.get(0);
        String name = getName(node);
        if (name.length() > lastFragment.length()) {
            String completed = fragment + name.substring(lastFragment.length());
            if (node.isFolder()) {
                if (node.isLoopNode()) {
                    completed += ".";
                } else {
                    completed += "$";
                }
            }
View Full Code Here

    NodeMapping(TreeMapper treeMapper, Mapping mapping, Node targetLoopNode) {
        this.treeMapper = treeMapper;
        this.mapping = mapping;
        this.targetLoopNode = targetLoopNode;
        targetOrder = calculateTargetOrder();
        Node node = treeMapper.findTargetNode(mapping.getTargetPath().toString());
        // If this represents an invalid mapping, targetNode may be null. This can happen
        // when loading in a transformation in which the target structure has been edited
        // such that a mapped target node is no longer present in the structure.
        if (node != null) {
            node.setTargetMappedFlag(true);
            treeMapper.m_targetTreeComponent.repaint();
        }
    }
View Full Code Here

        try {
            String targetPath = mapping.getTargetPath().toString();
            if (targetLoopNode != null) {
                return targetLoopNode.m_order * 10000 + treeMapper.findTargetNode(targetPath).m_order;
            }
            Node targetNode = treeMapper.findTargetNode(targetPath);
            // See comment in constructor when targetNode can be null
            if (targetNode != null) {
                return targetNode.m_order;
            }
        } catch (Exception e) {
View Full Code Here

        List<Node> nodes = analyzeCandidates(candidates, parts);
        return nodes;
    }

    private List<Node> collectMatchesForEmptyFragment() {
        Node root = tree.m_root;
        if (!root.hasChildren()) {
            return Lists.newArrayList();
        }
        root = root.getChildAt(0);
        if (isFlat()) {
            return Lists.newArrayList(root.getChildren());
        } else {
            return Lists.newArrayList(root);
        }
    }
View Full Code Here

                return collectMatchingNodesFromFlatTree(first);
            } else {
                return collectRootIfNameMatch(first);
            }
        } else {
            Node parent = findStartNode(first, isFlat());
            if (parent == null) {
                return Collections.emptyList();
            }
            for (int index = 1; index < parts.length - 1; ++index) {
                parent = findChild(parent, parts[index]);
View Full Code Here

    }

    private List<Node> collectRootIfNameMatch(String fragment) {
        List<Node> nodes = Lists.newArrayList();
        if (tree.m_root.hasChildren()) {
            Node root = tree.m_root.getChildAt(0);
            String name = getName(root);
            if (name.startsWith(fragment)) {
                nodes.add(root);
            }
        }
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.