/*
 * Created on 2004-2-12
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package workflow.wfmc.xpdl.parser;

import java.io.File;
import java.io.InputStream;
import java.util.Hashtable;

import workflow.WorkflowException;
import workflow.wfmc.xpdl.WorkflowPackage;

/**
 * @author zosatapo
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public abstract class XPDLParser
{
  protected XPDLParser() 
  {
  }
  
  /**
   * Parse the content of the given file as an XML document
   * and return a new Package {@link workflow.core.WorkflowPackage} object.
   *
   * @param f The file containing the XML to parse.
   * @exception IOException If any IO errors occur.
   * @exception wfException If any parse errors occur.
   * @exception IllegalArgumentException If the file is null.
   * @return A new Package object.
   */

  public abstract WorkflowPackage parse(File f)
  throws WorkflowException;
  
  /**
   * Parse the content of the given file as an XML document
   * and return a new Package {@link workflow.core.WorkflowPackage} object.
   *
   * @param f The file containing the XML to parse.
   * @exception IOException If any IO errors occur.
   * @exception wfException If any parse errors occur.
   * @exception IllegalArgumentException If the file is null.
   * @return A new Package object.
   */

  public abstract WorkflowPackage parse(InputStream is)
  throws WorkflowException;
    
  public abstract WorkflowPackage parse(Hashtable env)
  throws WorkflowException;
  
	/**
	 * Indicates whether or not the factory is configured to produce
	 * parsers which validate the package content during parse.
	 *
	 * @return  true if the factory is configured to produce parsers
	 *          which validate the package content during parse; false otherwise.
	 */

	public abstract boolean isValidating();
}
