Package org.jitterbit.integration.structure.mapping

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


             logger.info(msg);
         }
     }

    public MappingTreeStructure convert(DatabaseStructure dbStruct, CallbackResult callback) {
      MappingTreeStructure structure=null;
      try {
            BeginEndQuote quotes = dbStruct.getBeginEndQuote();
            log("Begin/End quotes: " + quotes);
          beginQuote=quotes.begin;
          endQuote=quotes.end;
View Full Code Here


                LdapStructureMappingTreeConverter c = new LdapStructureMappingTreeConverter();
                return c.convert((LdapStructure) s, isTarget, callback);
            }
            case None: {
                String xml = NoStructure.getJtr(isTarget);
                MappingTreeStructure structure = MappingTreeStructureFactory.fromString(xml);
                if (callback != null) {
                    callback.succeeded(structure);
                }
                return structure;
            }
View Full Code Here

        this.st = st;
        dataStructure = (st == SourceTarget.Source) ? tx.getInputStructure() : tx.getOutputStructure();
    }

    public CROM_Tree createTree() {
        MappingTreeStructure jtr = createMappingTreeStructure();
        if (jtr == null) {
            return null;
        }
        return CROM_Tree.fromMappingStructure(jtr);
    }
View Full Code Here

        m_newTargetJtr = getOutputStructure(m_new, cache);
    }

    private MappingTreeStructure getInputStructure(Transformation tf, InputAndOutputMappingTreeStructureCache cache)
                    throws MigrationInitializationException {
        MappingTreeStructure input = null;
        try {
            input = cache.getInputStructure(tf.getID());
        }
        catch (DataCacheException ex) {
            // Ignore this, and reload the structures.
View Full Code Here

        }
    }

    private MappingTreeStructure getOutputStructure(Transformation tf, InputAndOutputMappingTreeStructureCache cache)
                    throws MigrationInitializationException {
        MappingTreeStructure output = null;
        try {
            output = cache.getOutputStructure(tf.getID());
        }
        catch (DataCacheException ex) {
            // Ignore this, and reload the structures.
View Full Code Here

    }

    private MappingTreeStructure reloadInputStructure(Transformation tf) throws MigrationInitializationException {
        GetJtrCallback cb = new GetJtrCallback();
        DataStructureToMappingTreeConverter converter = DataStructureToMappingTreeConverter.newInputStructureConverter();
        MappingTreeStructure input = converter.getMappingStructure(tf.getInputStructure(), cb);
        if( !cb.succeeded ) {
            String msg = "Failed to load the source structure for the transformation \"" +
                tf.getName() + "\": ";
            Throwable th = cb.causeOfFailure;
            throw new MigrationInitializationException(msg + th.getMessage(), th);
View Full Code Here

    }

    private MappingTreeStructure reloadOutputStructure(Transformation tf) throws MigrationInitializationException {
        GetJtrCallback cb = new GetJtrCallback();
        DataStructureToMappingTreeConverter converter = DataStructureToMappingTreeConverter.newOutputStructureConverter();
        MappingTreeStructure output = converter.getMappingStructure(tf.getOutputStructure(), cb);
        if( !cb.succeeded ) {
            String msg = "Failed to load the target structure for the transformation \"" +
                tf.getName() + "\": ";
            Throwable th = cb.causeOfFailure;
            throw new MigrationInitializationException(msg + th.getMessage(), th);
View Full Code Here

  SQL_TIMESTAMP = 11,
    SQL_ODBC_DATE = 9;

  public static CROM createCromTree(String jtrFileName){
    File file = new File(jtrFileName);
    MappingTreeStructure jtr = MappingTreeStructureFactory.fromFile(file, BackendEncoding.getCharsetForReading());
    CROM_Tree tree = new CROM_Tree();
    try {
            tree.parse(jtr);
        } catch (CromTreeException e) {
            String err = getJtrParsingErrorMessage(jtrFileName, e);
View Full Code Here

      return null;
    }

  public static CROM createCromTree(String jtrFileName){
    File file = new File(jtrFileName);
    MappingTreeStructure jtr = MappingTreeStructureFactory.fromFile(file);
    CROM_Tree tree = new CROM_Tree();
    tree.parse(jtr);
    if (tree.getRoot() == null) {
            throw new RuntimeException("There seems to be a problem with the file that describes the table structure. " +
                "The path to the file is " + jtrFileName);
View Full Code Here

TOP

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

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.