Class PlaceNameService


  • public class PlaceNameService
    extends java.lang.Object
    • Field Detail

      • TILING_SECTOR

        public static final Sector TILING_SECTOR
    • Constructor Detail

      • PlaceNameService

        public PlaceNameService​(java.lang.String service,
                                java.lang.String dataset,
                                java.lang.String fileCachePath,
                                Sector sector,
                                LatLon tileDelta,
                                java.awt.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:
        java.lang.IllegalArgumentException - if any parameter is null
    • Method Detail

      • createFileCachePathFromTile

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

        public long getTileNumber​(int row,
                                  int column)
      • createServiceURLFromSector

        public java.net.URL createServiceURLFromSector​(Sector sector)
                                                throws java.net.MalformedURLException
        Parameters:
        sector - request bounding box
        Returns:
        wfs request url
        Throws:
        java.net.MalformedURLException - thrown if error creating the url
        java.lang.IllegalArgumentException - if Sector is null
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getColor

        public final java.awt.Color getColor()
      • getBackgroundColor

        public final java.awt.Color getBackgroundColor()
      • getDataset

        public final java.lang.String getDataset()
      • getExtent

        public final Extent getExtent​(DrawContext dc)
        Parameters:
        dc - DrawContext
        Returns:
        extent of current drawcontext
        Throws:
        java.lang.IllegalArgumentException - if DrawContext is null
      • getFileCachePath

        public final java.lang.String getFileCachePath()
      • getFont

        public final java.awt.Font getFont()
      • getMaxDisplayDistance

        public final double getMaxDisplayDistance()
      • getMinDisplayDistance

        public final double getMinDisplayDistance()
      • getTileDelta

        public final LatLon getTileDelta()
      • getMaskingSector

        public final Sector getMaskingSector()
      • getService

        public final java.lang.String getService()
      • isAddVersionTag

        public boolean isAddVersionTag()
      • setAddVersionTag

        public void setAddVersionTag​(boolean addVersionTag)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isEnabled

        public final boolean isEnabled()
      • setColor

        public final void setColor​(java.awt.Color color)
        Parameters:
        color - color of label
        Throws:
        java.lang.IllegalArgumentException - if Color is null
      • setBackgroundColor

        public final void setBackgroundColor​(java.awt.Color backgroundColor)
      • 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:
        java.lang.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:
        java.lang.IllegalArgumentException - if minDisplayDistance is less than the current maximum display distance
      • markResourceAbsent

        public final void markResourceAbsent​(long tileNumber)
      • isResourceAbsent

        public final boolean isResourceAbsent​(long resourceNumber)
      • unmarkResourceAbsent

        public final void unmarkResourceAbsent​(long tileNumber)
      • validate

        public final java.lang.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.