package com.github.davidmoten.logan.config;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;

import com.github.davidmoten.logan.MessageSplitter;

/**
 * 
 * Parser options.
 * 
 */
public class Parser {

    @XmlElement(required = false)
    public String sourcePattern;
    @XmlElement(required = true)
    public String pattern;
    @XmlElement(required = true)
    public String patternGroups;
    @XmlElement(defaultValue = MessageSplitter.MESSAGE_PATTERN_DEFAULT)
    public String messagePattern = MessageSplitter.MESSAGE_PATTERN_DEFAULT;
    @XmlElement(required = true)
    public List<String> timestampFormat;
    @XmlElement(defaultValue = "UTC")
    public String timezone = "UTC";
    @XmlElement(required = false, defaultValue = "false")
    public boolean multiline;

    /**
     * Parser configuration.
     * 
     * @param pattern
     *            pattern
     * @param patternGroups
     *            pattern groups
     * @param timestampFormat
     *            timestamp format
     * @param timezone
     *            timezone
     * @param multiline
     *            multiline
     * @param sourcePattern
     *            source pattern
     */
    public Parser(String pattern, String patternGroups, String messagePattern,
            List<String> timestampFormat, String timezone, boolean multiline,
            String sourcePattern) {
        super();
        this.pattern = pattern;
        this.patternGroups = patternGroups;
        this.messagePattern = messagePattern;
        this.timestampFormat = timestampFormat;
        this.timezone = timezone;
        this.multiline = multiline;
        this.sourcePattern = sourcePattern;
    }

    /**
     * Constructor.
     */
    public Parser() {
        // required for jaxb
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("Parser [pattern=");
        builder.append(pattern);
        builder.append(", patternGroups=");
        builder.append(patternGroups);
        builder.append(", messagePattern=");
        builder.append(messagePattern);
        builder.append(", timestampFormat=");
        builder.append(timestampFormat);
        builder.append(", timezone=");
        builder.append(timezone);
        builder.append(", multiline=");
        builder.append(multiline);
        builder.append("]");
        return builder.toString();
    }

}

@@ -801,398 +801,8 @@
 e;%0A%0A
-    /**%0A     * Parser configuration.%0A     * %0A     * @param pattern%0A     *            pattern%0A     * @param patternGroups%0A     *            pattern groups%0A     * @param timestampFormat%0A     *            timestamp format%0A     * @param timezone%0A     *            timezone%0A     * @param multiline%0A     *            multiline%0A     * @param sourcePattern%0A     *            source pattern%0A     */%0A
     

fix javadoc