|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.mapinfo.MapInfoDataSource
Field Summary | |
static java.lang.String |
CLAUSE_BRUSH
|
static java.lang.String |
CLAUSE_CENTER
|
static java.lang.String |
CLAUSE_CHARSET
|
static java.lang.String |
CLAUSE_COLUMNS
|
static java.lang.String |
CLAUSE_DELIMETER
|
static java.lang.String |
CLAUSE_INDEX
|
static java.lang.String |
CLAUSE_PEN
|
static java.lang.String |
CLAUSE_SMOOTH
|
static java.lang.String |
CLAUSE_SYMBOL
|
static java.lang.String |
CLAUSE_UNIQUE
|
static java.lang.String |
CLAUSE_VERSION
|
private java.lang.String |
filename
|
private GeometryFactory |
geomFactory
|
private java.lang.String |
hCharset
|
private java.util.ArrayList |
hColumnsNames
|
private java.util.ArrayList |
hColumnsTypes
|
private java.lang.String |
hDelimeter
|
private java.util.ArrayList |
hIndex
|
private java.util.ArrayList |
hUnique
|
private java.lang.String |
hVersion
|
private java.lang.String |
line
|
private FeatureType |
lineType
|
private FeatureType |
pointType
|
private FeatureType |
polygonType
|
static java.lang.String |
TYPE_ARC
|
static java.lang.String |
TYPE_ELLIPSE
|
static java.lang.String |
TYPE_LINE
|
static java.lang.String |
TYPE_NONE
|
static java.lang.String |
TYPE_PLINE
|
static java.lang.String |
TYPE_POINT
|
static java.lang.String |
TYPE_RECT
|
static java.lang.String |
TYPE_REGION
|
static java.lang.String |
TYPE_ROUNDRECT
|
static java.lang.String |
TYPE_TEXT
|
Constructor Summary | |
MapInfoDataSource(java.net.URL url)
Creates a new MapInfoDataSource object. |
Method Summary | |
private void |
addAttribute(java.lang.String type,
java.lang.String token,
java.util.ArrayList midValues)
|
private Feature |
buildFeature(FeatureType featureType,
Geometry geom,
java.util.ArrayList attribs)
Builds a complete Feature object using the given FeatureType, with the Geometry geom, and the given attributes. |
private java.lang.String |
clause(java.lang.String line)
A 'Clause' is stored as a single string at the start of a line. |
private java.lang.String |
clause(java.lang.String line,
char delimiter)
|
void |
getFeatures(FeatureCollection collection,
WFSQuery query)
Loads features from the datasource into the passed collection, based on the passed filter. |
FeatureType |
getSchema()
Retrieves the featureType that features extracted from this datasource will be created with. |
private boolean |
isShadingClause(java.lang.String line)
Test whether the given line contains a known shading clause keyword (PEN, STYLE, etc.) |
private Feature |
readLineObject(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads Line information from the MIF stream |
private java.util.ArrayList |
readMid(java.io.BufferedReader midReader)
Reads a single line of the given MID file stream, and returns a hashtable of the data in it, keyed byt he keys in the hColumns hash |
private void |
readMifHeader(java.io.BufferedReader mifReader)
Reads the header from the given MIF file stream |
private java.lang.String |
readMifLine(java.io.BufferedReader reader)
Reads the next line in the reader, ignoring lines which are nothing but whitespace. |
protected java.util.ArrayList |
readMifMid()
Reads the MIF and MID files and returns a ArrayList of the Features they contain |
private java.util.ArrayList |
readMifMid(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads an entire MID/MIF file. |
private Feature |
readObject(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads a single MIF Object (Point, Line, Region, etc.) as a Feature |
private Feature |
readPLineObject(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads Multi-Line (PLine) information from the MIF stream |
private Feature |
readPointObject(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads Point information from the MIF stream |
private Feature |
readRegionObject(java.io.BufferedReader mifReader,
java.io.BufferedReader midReader)
Reads Region (Polygon) information from the MIF stream |
private java.lang.String |
remainder(java.lang.String line)
returns the last word of the string |
private java.lang.String |
remainder(java.lang.String line,
char delimiter)
|
private java.lang.String |
setExtension(java.lang.String filename,
java.lang.String ext)
|
private void |
setUpFactories()
This private method constructs the factories used to create the Feature, and Geometries as they are read It takes it's setup values from the value of the COLUMNS clause in the MIF file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TYPE_NONE
public static final java.lang.String TYPE_POINT
public static final java.lang.String TYPE_LINE
public static final java.lang.String TYPE_PLINE
public static final java.lang.String TYPE_REGION
public static final java.lang.String TYPE_ARC
public static final java.lang.String TYPE_TEXT
public static final java.lang.String TYPE_RECT
public static final java.lang.String TYPE_ROUNDRECT
public static final java.lang.String TYPE_ELLIPSE
public static final java.lang.String CLAUSE_SYMBOL
public static final java.lang.String CLAUSE_PEN
public static final java.lang.String CLAUSE_SMOOTH
public static final java.lang.String CLAUSE_CENTER
public static final java.lang.String CLAUSE_BRUSH
public static final java.lang.String CLAUSE_VERSION
public static final java.lang.String CLAUSE_CHARSET
public static final java.lang.String CLAUSE_DELIMETER
public static final java.lang.String CLAUSE_UNIQUE
public static final java.lang.String CLAUSE_INDEX
public static final java.lang.String CLAUSE_COLUMNS
private java.util.ArrayList hColumnsNames
private java.util.ArrayList hColumnsTypes
private java.util.ArrayList hIndex
private java.util.ArrayList hUnique
private FeatureType lineType
private FeatureType pointType
private FeatureType polygonType
private GeometryFactory geomFactory
private java.lang.String filename
private java.lang.String hCharset
private java.lang.String hDelimeter
private java.lang.String hVersion
private java.lang.String line
Constructor Detail |
public MapInfoDataSource(java.net.URL url) throws java.net.MalformedURLException
url
-
java.net.MalformedURLException
Method Detail |
protected java.util.ArrayList readMifMid() throws java.lang.Exception
java.lang.Exception
- if file doesn't exist or is not readable etcprivate java.lang.String setExtension(java.lang.String filename, java.lang.String ext)
filename
- ext
-
private void setUpFactories() throws java.lang.Exception
java.lang.Exception
private java.util.ArrayList readMifMid(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- An opened BufferedReader to the MIF file.midReader
- An opened BufferedReader to the MID file.
java.lang.Exception
private void readMifHeader(java.io.BufferedReader mifReader) throws java.lang.Exception
mifReader
-
java.lang.Exception
private java.lang.String clause(java.lang.String line)
line
-
private java.lang.String clause(java.lang.String line, char delimiter)
line
- delimiter
-
private java.lang.String remainder(java.lang.String line)
line
-
private java.lang.String remainder(java.lang.String line, char delimiter)
line
- delimiter
-
private java.lang.String readMifLine(java.io.BufferedReader reader) throws java.io.IOException, java.lang.Exception
reader
-
java.io.IOException
java.lang.Exception
private Feature readObject(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- midReader
-
java.lang.Exception
private Feature readPointObject(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- midReader
-
java.lang.Exception
private Feature readLineObject(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- midReader
-
java.lang.Exception
private Feature readPLineObject(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- midReader
-
java.lang.Exception
private Feature readRegionObject(java.io.BufferedReader mifReader, java.io.BufferedReader midReader) throws java.lang.Exception
mifReader
- midReader
-
java.lang.Exception
private Feature buildFeature(FeatureType featureType, Geometry geom, java.util.ArrayList attribs) throws java.lang.Exception
featureType
- The FeatureType to use to constuct the Featuregeom
- The Geometry to use as the default Geometryattribs
- The attibutes to use as the Feature's attributes (Attributes must be set up
in the FeatureType)
java.lang.Exception
private java.util.ArrayList readMid(java.io.BufferedReader midReader) throws java.lang.Exception
midReader
-
java.lang.Exception
private void addAttribute(java.lang.String type, java.lang.String token, java.util.ArrayList midValues)
type
- token
- midValues
- private boolean isShadingClause(java.lang.String line)
line
-
public void getFeatures(FeatureCollection collection, WFSQuery query) throws java.lang.Exception
collection
- The collection to put the features into.query
- contains info about request of which features to retrieve.
java.lang.Exception
- For all data source errors.public FeatureType getSchema()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |