/*
 * Copyright (c) 2009 University Corporation for Atmospheric Research (UCAR). All rights reserved.
 */
package eske.metadata.harvest.thredds;

/**
 * This is the interface for an AlgorithmResult.
 * 
 * Algorithm results are a wrapper for the result of a THREDDSWalker algorithm.
 * It is intended to be generic enough to capture whatever information may be
 * generated by the traversing of a THREDDS catalog.
 * 
 * @author hannah
 * 
 */
public interface AlgorithmResult {

	/**
	 * Accessor method for the return object of a THREDDS traversal algorithm
	 * run.
	 * 
	 * 
	 * @return The object resulting from a THREDDS catalog traversal, or null if
	 *         the algorithm didn't produce a result.
	 */
	Object getResult();

	/**
	 * Accessor method for any messages intended to inform the user of what
	 * happened during a THREDDS catalog algorithm run.
	 * 
	 * 
	 * @return One or more messages produced by the THREDDS algorithm run to
	 *         inform the user of important information.
	 */
	StringBuilder getUserMessages();

	/**
	 * Mutator method intended to be used by the THREDDS traversal algorithm run
	 * to record any important happenings that the user may need to know (e.g. a
	 * physical domain object wasn't created because it didn't match any
	 * pre-existing objects).
	 * 
	 * 
	 * @param message
	 *            The message containing explanations and information for the
	 *            user.
	 */
	void addUserMessage(String message);
}
