// Path: src/org/biopax/paxtools/pattern/util/ProgressWatcher.java
// public interface ProgressWatcher
// {
// 	/**
// 	 * Sets how many ticks are there in total.
// 	 * @param total total number of ticks
// 	 */
// 	public void setTotalTicks(int total);
// 
// 	/**
// 	 * Ticks the progress watcher.
// 	 * @param times times to tick
// 	 */
// 	public void tick(int times);
// }


import org.biopax.paxtools.controller.Cloner;
import org.biopax.paxtools.controller.Completer;
import org.biopax.paxtools.controller.SimpleEditorMap;
import org.biopax.paxtools.io.BioPAXIOHandler;
import org.biopax.paxtools.io.SimpleIOHandler;
import org.biopax.paxtools.model.BioPAXElement;
import org.biopax.paxtools.model.BioPAXLevel;
import org.biopax.paxtools.model.Model;
import org.biopax.paxtools.model.level3.*;
import org.biopax.paxtools.model.level3.Process;
import org.biopax.paxtools.pattern.util.ProgressWatcher;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.*;
	{
		List<Match> list = new LinkedList<Match>();

		Map<BioPAXElement, List<Match>> map = search(eles, pattern);
		for (List<Match> matches : map.values())
		{
			list.addAll(matches);
		}
		return list;
	}

	/**
	 * Searches the given pattern in the given model.
	 * @param model model to search in
	 * @param pattern pattern to search for
	 * @return map from starting elements to the list matching results
	 */
	public static Map<BioPAXElement, List<Match>> search(Model model, Pattern pattern)
	{
		return search(model, pattern, null);
	}

	/**
	 * Searches the given pattern in the given model.
	 * @param model model to search in
	 * @param pattern pattern to search for
	 * @param prg progress watcher to keep track of the progress
	 * @return map from starting elements to the list matching results
	 */
	public static Map<BioPAXElement, List<Match>> search(Model model, Pattern pattern,
// Path: src/org/biopax/paxtools/pattern/util/ProgressWatcher.java
// public interface ProgressWatcher
// {
// 	/**
// 	 * Sets how many ticks are there in total.
// 	 * @param total total number of ticks
// 	 */
// 	public void setTotalTicks(int total);
// 
// 	/**
// 	 * Ticks the progress watcher.
// 	 * @param times times to tick
// 	 */
// 	public void tick(int times);
// }


// Path: src/org/biopax/paxtools/pattern/Searcher.java
import org.biopax.paxtools.controller.Cloner;
import org.biopax.paxtools.controller.Completer;
import org.biopax.paxtools.controller.SimpleEditorMap;
import org.biopax.paxtools.io.BioPAXIOHandler;
import org.biopax.paxtools.io.SimpleIOHandler;
import org.biopax.paxtools.model.BioPAXElement;
import org.biopax.paxtools.model.BioPAXLevel;
import org.biopax.paxtools.model.Model;
import org.biopax.paxtools.model.level3.*;
import org.biopax.paxtools.model.level3.Process;
import org.biopax.paxtools.pattern.util.ProgressWatcher;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.*;

	{
		List<Match> list = new LinkedList<Match>();

		Map<BioPAXElement, List<Match>> map = search(eles, pattern);
		for (List<Match> matches : map.values())
		{
			list.addAll(matches);
		}
		return list;
	}

	/**
	 * Searches the given pattern in the given model.
	 * @param model model to search in
	 * @param pattern pattern to search for
	 * @return map from starting elements to the list matching results
	 */
	public static Map<BioPAXElement, List<Match>> search(Model model, Pattern pattern)
	{
		return search(model, pattern, null);
	}

	/**
	 * Searches the given pattern in the given model.
	 * @param model model to search in
	 * @param pattern pattern to search for
	 * @param prg progress watcher to keep track of the progress
	 * @return map from starting elements to the list matching results
	 */
	public static Map<BioPAXElement, List<Match>> search(Model model, Pattern pattern,
		ProgressWatcher prg)