Package org.apache.camel.dataformat.bindy.annotation

Examples of org.apache.camel.dataformat.bindy.annotation.Section


                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);

                    if (ObjectHelper.isNotEmpty(record.quote())) {
                        quote = record.quote();
                        LOG.debug("Quoting columns with: {}", quote);
                    }

                    quoting = record.quoting();
                    LOG.debug("CSV will be quoted: {}", messageOrdered);

                    autospanLine = record.autospanLine();
                    LOG.debug("Autospan line in last record: {}", autospanLine);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here


                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);

                    if (ObjectHelper.isNotEmpty(record.quote())) {
                        quote = record.quote();
                        LOG.debug("Quoting columns with: {}", quote);
                    }

                    quoting = record.quoting();
                    LOG.debug("CSV will be quoted: {}", messageOrdered);

                    autospanLine = record.autospanLine();
                    LOG.debug("Autospan line in last record: {}", autospanLine);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

            for (Class<?> cl : models) {
                // Get annotation @Message from the class
                Message message = cl.getAnnotation(Message.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (message != null) {
                    // Get Pair Separator parameter
                    ObjectHelper.notNull(message.pairSeparator(), "No Pair Separator has been defined in the @Message annotation");
                    pairSeparator = message.pairSeparator();
                    LOG.debug("Pair Separator defined for the message: {}", pairSeparator);

                    // Get KeyValuePair Separator parameter
                    ObjectHelper.notNull(message.keyValuePairSeparator(), "No Key Value Pair Separator has been defined in the @Message annotation");
                    keyValuePairSeparator = message.keyValuePairSeparator();
                    LOG.debug("Key Value Pair Separator defined for the message: {}", keyValuePairSeparator);

                    // Get carriage return parameter
                    crlf = message.crlf();
                    LOG.debug("Carriage return defined for the message: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = message.isOrdered();
                    LOG.debug("Is the message ordered in output: {}", messageOrdered);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);

                    if (ObjectHelper.isNotEmpty(record.quote())) {
                        quote = record.quote();
                        LOG.debug("Quoting columns with: {}", quote);
                    }
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Csv record : " + record.toString());
                    }

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Skip First Line parameter of the CSV : " + skipFirstLine);
                    }

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Generate header column names parameter of the CSV : " + generateHeaderColumnNames);
                    }

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation !");
                    separator = record.separator();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Separator defined for the CSV : " + separator);
                    }

                    // Get carriage return parameter
                    crlf = record.crlf();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Carriage return defined for the CSV : " + crlf);
                    }

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Must CSV record be ordered ? " + messageOrdered);
                    }

                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section !");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

            for (Class<?> cl : models) {
                // Get annotation @Message from the class
                Message message = cl.getAnnotation(Message.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (message != null) {
                    // Get Pair Separator parameter
                    ObjectHelper.notNull(message.pairSeparator(), "No Pair Separator has been defined in the @Message annotation !");
                    pairSeparator = message.pairSeparator();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Pair Separator defined for the message : " + pairSeparator);
                    }

                    // Get KeyValuePair Separator parameter
                    ObjectHelper.notNull(message.keyValuePairSeparator(), "No Key Value Pair Separator has been defined in the @Message annotation !");
                    keyValuePairSeparator = message.keyValuePairSeparator();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Key Value Pair Separator defined for the message : " + keyValuePairSeparator);
                    }

                    // Get carriage return parameter
                    crlf = message.crlf();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Carriage return defined for the message : " + crlf);
                    }

                    // Get isOrderer parameter
                    messageOrdered = message.isOrdered();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Is the message ordered in output : " + messageOrdered);
                    }
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section !");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Csv record : " + record.toString());
                    }

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Skip First Line parameter of the CSV : " + skipFirstLine);
                    }

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Generate header column names parameter of the CSV : " + generateHeaderColumnNames);
                    }

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation !");
                    separator = record.separator();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Separator defined for the CSV : " + separator);
                    }

                    // Get carriage return parameter
                    crlf = record.crlf();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Carriage return defined for the CSV : " + crlf);
                    }

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Must CSV record be ordered ? " + messageOrdered);
                    }

                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section !");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

            for (Class<?> cl : models) {
                // Get annotation @Message from the class
                Message message = cl.getAnnotation(Message.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (message != null) {
                    // Get Pair Separator parameter
                    ObjectHelper.notNull(message.pairSeparator(), "No Pair Separator has been defined in the @Message annotation");
                    pairSeparator = message.pairSeparator();
                    LOG.debug("Pair Separator defined for the message: {}", pairSeparator);

                    // Get KeyValuePair Separator parameter
                    ObjectHelper.notNull(message.keyValuePairSeparator(), "No Key Value Pair Separator has been defined in the @Message annotation");
                    keyValuePairSeparator = message.keyValuePairSeparator();
                    LOG.debug("Key Value Pair Separator defined for the message: {}", keyValuePairSeparator);

                    // Get carriage return parameter
                    crlf = message.crlf();
                    LOG.debug("Carriage return defined for the message: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = message.isOrdered();
                    LOG.debug("Is the message ordered in output: {}", messageOrdered);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);

                    if (ObjectHelper.isNotEmpty(record.quote())) {
                        quote = record.quote();
                        LOG.debug("Quoting columns with: {}", quote);
                    }
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.dataformat.bindy.annotation.Section

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.