com.partnersoft.maps.rover
Class RoverEntity

java.lang.Object
  extended by com.partnersoft.maps.rover.RoverEntity
All Implemented Interfaces:
Immutable

public class RoverEntity
extends java.lang.Object
implements Immutable

A RoverEntity is the standard data component for a RoverSet. It may contain one RoverData, representing non-geometric, associated data, and a list of zero or more RoverShapes, representing the geometric data for the entity.

Neither are required - a RoverEntity may have no data, and it may have no shapes.

Copyright 2008-2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
RoverEntity(java.util.List<RoverShape> shapes)
          Creates a RoverEntity with no data and the given list of shapes.
RoverEntity(java.util.Map data, boolean selectable, java.util.List<RoverShape> shapes)
           
RoverEntity(java.util.Map data, boolean selectable, RoverShape... shapes)
           
RoverEntity(java.util.Map data, java.util.List<RoverShape> shapes)
           
RoverEntity(java.util.Map data, RoverShape... shapes)
           
RoverEntity(RoverData data, boolean selectable, java.util.List<RoverShape> shapes)
          Creates a RoverEntity with the given data and list of shapes.
RoverEntity(RoverData data, boolean selectable, RoverShape... shapes)
          Creates a RoverEntity with the given data and array of shapes.
RoverEntity(RoverData data, java.util.List<RoverShape> shapes)
          Creates a RoverEntity with the given data and list of shapes.
RoverEntity(RoverData data, RoverShape... shapes)
          Creates a RoverEntity with the given data and array of shapes.
RoverEntity(RoverShape... shapes)
          Creates a RoverEntity with no data and the given list of shapes.
RoverEntity(RoverType type, Naming<java.lang.Object> data, boolean selectable, java.util.List<RoverShape> shapes)
           
RoverEntity(RoverType type, Naming<java.lang.Object> data, boolean selectable, RoverShape... shapes)
           
RoverEntity(RoverType type, Naming<java.lang.Object> data, java.util.List<RoverShape> shapes)
           
RoverEntity(RoverType type, Naming<java.lang.Object> data, RoverShape... shapes)
           
 
Method Summary
 RoverData getData()
           
 java.util.List<RoverShape> getShapes()
           
 boolean isSelectable()
           
 java.util.List<RoverShape> listShapes()
           
 XyPoint locationNearest(XyPoint reference)
          Returns a single geographic location for this shape nearest the given reference point.
 XyPoint locationNearest(XyPoint reference, double scale)
          Returns a single geographic location for this shape nearest the given reference point.
 XyPoint startLocation()
          Returns a reasonable single geographic location for this shape, without any information as to rendering scale or region desired.
 XyPoint startLocationAtScale(double scale)
          Returns a more accurate single geographic location for this shape, given the rendering scale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoverEntity

public RoverEntity(java.util.List<RoverShape> shapes)
Creates a RoverEntity with no data and the given list of shapes.


RoverEntity

public RoverEntity(RoverShape... shapes)
Creates a RoverEntity with no data and the given list of shapes.


RoverEntity

public RoverEntity(RoverData data,
                   java.util.List<RoverShape> shapes)
Creates a RoverEntity with the given data and list of shapes.

Parameters:
data -
shapes -

RoverEntity

public RoverEntity(RoverData data,
                   RoverShape... shapes)
Creates a RoverEntity with the given data and array of shapes.

Parameters:
data -
shapes -

RoverEntity

public RoverEntity(RoverData data,
                   boolean selectable,
                   java.util.List<RoverShape> shapes)
Creates a RoverEntity with the given data and list of shapes.

Parameters:
data -
shapes -

RoverEntity

public RoverEntity(RoverData data,
                   boolean selectable,
                   RoverShape... shapes)
Creates a RoverEntity with the given data and array of shapes.

Parameters:
data -
shapes -

RoverEntity

public RoverEntity(RoverType type,
                   Naming<java.lang.Object> data,
                   java.util.List<RoverShape> shapes)

RoverEntity

public RoverEntity(RoverType type,
                   Naming<java.lang.Object> data,
                   RoverShape... shapes)

RoverEntity

public RoverEntity(java.util.Map data,
                   RoverShape... shapes)

RoverEntity

public RoverEntity(java.util.Map data,
                   java.util.List<RoverShape> shapes)

RoverEntity

public RoverEntity(RoverType type,
                   Naming<java.lang.Object> data,
                   boolean selectable,
                   java.util.List<RoverShape> shapes)

RoverEntity

public RoverEntity(RoverType type,
                   Naming<java.lang.Object> data,
                   boolean selectable,
                   RoverShape... shapes)

RoverEntity

public RoverEntity(java.util.Map data,
                   boolean selectable,
                   RoverShape... shapes)

RoverEntity

public RoverEntity(java.util.Map data,
                   boolean selectable,
                   java.util.List<RoverShape> shapes)
Method Detail

startLocation

public XyPoint startLocation()
Returns a reasonable single geographic location for this shape, without any information as to rendering scale or region desired. This is generally the first point in the shape, and doesn't include pixel offsets.


startLocationAtScale

public XyPoint startLocationAtScale(double scale)
Returns a more accurate single geographic location for this shape, given the rendering scale. This is generally the first point in the shape, including pixel offsets.


locationNearest

public XyPoint locationNearest(XyPoint reference)
Returns a single geographic location for this shape nearest the given reference point. Doesn't include pixel offsets.


locationNearest

public XyPoint locationNearest(XyPoint reference,
                               double scale)
Returns a single geographic location for this shape nearest the given reference point. Includes pixel offsets for the given scale


getData

public RoverData getData()

getShapes

public java.util.List<RoverShape> getShapes()

listShapes

public java.util.List<RoverShape> listShapes()

isSelectable

public boolean isSelectable()