ilog.views.maps.beans
Class IlvMapAnnotationModel

java.lang.Object
  extended by ilog.views.maps.beans.IlvMapAnnotationModel
All Implemented Interfaces:
IlvPersistentObject

public class IlvMapAnnotationModel
extends Object
implements IlvPersistentObject

An annotation model storing an IlvGraphicLayerDataSource. This model is mainly used for persistence.

Since:
JViews 8.0

Field Summary
static IlvAttributeInfoProperty info
          The IlvAttributeInfoProperty used to define the attribute to be displayed as a label by the annotation graphic objects.
 
Constructor Summary
IlvMapAnnotationModel(IlvInputStream stream)
          Creates a model from an IlvInputStream.
 
Method Summary
 void clearDataSources()
          Removes all the data sources from the model.
 IlvMapLayer getAnnotationRoot()
          Returns the IlvMapLayer used as a parent by the annotations layers when displayed in an IlvLayerTree.
 IlvMapLayer getAnnotationRoot(IlvManager pmanager)
          Gets or creates the layer used as a parent by the layers created by this toolbar.
 IlvGraphicLayerDataSource getDataSource(IlvManager pmanager, String key)
          Retrieves the data source associated with a key.
 Iterator getGraphicLayerDataSource()
          Provides an iterator to iterate through the data sources stored in this model.
 void putDataSource(Object key, IlvGraphicLayerDataSource source)
          Registers a data source in this model.
 void removeDataSource(IlvGraphicLayerDataSource source)
          Removes the specified data source from the model.
 void setAnnotationRoot(IlvMapLayer layer)
          Sets the layer to be used as a parent by the annotations layers.
 void write(IlvOutputStream stream)
          Writes this model on an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

public static IlvAttributeInfoProperty info
The IlvAttributeInfoProperty used to define the attribute to be displayed as a label by the annotation graphic objects. This attribute is an IlvStringAttribute. The name of the attribute is IlvMapAnnotationToolBar.ANNOTATION_PROPERTY_NAME

Constructor Detail

IlvMapAnnotationModel

public IlvMapAnnotationModel(IlvInputStream stream)
                      throws IlvReadFileException
Creates a model from an IlvInputStream.

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this model on an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - The stream to write to.
Throws:
IOException

getDataSource

public IlvGraphicLayerDataSource getDataSource(IlvManager pmanager,
                                               String key)
Retrieves the data source associated with a key. If no data source is associated with this key, a new IlvGraphicLayerDataSource is created and associated with the key.

Parameters:
pmanager - The manager used to store and retrieve the data sources.
key - The string key.
Returns:
The IlvGraphicLayerDataSource associated with this key.

getGraphicLayerDataSource

public Iterator getGraphicLayerDataSource()
Provides an iterator to iterate through the data sources stored in this model.

Returns:
An iterator to iterate through the data sources stored in this model.

putDataSource

public void putDataSource(Object key,
                          IlvGraphicLayerDataSource source)
Registers a data source in this model.

Parameters:
key - The key used for further retrieval.
source - The data source.

removeDataSource

public void removeDataSource(IlvGraphicLayerDataSource source)
Removes the specified data source from the model.

Parameters:
source - The data source to remove.

clearDataSources

public void clearDataSources()
Removes all the data sources from the model.


getAnnotationRoot

public IlvMapLayer getAnnotationRoot(IlvManager pmanager)
Gets or creates the layer used as a parent by the layers created by this toolbar.

Parameters:
pmanager - The manager used to retrieve the layer tree model.
Returns:
The parent of the layers created by the IlvGraphicLayerDatatSource.

getAnnotationRoot

public IlvMapLayer getAnnotationRoot()
Returns the IlvMapLayer used as a parent by the annotations layers when displayed in an IlvLayerTree.

Returns:
The IlvMapLayer used as a parent by the annotations layers.

setAnnotationRoot

public void setAnnotationRoot(IlvMapLayer layer)
Sets the layer to be used as a parent by the annotations layers.

Parameters:
layer - The layer used as a parent by the annotations layers.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.