Package org.jitterbit.integration.structure.mapping

Examples of org.jitterbit.integration.structure.mapping.Mapping


      targetTreeComponent=treeMapperMigration.m_oldTargetTree;
    m_table=Maps.newHashMap();
    List<String> mapList=old.getMapList();
    Transform transform=new Transform();
    for (String line : mapList) {
      Mapping m = MapStringFormat.parse(line);
      String targetDE=m.getTargetPath().toString();
      String expr=m.getExpression();
      Node target=targetTreeComponent.findNode_expandTreeIfNotExist(targetDE);
      if(target!=null)m_mappedTargetSet.add(target);
      Set<Node> delist=Utils.getSourceExpressionList(sourceTreeComponent, expr, transform);
      if(delist==null)delist=Sets.newHashSet();
      m_mappedSourceSet.addAll(delist);
View Full Code Here


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

        private Map<NodePath, ExpressionChange> createExpressionDiff(List<Mapping> previousMappings,
                        List<Mapping> newMappings) {
            Map<NodePath, ExpressionChange> diff = Maps.newHashMap();
            Map<NodePath, Mapping> pathToMapping = mapify(previousMappings);
            for (Mapping m : newMappings) {
                Mapping prev = pathToMapping.get(m.getTargetPath());
                if (prev != null && !prev.getExpression().equals(m.getExpression())) {
                    diff.put(m.getTargetPath(), new ExpressionChange(prev.getExpression(), m.getExpression()));
                }
            }
            return diff;
        }
View Full Code Here

            }
            for (Mapping m : removedTargetNodes.values()) {
                projectVariables.scanMapping(tf, m);
            }
            for (Map.Entry<NodePath, ExpressionChange> e : changedMappings.entrySet()) {
                Mapping m = MappingFactory.newMapping(e.getKey(), e.getValue().oldExpression);
                projectVariables.scanMapping(tf, m);
            }
        }
View Full Code Here

            }
            for (Mapping m : addedTargetNodes.values()) {
                projectVariables.scanMapping(tf, m);
            }
            for (Map.Entry<NodePath, ExpressionChange> e : changedMappings.entrySet()) {
                Mapping m = MappingFactory.newMapping(e.getKey(), e.getValue().newExpression);
                projectVariables.scanMapping(tf, m);
            }
        }
View Full Code Here

        // these conflict mappings will be added to invalid
        // thus we have to reset the invalidateMappings container in treeMapper
        invalidMappingsMgr.setInvalidMappings(invalid);
        if (maplist != null) {
            for (String line : maplist) {
                Mapping m = MapStringFormat.parse(line);
                try {
                    readInTargets(m);
                } catch (TreeMapperException ex) {
                    if (invalid == null) {
                        invalid = Lists.newArrayList();
View Full Code Here

            }
            applyNewMapList();
        }

        private void processMapping(String mapString) {
            Mapping mapping = MapStringFormat.parse(mapString);
            String replacedExpression = replaceReferencesInExpression(mapping.getExpression());
            newMapList.add(MapStringFormat.format(mapping.getTargetPath().toString(), replacedExpression));
        }
View Full Code Here

    }

    public void scanTransformation(Transformation tx) {
        for (String s : tx.getMapList()) {
            try {
                Mapping m = MapStringFormat.parse(s);
                scanMapping(tx, m.getTargetPath(), m.getExpression());
            } catch (RuntimeException ex) {
                // The map string has invalid format. Anything sensible to do here?
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.structure.mapping.Mapping

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.