public class IlvMIDMIFDataSource extends IlvHierarchicalDataSource
Modifier and Type | Class and Description |
---|---|
static class |
IlvMIDMIFDataSource.MIDMIFFilter
A specialized criterion filter that returns a key identifying the geometry type of the specified map feature
as well as its style.
|
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvMIDMIFDataSource(IlvInputStream stream)
Constructs an
IlvMIDMIFDataSource from the specified input stream. |
IlvMIDMIFDataSource(String filename)
Constructs an
IlvMIDMIFDataSource from the specified file name. |
IlvMIDMIFDataSource(URL url)
Constructs an
IlvMIDMIFDataSource from the specified URL. |
Modifier and Type | Method and Description |
---|---|
IlvCoordinateSystem |
getCoordinateSystem()
Retrieves the coordinate system of this data source.
|
IlvMapReusableFeatureIterator |
getFeatureIterator()
Retrieves the feature iterator used by this data source.
|
IlvFeatureRenderer |
getFeatureRenderer(IlvMapFeature feature)
Gets the appropriate feature renderer for the specified
IlvMapFeature . |
protected IlvMapStyle |
getStyle(IlvMapFeature feature)
Returns a map style for the specified feature.
|
protected boolean |
isSourceDataAvailable()
Checks whether the source data this
IlvMapDataSource is
based on is available (file, database connection, url...). |
void |
start()
Starts the data source.
|
void |
write(IlvOutputStream stream)
Writes this
IlvMIDMIFDataSource to an IlvOutputStream . |
addCriterionFilter, addLayer, createFeatureRenderer, createInsertionLayer, createStyle, getCriterionFilters, getFeatureRenderer, getKey, getMapLayer, isAcceptNullValues, readInfo, removeAllCriterionFilters, removeCriterionFilter, reset, setAcceptNullValues, setupLayer
addDataSourceListener, callListeners, getBackupDataSources, getDescription, getInsertionLayer, getManager, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isGrapherMode, isSaveBackupDataSources, isUsingBackupDataSource, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setGrapherMode, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions, toString
public IlvMIDMIFDataSource(String filename) throws MalformedURLException
IlvMIDMIFDataSource
from the specified file name.filename
- The name of the MID/MIF file to read.MalformedURLException
- if the path cannot be parsed as a URLpublic IlvMIDMIFDataSource(URL url) throws MalformedURLException
IlvMIDMIFDataSource
from the specified URL.url
- The URL referring of the MID/MIF file to read.MalformedURLException
- if the path cannot be parsed as a URLpublic IlvMIDMIFDataSource(IlvInputStream stream) throws IlvReadFileException
IlvMIDMIFDataSource
from the specified input stream.stream
- The IlvInputStream
to read from.IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
IlvMIDMIFDataSource
to an IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvHierarchicalDataSource
stream
- The stream to write to.IOException
public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in class IlvMapDataSource
public IlvFeatureRenderer getFeatureRenderer(IlvMapFeature feature) throws Exception
IlvMapFeature
.getFeatureRenderer
in class IlvHierarchicalDataSource
feature
- The feature to render.IlvFeatureRenderer
.Exception
- if a feature renderer does not exist for the specified IlvMapFeature
.public void start() throws Exception
start
in class IlvHierarchicalDataSource
Exception
IlvHierarchicalDataSource.start()
public IlvMapReusableFeatureIterator getFeatureIterator()
getFeatureIterator
in class IlvHierarchicalDataSource
protected IlvMapStyle getStyle(IlvMapFeature feature) throws Exception
getStyle
in class IlvHierarchicalDataSource
feature
- The IlvMapFeature
.IlvMapStyle
for the featureException
- if an appropriate style could not be found for the specified feature.protected boolean isSourceDataAvailable()
IlvMapDataSource
is
based on is available (file, database connection, url...). A
.ivl,
JViews Maps file keeps references to the original
sources the map was built from. It can happen that these sources are not available when
opening the map, for example, when the map is transferred to another machine. This method
checks that availability. In the case where these sources are not available, all operations
that need them are performed from the data embedded in the map, but there is a risk of loosing
information (when reprojecting for example).
This method should be overridden by subclasses.isSourceDataAvailable
in class IlvMapDataSource
true
, if the original source data is available.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.