All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openpreservation.messages.MessageLog Maven / Gradle / Ivy

Go to download

API and library for open source validation of Open Document Format spreadsheets.

The newest version!
package org.openpreservation.messages;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Interface for a log of {@link Message} objects.
 */
public interface MessageLog {
    /**
     * Get the number of messages in the log.
     *
     * @return the int number of messages in the log
     */
    public int size();

    /**
     * Is the log empty?
     *
     * @return true if the log is empty, false otherwise
     */
    public boolean isEmpty();

    /**
     * Add a Message to the log for a particular path.
     *
     * @param path    the String path for the message
     * @param message the {@link Message} to be added
     * @return the int number of messages in the log
     */
    public int add(final String path, final Message message);


    /**
     * Add a {@link Collection} of Messages to the log for a particular path.
     *
     * @param path    the String path for the message
     * @param messages the Collection of Messages to be added
     * @return the int number of messages in the log
     */
    public int add(final String path, final Collection messages);

    public int add(final Map> messages);

    public Map> getErrors();

    public Map> getWarnings();

    public Map> getInfos();

    public Map> getMessages();

    public Map> getMessagesBySeverity(Message.Severity severity);

    public Map> getMessagesById(String id);

    public List getMessagesForPath(String path);

    public boolean hasErrors();

    public boolean hasWarnings();

    public boolean hasInfos();

    public int getErrorCount();

    public int getWarningCount();

    public int getInfoCount();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy