Class FeatureTableStyles

java.lang.Object
mil.nga.geopackage.extension.nga.style.FeatureTableStyles

public class FeatureTableStyles extends Object
Feature Table Styles, styles and icons for an individual feature table
Since:
3.2.0
  • Constructor Details

    • FeatureTableStyles

      public FeatureTableStyles(GeoPackage geoPackage, FeatureTable featureTable)
      Constructor
      Parameters:
      geoPackage - GeoPackage
      featureTable - feature table
    • FeatureTableStyles

      public FeatureTableStyles(GeoPackage geoPackage, GeometryColumns geometryColumns)
      Constructor
      Parameters:
      geoPackage - GeoPackage
      geometryColumns - geometry columns
    • FeatureTableStyles

      public FeatureTableStyles(GeoPackage geoPackage, Contents contents)
      Constructor
      Parameters:
      geoPackage - GeoPackage
      contents - feature contents
    • FeatureTableStyles

      public FeatureTableStyles(GeoPackage geoPackage, String featureTable)
      Constructor
      Parameters:
      geoPackage - GeoPackage
      featureTable - feature table
  • Method Details

    • getFeatureStyleExtension

      public FeatureStyleExtension getFeatureStyleExtension()
      Get the feature style extension
      Returns:
      feature style extension
    • getTableName

      public String getTableName()
      Get the feature table name
      Returns:
      feature table name
    • has

      public boolean has()
      Determine if the GeoPackage has the extension for the table
      Returns:
      true if has extension
    • createRelationships

      public void createRelationships()
      Create style, icon, table style, and table icon relationships for the feature table
    • hasRelationship

      public boolean hasRelationship()
      Check if feature table has a style, icon, table style, or table icon relationships
      Returns:
      true if has a relationship
    • createStyleRelationship

      public void createStyleRelationship()
      Create a style relationship for the feature table
    • hasStyleRelationship

      public boolean hasStyleRelationship()
      Determine if a style relationship exists for the feature table
      Returns:
      true if relationship exists
    • createTableStyleRelationship

      public void createTableStyleRelationship()
      Create a feature table style relationship
    • hasTableStyleRelationship

      public boolean hasTableStyleRelationship()
      Determine if feature table style relationship exists
      Returns:
      true if relationship exists
    • createIconRelationship

      public void createIconRelationship()
      Create an icon relationship for the feature table
    • hasIconRelationship

      public boolean hasIconRelationship()
      Determine if an icon relationship exists for the feature table
      Returns:
      true if relationship exists
    • createTableIconRelationship

      public void createTableIconRelationship()
      Create a feature table icon relationship
    • hasTableIconRelationship

      public boolean hasTableIconRelationship()
      Determine if feature table icon relationship exists
      Returns:
      true if relationship exists
    • deleteRelationships

      public void deleteRelationships()
      Delete the style and icon table and row relationships for the feature table
    • deleteStyleRelationship

      public void deleteStyleRelationship()
      Delete a style relationship for the feature table
    • deleteTableStyleRelationship

      public void deleteTableStyleRelationship()
      Delete a table style relationship for the feature table
    • deleteIconRelationship

      public void deleteIconRelationship()
      Delete a icon relationship for the feature table
    • deleteTableIconRelationship

      public void deleteTableIconRelationship()
      Delete a table icon relationship for the feature table
    • getStyleMappingDao

      public StyleMappingDao getStyleMappingDao()
      Get a Style Mapping DAO
      Returns:
      style mapping DAO
    • getTableStyleMappingDao

      public StyleMappingDao getTableStyleMappingDao()
      Get a Table Style Mapping DAO
      Returns:
      table style mapping DAO
    • getIconMappingDao

      public StyleMappingDao getIconMappingDao()
      Get a Icon Mapping DAO
      Returns:
      icon mapping DAO
    • getTableIconMappingDao

      public StyleMappingDao getTableIconMappingDao()
      Get a Table Icon Mapping DAO
      Returns:
      table icon mapping DAO
    • getStyleDao

      public StyleDao getStyleDao()
      Get a style DAO
      Returns:
      style DAO
    • getIconDao

      public IconDao getIconDao()
      Get a icon DAO
      Returns:
      icon DAO
    • getTableFeatureStyles

      public FeatureStyles getTableFeatureStyles()
      Get the table feature styles
      Returns:
      table feature styles or null
    • getTableStyles

      public Styles getTableStyles()
      Get the table styles
      Returns:
      table styles or null
    • getCachedTableStyles

      public Styles getCachedTableStyles()
      Get the cached table styles, querying and caching if needed
      Returns:
      cached table styles
    • getTableStyle

      public StyleRow getTableStyle(GeometryType geometryType)
      Get the table style of the geometry type
      Parameters:
      geometryType - geometry type
      Returns:
      style row
    • getTableStyleDefault

      public StyleRow getTableStyleDefault()
      Get the table style default
      Returns:
      style row
    • getTableIcons

      public Icons getTableIcons()
      Get the table icons
      Returns:
      table icons or null
    • getCachedTableIcons

      public Icons getCachedTableIcons()
      Get the cached table icons, querying and caching if needed
      Returns:
      cached table icons
    • getTableIcon

      public IconRow getTableIcon(GeometryType geometryType)
      Get the table icon of the geometry type
      Parameters:
      geometryType - geometry type
      Returns:
      icon row
    • getTableIconDefault

      public IconRow getTableIconDefault()
      Get the table icon default
      Returns:
      icon row
    • getStyles

      public Map<Long,StyleRow> getStyles()
      Get all styles used by the feature table
      Returns:
      style rows mapped by ids
      Since:
      6.3.0
    • getFeatureStyles

      public Map<Long,StyleRow> getFeatureStyles()
      Get all styles used by feature rows in the table
      Returns:
      style rows mapped by ids
      Since:
      6.3.0
    • getIcons

      public Map<Long,IconRow> getIcons()
      Get all icons used by the feature table
      Returns:
      icon rows mapped by ids
      Since:
      6.3.0
    • getFeatureIcons

      public Map<Long,IconRow> getFeatureIcons()
      Get all icons used by feature rows in the table
      Returns:
      icon rows mapped by ids
      Since:
      6.3.0
    • getFeatureStyles

      public FeatureStyles getFeatureStyles(FeatureRow featureRow)
      Get the feature styles for the feature row
      Parameters:
      featureRow - feature row
      Returns:
      feature styles or null
    • getFeatureStyles

      public FeatureStyles getFeatureStyles(long featureId)
      Get the feature styles for the feature id
      Parameters:
      featureId - feature id
      Returns:
      feature styles or null
    • getFeatureStyle

      public FeatureStyle getFeatureStyle(FeatureRow featureRow)
      Get the feature style (style and icon) of the feature row, searching in order: feature geometry type style or icon, feature default style or icon, table geometry type style or icon, table default style or icon
      Parameters:
      featureRow - feature row
      Returns:
      feature style
    • getFeatureStyle

      public FeatureStyle getFeatureStyle(FeatureRow featureRow, GeometryType geometryType)
      Get the feature style (style and icon) of the feature row with the provided geometry type, searching in order: feature geometry type style or icon, feature default style or icon, table geometry type style or icon, table default style or icon
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      Returns:
      feature style
    • getFeatureStyleDefault

      public FeatureStyle getFeatureStyleDefault(FeatureRow featureRow)
      Get the feature style default (style and icon) of the feature row, searching in order: feature default style or icon, table default style or icon
      Parameters:
      featureRow - feature row
      Returns:
      feature style
    • getFeatureStyle

      public FeatureStyle getFeatureStyle(long featureId, GeometryType geometryType)
      Get the feature style (style and icon) of the feature, searching in order: feature geometry type style or icon, feature default style or icon, table geometry type style or icon, table default style or icon
      Parameters:
      featureId - feature id
      geometryType - geometry type
      Returns:
      feature style
    • getFeatureStyleDefault

      public FeatureStyle getFeatureStyleDefault(long featureId)
      Get the feature style (style and icon) of the feature, searching in order: feature geometry type style or icon, feature default style or icon, table geometry type style or icon, table default style or icon
      Parameters:
      featureId - feature id
      Returns:
      feature style
    • getStyles

      public Styles getStyles(FeatureRow featureRow)
      Get the styles for the feature row
      Parameters:
      featureRow - feature row
      Returns:
      styles or null
    • getStyles

      public Styles getStyles(long featureId)
      Get the styles for the feature id
      Parameters:
      featureId - feature id
      Returns:
      styles or null
    • getStyle

      public StyleRow getStyle(FeatureRow featureRow)
      Get the style of the feature row, searching in order: feature geometry type style, feature default style, table geometry type style, table default style
      Parameters:
      featureRow - feature row
      Returns:
      style row
    • getStyle

      public StyleRow getStyle(FeatureRow featureRow, GeometryType geometryType)
      Get the style of the feature row with the provided geometry type, searching in order: feature geometry type style, feature default style, table geometry type style, table default style
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      Returns:
      style row
    • getStyleDefault

      public StyleRow getStyleDefault(FeatureRow featureRow)
      Get the default style of the feature row, searching in order: feature default style, table default style
      Parameters:
      featureRow - feature row
      Returns:
      style row
    • getStyle

      public StyleRow getStyle(long featureId, GeometryType geometryType)
      Get the style of the feature, searching in order: feature geometry type style, feature default style, table geometry type style, table default style
      Parameters:
      featureId - feature id
      geometryType - geometry type
      Returns:
      style row
    • getStyleDefault

      public StyleRow getStyleDefault(long featureId)
      Get the default style of the feature, searching in order: feature default style, table default style
      Parameters:
      featureId - feature id
      Returns:
      style row
    • getIcons

      public Icons getIcons(FeatureRow featureRow)
      Get the icons for the feature row
      Parameters:
      featureRow - feature row
      Returns:
      icons or null
    • getIcons

      public Icons getIcons(long featureId)
      Get the icons for the feature id
      Parameters:
      featureId - feature id
      Returns:
      icons or null
    • getIcon

      public IconRow getIcon(FeatureRow featureRow)
      Get the icon of the feature row, searching in order: feature geometry type icon, feature default icon, table geometry type icon, table default icon
      Parameters:
      featureRow - feature row
      Returns:
      icon row
    • getIcon

      public IconRow getIcon(FeatureRow featureRow, GeometryType geometryType)
      Get the icon of the feature row with the provided geometry type, searching in order: feature geometry type icon, feature default icon, table geometry type icon, table default icon
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      Returns:
      icon row
    • getIconDefault

      public IconRow getIconDefault(FeatureRow featureRow)
      Get the default icon of the feature row, searching in order: feature default icon, table default icon
      Parameters:
      featureRow - feature row
      Returns:
      icon row
    • getIcon

      public IconRow getIcon(long featureId, GeometryType geometryType)
      Get the icon of the feature, searching in order: feature geometry type icon, feature default icon, table geometry type icon, table default icon
      Parameters:
      featureId - feature id
      geometryType - geometry type
      Returns:
      icon row
    • getIconDefault

      public IconRow getIconDefault(long featureId)
      Get the default icon of the feature, searching in order: feature default icon, table default icon
      Parameters:
      featureId - feature id
      Returns:
      icon row
    • setTableFeatureStyles

      public void setTableFeatureStyles(FeatureStyles featureStyles)
      Set the feature table default feature styles
      Parameters:
      featureStyles - default feature styles
    • setTableStyles

      public void setTableStyles(Styles styles)
      Set the feature table default styles
      Parameters:
      styles - default styles
    • setTableStyleDefault

      public void setTableStyleDefault(StyleRow style)
      Set the feature table style default
      Parameters:
      style - style row
    • setTableStyle

      public void setTableStyle(GeometryType geometryType, StyleRow style)
      Set the feature table style for the geometry type
      Parameters:
      geometryType - geometry type
      style - style row
    • setTableIcons

      public void setTableIcons(Icons icons)
      Set the feature table default icons
      Parameters:
      icons - default icons
    • setTableIconDefault

      public void setTableIconDefault(IconRow icon)
      Set the feature table icon default
      Parameters:
      icon - icon row
    • setTableIcon

      public void setTableIcon(GeometryType geometryType, IconRow icon)
      Set the feature table icon for the geometry type
      Parameters:
      geometryType - geometry type
      icon - icon row
    • setFeatureStyles

      public void setFeatureStyles(FeatureRow featureRow, FeatureStyles featureStyles)
      Set the feature styles for the feature row
      Parameters:
      featureRow - feature row
      featureStyles - feature styles
    • setFeatureStyles

      public void setFeatureStyles(long featureId, FeatureStyles featureStyles)
      Set the feature styles for the feature table and feature id
      Parameters:
      featureId - feature id
      featureStyles - feature styles
    • setFeatureStyle

      public void setFeatureStyle(FeatureRow featureRow, FeatureStyle featureStyle)
      Set the feature style (style and icon) of the feature row
      Parameters:
      featureRow - feature row
      featureStyle - feature style
    • setFeatureStyle

      public void setFeatureStyle(FeatureRow featureRow, GeometryType geometryType, FeatureStyle featureStyle)
      Set the feature style (style and icon) of the feature row for the specified geometry type
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      featureStyle - feature style
    • setFeatureStyleDefault

      public void setFeatureStyleDefault(FeatureRow featureRow, FeatureStyle featureStyle)
      Set the feature style default (style and icon) of the feature row
      Parameters:
      featureRow - feature row
      featureStyle - feature style
    • setFeatureStyle

      public void setFeatureStyle(long featureId, GeometryType geometryType, FeatureStyle featureStyle)
      Set the feature style (style and icon) of the feature
      Parameters:
      featureId - feature id
      geometryType - geometry type
      featureStyle - feature style
    • setFeatureStyleDefault

      public void setFeatureStyleDefault(long featureId, FeatureStyle featureStyle)
      Set the feature style (style and icon) of the feature
      Parameters:
      featureId - feature id
      featureStyle - feature style
    • setStyles

      public void setStyles(FeatureRow featureRow, Styles styles)
      Set the styles for the feature row
      Parameters:
      featureRow - feature row
      styles - styles
    • setStyles

      public void setStyles(long featureId, Styles styles)
      Set the styles for the feature table and feature id
      Parameters:
      featureId - feature id
      styles - styles
    • setStyle

      public void setStyle(FeatureRow featureRow, StyleRow style)
      Set the style of the feature row
      Parameters:
      featureRow - feature row
      style - style row
    • setStyle

      public void setStyle(FeatureRow featureRow, GeometryType geometryType, StyleRow style)
      Set the style of the feature row for the specified geometry type
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      style - style row
    • setStyleDefault

      public void setStyleDefault(FeatureRow featureRow, StyleRow style)
      Set the default style of the feature row
      Parameters:
      featureRow - feature row
      style - style row
    • setStyle

      public void setStyle(long featureId, GeometryType geometryType, StyleRow style)
      Set the style of the feature
      Parameters:
      featureId - feature id
      geometryType - geometry type
      style - style row
    • setStyleDefault

      public void setStyleDefault(long featureId, StyleRow style)
      Set the default style of the feature
      Parameters:
      featureId - feature id
      style - style row
    • setIcons

      public void setIcons(FeatureRow featureRow, Icons icons)
      Set the icons for the feature row
      Parameters:
      featureRow - feature row
      icons - icons
    • setIcons

      public void setIcons(long featureId, Icons icons)
      Set the icons for the feature table and feature id
      Parameters:
      featureId - feature id
      icons - icons
    • setIcon

      public void setIcon(FeatureRow featureRow, IconRow icon)
      Set the icon of the feature row
      Parameters:
      featureRow - feature row
      icon - icon row
    • setIcon

      public void setIcon(FeatureRow featureRow, GeometryType geometryType, IconRow icon)
      Set the icon of the feature row for the specified geometry type
      Parameters:
      featureRow - feature row
      geometryType - geometry type
      icon - icon row
    • setIconDefault

      public void setIconDefault(FeatureRow featureRow, IconRow icon)
      Set the default icon of the feature row
      Parameters:
      featureRow - feature row
      icon - icon row
    • setIcon

      public void setIcon(long featureId, GeometryType geometryType, IconRow icon)
      Get the icon of the feature, searching in order: feature geometry type icon, feature default icon, table geometry type icon, table default icon
      Parameters:
      featureId - feature id
      geometryType - geometry type
      icon - icon row
    • setIconDefault

      public void setIconDefault(long featureId, IconRow icon)
      Set the default icon of the feature
      Parameters:
      featureId - feature id
      icon - icon row
    • deleteAllFeatureStyles

      public void deleteAllFeatureStyles()
      Delete all feature styles including table styles, table icons, style, and icons
    • deleteAllStyles

      public void deleteAllStyles()
      Delete all styles including table styles and feature row styles
    • deleteAllIcons

      public void deleteAllIcons()
      Delete all icons including table icons and feature row icons
    • deleteTableFeatureStyles

      public void deleteTableFeatureStyles()
      Delete the feature table feature styles
    • deleteTableStyles

      public void deleteTableStyles()
      Delete the feature table styles
    • deleteTableStyleDefault

      public void deleteTableStyleDefault()
      Delete the feature table default style
    • deleteTableStyle

      public void deleteTableStyle(GeometryType geometryType)
      Delete the feature table style for the geometry type
      Parameters:
      geometryType - geometry type
    • deleteTableIcons

      public void deleteTableIcons()
      Delete the feature table icons
    • deleteTableIconDefault

      public void deleteTableIconDefault()
      Delete the feature table default icon
    • deleteTableIcon

      public void deleteTableIcon(GeometryType geometryType)
      Delete the feature table icon for the geometry type
      Parameters:
      geometryType - geometry type
    • clearCachedTableFeatureStyles

      public void clearCachedTableFeatureStyles()
      Clear the cached table feature styles
    • clearCachedTableStyles

      public void clearCachedTableStyles()
      Clear the cached table styles
    • clearCachedTableIcons

      public void clearCachedTableIcons()
      Clear the cached table icons
    • deleteFeatureStyles

      public void deleteFeatureStyles()
      Delete all feature styles
    • deleteStyles

      public void deleteStyles()
      Delete all styles
    • deleteStyles

      public void deleteStyles(FeatureRow featureRow)
      Delete feature row styles
      Parameters:
      featureRow - feature row
    • deleteStyles

      public void deleteStyles(long featureId)
      Delete feature row styles
      Parameters:
      featureId - feature id
    • deleteStyleDefault

      public void deleteStyleDefault(FeatureRow featureRow)
      Delete the feature row default style
      Parameters:
      featureRow - feature row
    • deleteStyleDefault

      public void deleteStyleDefault(long featureId)
      Delete the feature row default style
      Parameters:
      featureId - feature id
    • deleteStyle

      public void deleteStyle(FeatureRow featureRow)
      Delete the feature row style for the feature row geometry type
      Parameters:
      featureRow - feature row
    • deleteStyle

      public void deleteStyle(FeatureRow featureRow, GeometryType geometryType)
      Delete the feature row style for the geometry type
      Parameters:
      featureRow - feature row
      geometryType - geometry type
    • deleteStyle

      public void deleteStyle(long featureId, GeometryType geometryType)
      Delete the feature row style for the geometry type
      Parameters:
      featureId - feature id
      geometryType - geometry type
    • deleteIcons

      public void deleteIcons()
      Delete all icons
    • deleteIcons

      public void deleteIcons(FeatureRow featureRow)
      Delete feature row icons
      Parameters:
      featureRow - feature row
    • deleteIcons

      public void deleteIcons(long featureId)
      Delete feature row icons
      Parameters:
      featureId - feature id
    • deleteIconDefault

      public void deleteIconDefault(FeatureRow featureRow)
      Delete the feature row default icon
      Parameters:
      featureRow - feature row
    • deleteIconDefault

      public void deleteIconDefault(long featureId)
      Delete the feature row default icon
      Parameters:
      featureId - feature id
    • deleteIcon

      public void deleteIcon(FeatureRow featureRow)
      Delete the feature row icon for the feature row geometry type
      Parameters:
      featureRow - feature row
    • deleteIcon

      public void deleteIcon(FeatureRow featureRow, GeometryType geometryType)
      Delete the feature row icon for the geometry type
      Parameters:
      featureRow - feature row
      geometryType - geometry type
    • deleteIcon

      public void deleteIcon(long featureId, GeometryType geometryType)
      Delete the feature row icon for the geometry type
      Parameters:
      featureId - feature id
      geometryType - geometry type
    • getAllTableStyleIds

      public List<Long> getAllTableStyleIds()
      Get all the unique style row ids the table maps to
      Returns:
      style row ids
    • getAllTableIconIds

      public List<Long> getAllTableIconIds()
      Get all the unique icon row ids the table maps to
      Returns:
      icon row ids
    • getAllStyleIds

      public List<Long> getAllStyleIds()
      Get all the unique style row ids the features map to
      Returns:
      style row ids
    • getAllIconIds

      public List<Long> getAllIconIds()
      Get all the unique icon row ids the features map to
      Returns:
      icon row ids
    • calculatePixelBounds

      public PixelBounds calculatePixelBounds()
      Calculate style pixel bounds
      Returns:
      pixel bounds
      Since:
      6.3.0
    • calculatePixelBounds

      public PixelBounds calculatePixelBounds(float density)
      Calculate style pixel bounds
      Parameters:
      density - display density: DisplayMetrics.density
      Returns:
      pixel bounds
      Since:
      6.3.0