NASA World Wind

gov.nasa.worldwind.layers.placename
Class PlaceNameService

java.lang.Object
  extended by gov.nasa.worldwind.layers.placename.PlaceNameService

public class PlaceNameService
extends Object


Field Summary
static Sector TILING_SECTOR
           
 
Constructor Summary
PlaceNameService(String service, String dataset, String fileCachePath, Sector sector, LatLon tileDelta, Font font, boolean versionTag)
          PlaceNameService Constructor
 
Method Summary
 String createFileCachePathFromTile(int row, int column)
           
 URL createServiceURLFromSector(Sector sector)
           
 PlaceNameService deepCopy()
           
 boolean equals(Object o)
           
 Color getBackgroundColor()
           
 Color getColor()
           
 String getDataset()
           
 Extent getExtent(DrawContext dc)
           
 String getFileCachePath()
           
 Font getFont()
           
 Sector getMaskingSector()
           
 double getMaxDisplayDistance()
           
 double getMinDisplayDistance()
           
 String getService()
           
 LatLon getTileDelta()
           
 long getTileNumber(int row, int column)
           
 int hashCode()
           
 boolean isAddVersionTag()
           
 boolean isEnabled()
           
 boolean isResourceAbsent(long resourceNumber)
           
 void markResourceAbsent(long tileNumber)
           
 void setAddVersionTag(boolean addVersionTag)
           
 void setBackgroundColor(Color backgroundColor)
           
 void setColor(Color color)
           
 void setEnabled(boolean enabled)
           
 void setMaxDisplayDistance(double maxDisplayDistance)
           
 void setMinDisplayDistance(double minDisplayDistance)
           
 void unmarkResourceAbsent(long tileNumber)
           
 String validate()
          Determines if this PlaceNameService constructor arguments are valid.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TILING_SECTOR

public static final Sector TILING_SECTOR
Constructor Detail

PlaceNameService

public PlaceNameService(String service,
                        String dataset,
                        String fileCachePath,
                        Sector sector,
                        LatLon tileDelta,
                        Font font,
                        boolean versionTag)
PlaceNameService Constructor

Parameters:
service - server hostong placename data
dataset - name of the dataset
fileCachePath - location of cache
sector - sets the masking sector for this service.
tileDelta - tile size
font - font for rendering name
versionTag - dictates if the wfs version tag is added to requests
Throws:
IllegalArgumentException - if any parameter is null
Method Detail

createFileCachePathFromTile

public String createFileCachePathFromTile(int row,
                                          int column)
Parameters:
row - row
column - column
Returns:
path of the tile in the cache
Throws:
IllegalArgumentException - if either row or column is less than zero

createServiceURLFromSector

public URL createServiceURLFromSector(Sector sector)
                               throws MalformedURLException
Parameters:
sector - request bounding box
Returns:
wfs request url
Throws:
MalformedURLException - thrown if error creating the url
IllegalArgumentException - if Sector is null

deepCopy

public final PlaceNameService deepCopy()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getBackgroundColor

public final Color getBackgroundColor()

getColor

public final Color getColor()

getDataset

public final String getDataset()

getExtent

public final Extent getExtent(DrawContext dc)
Parameters:
dc - DrawContext
Returns:
extent of current drawcontext
Throws:
IllegalArgumentException - if DrawContext is null

getFileCachePath

public final String getFileCachePath()

getFont

public final Font getFont()

getMaskingSector

public final Sector getMaskingSector()

getMaxDisplayDistance

public final double getMaxDisplayDistance()

getMinDisplayDistance

public final double getMinDisplayDistance()

getService

public final String getService()

getTileDelta

public final LatLon getTileDelta()

getTileNumber

public long getTileNumber(int row,
                          int column)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isAddVersionTag

public boolean isAddVersionTag()

isEnabled

public final boolean isEnabled()

isResourceAbsent

public final boolean isResourceAbsent(long resourceNumber)

markResourceAbsent

public final void markResourceAbsent(long tileNumber)

setAddVersionTag

public void setAddVersionTag(boolean addVersionTag)

setBackgroundColor

public final void setBackgroundColor(Color backgroundColor)

setColor

public final void setColor(Color color)
Parameters:
color - color of label
Throws:
IllegalArgumentException - if Color is null

setEnabled

public final void setEnabled(boolean enabled)

setMaxDisplayDistance

public final void setMaxDisplayDistance(double maxDisplayDistance)
Parameters:
maxDisplayDistance - maximum distance to display labels for this service
Throws:
IllegalArgumentException - if maxDisplayDistance is less than the current minimum display distance

setMinDisplayDistance

public final void setMinDisplayDistance(double minDisplayDistance)
Parameters:
minDisplayDistance - minimum distance to display labels for this service
Throws:
IllegalArgumentException - if minDisplayDistance is less than the current maximum display distance

unmarkResourceAbsent

public final void unmarkResourceAbsent(long tileNumber)

validate

public final String validate()
Determines if this PlaceNameService constructor arguments are valid.

Returns:
null if valid, otherwise a string message containing a description of why it is invalid.

NASA World Wind