/**
 * Interface to a vector geographic format.  Provides methods to open and query
 * data from a vector geographic format.
 */

/*
 * $Id$
 */
package net.sourceforge.mapyrus;

import java.awt.geom.Rectangle2D;
import java.util.Hashtable;

public interface GeographicDataset
{
	/**
	 * Return projection of this dataset.  Methods of specifying a projection differ
	 * wildly between formats so caller will have to try and make sense of it.
	 * @return projection
	 */
	public String getProjection();
	
	/**
	 * Return metadata of a dataset in a key-value lookup table.
	 * @return metadata table.
	 */
	public Hashtable getMetadata();
	
	/**
	 * Return list of names of fields in this dataset.
	 * @return array of names.
	 */
	public String []getFieldNames();
	
	/**
	 * Return list of types of fields in this dataset.
	 */
	public int []getFieldTypes();
	
	/**
	 * Return world coordinate extents of this dataset in projection of dataset.
	 * @return extents.
	 */
	public Rectangle2D getWorlds();
	
	/**
	 * Query the dataset.  Finds all data inside or crossing the area of interest
	 * and matching the where clause.  Makes results available to be fetched.
	 * Only one query can be made on a dataset at one time, beginning a
	 * new query closes the last one.
	 * 
	 * @param extents is area of interest for this query.
	 * @param whereClause is additional SQL where clause for query.
	 */
	public void query(Rectangle2D.Double extents, String whereClause) throws MapyrusException;
		
	/**
	 * Finds if current query has more data available. 
	 * @return true if query has more rows available to be fetched.
	 */
	public boolean hasMoreRows() throws MapyrusException;
	
	/**
	 * Fetch next row that is a result of current query.
	 * @param query handle to query.
	 * @param row returns next row result.
	 */
	public Row fetch() throws MapyrusException;
}

@@ -822,42 +822,223 @@
 %0A%09 *
-/%0A%09public int %5B%5DgetFieldTypes();%0A%09
+ @return list of field types.%0A%09 */%0A%09public int %5B%5DgetFieldTypes();%0A%0A%09/**%0A%09 * Return indexes of geometry fields in list of field names.%0A%09 * @return list of field indexes.%0A%09 */%0A%09public int%5B%5D getGeometryFieldIndexes();%0A
 %0A%09/*
@@ -1637,17 +1637,19 @@
 eClause)
- 
+%0A%09%09
 throws M

Change query interrface.