public class IlvSVGDataSource extends IlvDefaultTilableDataSource
IlvSVGDataSource
represents a data source used read SVG files.IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
GeometryClassInformation
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvSVGDataSource(IlvInputStream stream)
Creates a new
IlvSVGDataSource instance. |
IlvSVGDataSource(String filename)
Constructs an
IlvSVGDataSource instance from a file. |
IlvSVGDataSource(URL url)
Constructs an
IlvSVGDataSource instance from a file. |
Modifier and Type | Method and Description |
---|---|
protected IlvDefaultFeatureFilter |
createDefaultFilter()
Creates, at construction time, the filter that will be used to separate
features into layers.
|
protected IlvMapReusableFeatureIterator |
createFeatureIterator(String fileName)
Method used in
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String) constructor to build the data source reader. |
protected IlvMapReusableFeatureIterator |
createFeatureIterator(URL url)
Method used in the
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL) constructor to build the data source reader. |
protected IlvFeatureRenderer |
createFeatureRenderer()
Returns a renderer created for this datasource.
|
protected IlvMapRegionOfInterestIterator |
createTiledIterator(IlvFeatureClassInformation featureValue,
IlvGeometryClassFilter geometryClass)
Creates an iterator that traverses the map features for a specific area of
interest.
|
IlvFeatureRenderer |
getFeatureRenderer(IlvMapFeature feature)
Returns the appropriate feature renderer for an
IlvMapFeature
object. |
protected IlvGeometryClassFilter[] |
getGeometryClassFilters()
By default, returns
IlvDefaultTilableDataSource.GeometryClassInformation |
protected void |
initFeatureList()
Specific initialization done when data source is created.
|
String |
makeLayerName(String name,
IlvGeometryClassFilter d)
Creates a layer name from a feature name and a geometry class.
|
void |
setDestinationBounds(double minX,
double minY,
double maxX,
double maxY)
Sets the bounds within which the SVG Reader should fit graphical objects.
|
void |
setInternalTransformation(IlvMathTransform internalTransformation)
Sets the internal transformation to use when reading the SVG file.
|
void |
start()
Starts this data source.
|
void |
write(IlvOutputStream stream)
Writes this
IlvSVGDataSource instance to a stream. |
acceptsCode, addLayer, createGenericTiles, createTiledLayers, getColumnCount, getFeatureFilterPropertyName, getFeatureIterator, getFeatureName, getGeometryClassInformation, getLatMax, getLatMin, getLayerOrder, getLonMax, getLonMin, getMonitoringData, getRowCount, getURL, isMultiThreaded, isSourceDataAvailable, isUsingTiling, readInfo, reset, setAcceptedCodeList, setAreaOfinterest, setLayerOrder, setMonitoringData, setMultiThreaded, setTilingParameters, setupLayer, setupTiledLoaders, setURL
addCriterionFilter, createInsertionLayer, createStyle, getCriterionFilters, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, 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 IlvSVGDataSource(IlvInputStream stream) throws IlvReadFileException
IlvSVGDataSource
instance.stream
- The stream to read from.IlvReadFileException
- if there is a problem reading from stream
.public IlvSVGDataSource(String filename) throws MalformedURLException
IlvSVGDataSource
instance from a file.filename
- The name of the SVG file to read from.MalformedURLException
- if the path filename
cannot be parsed as a URL.public IlvSVGDataSource(URL url) throws IOException
IlvSVGDataSource
instance from a file.url
- The URL of the SVG file to read from.IOException
- if there is a problem reading from url
.public void write(IlvOutputStream stream) throws IOException
IlvSVGDataSource
instance to a stream.write
in interface IlvPersistentObject
write
in class IlvDefaultTilableDataSource
stream
- The output stream to write to.IOException
- if there is a problem writing to stream
.IlvMapDataSource.write(ilog.views.io.IlvOutputStream)
protected void initFeatureList()
initFeatureList
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.initFeatureList()
protected IlvGeometryClassFilter[] getGeometryClassFilters()
IlvDefaultTilableDataSource.GeometryClassInformation
getGeometryClassFilters
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.getGeometryClassFilters()
public String makeLayerName(String name, IlvGeometryClassFilter d)
makeLayerName
in class IlvDefaultTilableDataSource
name
- The feature name.d
- The geometry class.IlvDefaultTilableDataSource.makeLayerName(java.lang.String,
ilog.views.maps.format.IlvGeometryClassFilter)
protected IlvMapReusableFeatureIterator createFeatureIterator(String fileName) throws MalformedURLException
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String)
constructor to build the data source reader.
For example:protected void createFeatureIterator(String fileName) { return new IlvS57Reader(fileName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
fileName
- The file parameter.MalformedURLException
IlvDefaultTilableDataSource.createFeatureIterator(java.lang.String)
protected IlvMapReusableFeatureIterator createFeatureIterator(URL url)
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL)
constructor to build the data source reader.
For example:protected void createFeatureIterator(URL urlName) { return new IlvS57Reader(urlName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
url
- The file parameter.IlvDefaultTilableDataSource.createFeatureIterator(java.net.URL)
protected IlvDefaultFeatureFilter createDefaultFilter()
IlvDefaultFeatureFilter
instance and pass the property used to split features.createDefaultFilter
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.createDefaultFilter()
public void start() throws Exception
start
in class IlvDefaultTilableDataSource
Exception
IlvDefaultTilableDataSource.start()
protected IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureValue, IlvGeometryClassFilter geometryClass)
createTiledIterator
in class IlvDefaultTilableDataSource
featureValue
- An IlvFeatureClassInformation
object used to filter
features.geometryClass
- A subclass of IlvMapGeometry
used to prevent the mixing of
different types of feature in the same layer.protected IlvFeatureRenderer createFeatureRenderer() throws Exception
IlvHierarchicalDataSource.getFeatureRenderer()
and
IlvHierarchicalDataSource.getFeatureRenderer(IlvMapFeature)
methods calls. The default
implementation creates a renderer through
IlvDataSourceStylingFactory.createDefaultRenderer(boolean, boolean)
createFeatureRenderer
in class IlvHierarchicalDataSource
Exception
IlvHierarchicalDataSource.createFeatureRenderer()
public IlvFeatureRenderer getFeatureRenderer(IlvMapFeature feature) throws Exception
IlvMapFeature
object.getFeatureRenderer
in class IlvHierarchicalDataSource
feature
- The IlvMapFeature
to render.IlvFeatureRenderer
.Exception
- if a feature renderer does not exist to match
feature
. Overridden to always use the same feature
renderer.public void setDestinationBounds(double minX, double minY, double maxX, double maxY)
minX
- The minimum longitude in radians.minY
- The minimum latitude in radians.maxX
- The maximum longitude in radians.maxY
- The maximum latitude in radians.public void setInternalTransformation(IlvMathTransform internalTransformation)
internalTransformation
- The internal transformation to be used when reading from an SVG
file.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.