com.partnersoft.maps.model
Class RoverSet

java.lang.Object
  extended by com.partnersoft.maps.model.RoverSet
Direct Known Subclasses:
DatabaseRoverSet, MemoryRoverSet, TiledRoverSet

public abstract class RoverSet
extends java.lang.Object

A RoverSet is the published data from one or more MapSets. It is in compact, renderable form, using IDs instead of strings for graphic types and datatypes. Implementators should generally start with AbstractRoverSet. Implementations include TiledRoverSet, DiskRoverSet, MemoryRoverSet, and SQLRoverSet.

Author:
Paul Reavis Copyright 2005 Partner Software, Inc.

Field Summary
 byte[] areaToGroup
           
protected  NamedGoedels areaTypes
           
protected  ChangeGadget changeGadget
           
protected  boolean enabled
           
protected  Naming<FindItemIndex> findItems
           
 NamedGoedels groups
           
protected  NamedGoedels imageTypes
           
protected  Naming<java.lang.String> legendAliases
           
 byte[] lineToGroup
           
protected  NamedGoedels lineTypes
           
protected  Naming<Lookup> lookups
           
protected  MapSet mapSet
           
 byte[] pointToGroup
           
protected  NamedGoedels pointTypes
           
protected  Naming<RenderLegend> renderLegends
           
protected  MapSpace space
           
 byte[] textToGroup
           
protected  NamedGoedels textTypes
           
 MapSetViewSettings viewSettings
           
 
Constructor Summary
RoverSet(MapSpace space, MapSet mapSet, int id)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener nosey)
           
 int areaTypeCodeFor(java.lang.String name)
           
 ElectricalConnectivity connectivityNamed(java.lang.String name)
           
abstract  MapDataItem dataFor(int dataID)
          This returns the MapDataItem with the given dataID.
 java.lang.String drawNameFor(RoverShape shape)
           
 FindItemIndex findItemNamed(java.lang.String name)
           
 void fireChanged()
           
 NamedGoedels getAreaTypes()
          Returns the names and ids for each area graphic type.
abstract  int getDataItemCount()
          This returns the number of data items.
 Naming<FindItemIndex> getFindItems()
           
 byte getGroupIDFor(java.lang.String graphicType)
           
 int getId()
           
 NamedGoedels getImageTypes()
          Returns the names and ids for each image graphic type.
 NamedGoedels getLineTypes()
          Returns the names and ids for each line graphic type.
 MapSet getMapSet()
           
 NamedGoedels getPointTypes()
          Returns the names and ids for each point graphic type.
 RoverProfile getProfile()
           
 NamedGoedels getTextTypes()
          Returns the names and ids for each text graphic type.
abstract  RoverBytes graphicsFor(int dataID)
          This returns the rover data necessary to render the map data item with the given dataID.
abstract  RoverBytes[] graphicsInside(MapViewFrame frame)
          This returns the rover data necessary to render a given area at the given scale.
 int imageTypeCodeFor(java.lang.String name)
           
 boolean isDrawable()
           
 boolean isEnabled()
           
 int lineTypeCodeFor(java.lang.String name)
           
 Lookup lookupNamed(java.lang.String name)
           
 int pointTypeCodeFor(java.lang.String name)
           
 void publish(MapApp app, java.lang.String publishedName)
           
 void publish(MapApp app, java.lang.String publishedName, boolean writeToFrontendSpools, boolean readFromFrontendSpools, java.util.Collection<TiledRoverBuilderListener> tiledRoverBuilderListeners)
           
abstract  void reload()
           
 void removeChangeListener(javax.swing.event.ChangeListener nosey)
           
 RenderScaleRegion scaleRegionFor(java.lang.String legendName, MapViewFrame frame)
          Returns the proper rendering legend for the given name and frame.
 void setEnabled(boolean tizit)
           
 void setId(int newId)
           
 void setProfile(RoverProfile newProfile)
           
 int textTypeCodeFor(java.lang.String name)
           
protected  void updateGroups()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapSet

protected MapSet mapSet

space

protected MapSpace space

changeGadget

protected ChangeGadget changeGadget

areaTypes

protected NamedGoedels areaTypes

imageTypes

protected NamedGoedels imageTypes

lineTypes

protected NamedGoedels lineTypes

pointTypes

protected NamedGoedels pointTypes

textTypes

protected NamedGoedels textTypes

findItems

protected Naming<FindItemIndex> findItems

lookups

protected Naming<Lookup> lookups

renderLegends

protected Naming<RenderLegend> renderLegends

legendAliases

protected Naming<java.lang.String> legendAliases

enabled

protected boolean enabled

groups

public NamedGoedels groups

areaToGroup

public byte[] areaToGroup

lineToGroup

public byte[] lineToGroup

pointToGroup

public byte[] pointToGroup

textToGroup

public byte[] textToGroup

viewSettings

public MapSetViewSettings viewSettings
Constructor Detail

RoverSet

public RoverSet(MapSpace space,
                MapSet mapSet,
                int id)
Method Detail

graphicsInside

public abstract RoverBytes[] graphicsInside(MapViewFrame frame)
This returns the rover data necessary to render a given area at the given scale.


graphicsFor

public abstract RoverBytes graphicsFor(int dataID)
This returns the rover data necessary to render the map data item with the given dataID. This is used for highlight graphics and derived graphics (e.g. in ops mapsets).


dataFor

public abstract MapDataItem dataFor(int dataID)
This returns the MapDataItem with the given dataID.


getDataItemCount

public abstract int getDataItemCount()
This returns the number of data items.


reload

public abstract void reload()
                     throws java.io.IOException
Throws:
java.io.IOException

scaleRegionFor

public RenderScaleRegion scaleRegionFor(java.lang.String legendName,
                                        MapViewFrame frame)
Returns the proper rendering legend for the given name and frame. Generally these are scale-dependent, but subclasses may override.


areaTypeCodeFor

public int areaTypeCodeFor(java.lang.String name)

imageTypeCodeFor

public int imageTypeCodeFor(java.lang.String name)

lineTypeCodeFor

public int lineTypeCodeFor(java.lang.String name)

pointTypeCodeFor

public int pointTypeCodeFor(java.lang.String name)

textTypeCodeFor

public int textTypeCodeFor(java.lang.String name)

findItemNamed

public FindItemIndex findItemNamed(java.lang.String name)

lookupNamed

public Lookup lookupNamed(java.lang.String name)

connectivityNamed

public ElectricalConnectivity connectivityNamed(java.lang.String name)

getImageTypes

public NamedGoedels getImageTypes()
Returns the names and ids for each image graphic type.


getAreaTypes

public NamedGoedels getAreaTypes()
Returns the names and ids for each area graphic type.


getLineTypes

public NamedGoedels getLineTypes()
Returns the names and ids for each line graphic type.


getPointTypes

public NamedGoedels getPointTypes()
Returns the names and ids for each point graphic type.


getTextTypes

public NamedGoedels getTextTypes()
Returns the names and ids for each text graphic type.


getFindItems

public Naming<FindItemIndex> getFindItems()

getMapSet

public MapSet getMapSet()

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener nosey)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener nosey)

setEnabled

public void setEnabled(boolean tizit)

isEnabled

public boolean isEnabled()

fireChanged

public void fireChanged()

updateGroups

protected void updateGroups()

getGroupIDFor

public byte getGroupIDFor(java.lang.String graphicType)

isDrawable

public boolean isDrawable()

getProfile

public RoverProfile getProfile()

setProfile

public void setProfile(RoverProfile newProfile)

drawNameFor

public java.lang.String drawNameFor(RoverShape shape)

getId

public int getId()

setId

public void setId(int newId)

publish

public void publish(MapApp app,
                    java.lang.String publishedName)

publish

public void publish(MapApp app,
                    java.lang.String publishedName,
                    boolean writeToFrontendSpools,
                    boolean readFromFrontendSpools,
                    java.util.Collection<TiledRoverBuilderListener> tiledRoverBuilderListeners)