deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.mapinfoapi
Class MapInfoReader

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

public class MapInfoReader
extends java.lang.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(java.lang.String baseName)
           
 
Method Summary
 java.util.LinkedList<java.lang.String> getErrors()
           
 FeatureCollection getFeatureCollection()
           
 FeatureType getFeatureType()
           
static java.io.StreamTokenizer getMIDTokenizer(java.io.File file, java.lang.String charset)
           
static java.io.StreamTokenizer getMIFTokenizer(java.io.File file, java.lang.String charset)
           
 java.util.HashMap<java.lang.String,java.util.HashSet<java.util.HashMap<java.lang.String,java.lang.String>>> getStyles()
           
static java.util.LinkedList<java.lang.String> parseCommaList(java.io.StreamTokenizer mif)
           
 void parseFeatures()
           
 void parseFeatureType()
           
static void quoteChars(java.io.StreamTokenizer tok, char... chars)
          Was that so hard?
static void whitespaceChars(java.io.StreamTokenizer tok, char... chars)
          Was that so hard?
static void wordChars(java.io.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(java.lang.String baseName)
              throws java.io.FileNotFoundException,
                     java.io.UnsupportedEncodingException
Parameters:
baseName - the base name of the file(s), may also end with .mif/.mid
Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
Method Detail

wordChars

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

Parameters:
chars -
tok -

quoteChars

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

Parameters:
chars -
tok -

whitespaceChars

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

Parameters:
chars -
tok -

getMIFTokenizer

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

getMIDTokenizer

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

parseCommaList

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

parseFeatureType

public void parseFeatureType()
                      throws java.io.IOException
Throws:
java.io.IOException

parseFeatures

public void parseFeatures()
                   throws java.io.IOException
Throws:
java.io.IOException

getFeatureCollection

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

getStyles

public java.util.HashMap<java.lang.String,java.util.HashSet<java.util.HashMap<java.lang.String,java.lang.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 java.util.LinkedList<java.lang.String> getErrors()
Returns:
a list of geometry errors

deegree 2.5 (2011/06/29 09:44 build-8-official)

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