deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.mapinfoapi
Class MapInfoReader

java.lang.Object
  extended by org.deegree.io.mapinfoapi.MapInfoReader

public class MapInfoReader
extends Object

MapInfoReader is a new implementation of a reader for the MID/MIF format, based on the MapInfo 8.5 documentation.

Version:
$Revision:$, $Date:$
Author:
Andreas Schmitz, last edited by: $Author:$

Constructor Summary
MapInfoReader(String baseName)
           
 
Method Summary
 LinkedList<String> getErrors()
           
 FeatureCollection getFeatureCollection()
           
 FeatureType getFeatureType()
           
static StreamTokenizer getMIDTokenizer(File file, String charset)
           
static StreamTokenizer getMIFTokenizer(File file, String charset)
           
 HashMap<String,HashSet<HashMap<String,String>>> getStyles()
           
static LinkedList<String> parseCommaList(StreamTokenizer mif)
           
 void parseFeatures()
           
 void parseFeatureType()
           
static void quoteChars(StreamTokenizer tok, char... chars)
          Was that so hard?
static void whitespaceChars(StreamTokenizer tok, char... chars)
          Was that so hard?
static void wordChars(StreamTokenizer tok, char... chars)
          Was that so hard?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapInfoReader

public MapInfoReader(String baseName)
              throws FileNotFoundException,
                     UnsupportedEncodingException
Parameters:
baseName - the base name of the file(s), may also end with .mif/.mid
Throws:
UnsupportedEncodingException
FileNotFoundException
Method Detail

wordChars

public static void wordChars(StreamTokenizer tok,
                             char... chars)
Was that so hard?

Parameters:
chars -
tok -

quoteChars

public static void quoteChars(StreamTokenizer tok,
                              char... chars)
Was that so hard?

Parameters:
chars -
tok -

whitespaceChars

public static void whitespaceChars(StreamTokenizer tok,
                                   char... chars)
Was that so hard?

Parameters:
chars -
tok -

getMIFTokenizer

public static StreamTokenizer getMIFTokenizer(File file,
                                              String charset)
                                       throws FileNotFoundException,
                                              UnsupportedEncodingException
Parameters:
file -
charset -
Returns:
a stream tokenizer with some specific settings for reading mif files
Throws:
FileNotFoundException
UnsupportedEncodingException

getMIDTokenizer

public static StreamTokenizer getMIDTokenizer(File file,
                                              String charset)
                                       throws FileNotFoundException,
                                              UnsupportedEncodingException
Parameters:
file -
charset -
Returns:
a stream tokenizer for reading MIF files
Throws:
FileNotFoundException
UnsupportedEncodingException

parseCommaList

public static LinkedList<String> parseCommaList(StreamTokenizer mif)
                                         throws IOException
Parameters:
mif -
Returns:
a list of tokens, without the comma
Throws:
IOException

parseFeatureType

public void parseFeatureType()
                      throws IOException
Throws:
IOException

parseFeatures

public void parseFeatures()
                   throws IOException
Throws:
IOException

getFeatureCollection

public FeatureCollection getFeatureCollection()
Returns:
the feature collection (null if it has not been parsed yet)

getStyles

public HashMap<String,HashSet<HashMap<String,String>>> getStyles()
Returns:
the styles (null, if they've not been parsed yet)

getFeatureType

public FeatureType getFeatureType()
Returns:
the feature type, or null, if it has not been parsed yet

getErrors

public LinkedList<String> getErrors()
Returns:
a list of geometry errors

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org