Class PropertiesCoreExtension<TGeoPackage extends GeoPackageCore,​TRow extends UserCoreRow<?,​?>,​TResult extends UserCoreResult<?,​?,​TRow>,​TDao extends UserCoreDao<?,​?,​TRow,​TResult>>

    • Field Detail

      • EXTENSION_NAME_NO_AUTHOR

        public static final String EXTENSION_NAME_NO_AUTHOR
        Extension name without the author
        See Also:
        Constant Field Values
      • EXTENSION_NAME

        public static final String EXTENSION_NAME
        Extension, with author and name
      • EXTENSION_DEFINITION

        public static final String EXTENSION_DEFINITION
        Extension definition URL
      • TABLE_NAME

        public static final String TABLE_NAME
        Table name
    • Constructor Detail

      • PropertiesCoreExtension

        protected PropertiesCoreExtension​(TGeoPackage geoPackage)
        Constructor
        Parameters:
        geoPackage - GeoPackage
    • Method Detail

      • getOrCreate

        public Extensions getOrCreate()
        Get or create the extension
        Returns:
        extension
      • has

        public boolean has()
        Determine if the GeoPackage has the extension
        Returns:
        true if has extension
      • getDao

        protected abstract TDao getDao()
        Get the table Data Access Object
        Returns:
        Data Access Object
      • newRow

        protected abstract TRow newRow()
        Get a new row
        Returns:
        new row
      • numProperties

        public int numProperties()
        Get the number of properties
        Returns:
        property count
      • getProperties

        public List<String> getProperties()
        Get the properties
        Returns:
        list of properties
      • hasProperty

        public boolean hasProperty​(String property)
        Check if the property exists, same call as hasValues(String)
        Parameters:
        property - property name
        Returns:
        true if has property
      • numValues

        public int numValues()
        Get the number of total values combined for all properties
        Returns:
        number of total property values
      • numValues

        public int numValues​(String property)
        Get the number of values for the property
        Parameters:
        property - property name
        Returns:
        number of values
      • hasSingleValue

        public boolean hasSingleValue​(String property)
        Check if the property has a single value
        Parameters:
        property - property name
        Returns:
        true if has a single value
      • hasValues

        public boolean hasValues​(String property)
        Check if the property has any values
        Parameters:
        property - property name
        Returns:
        true if has any values
      • getValue

        public String getValue​(String property)
        Get the first value for the property
        Parameters:
        property - property name
        Returns:
        value or null
      • getValues

        public List<String> getValues​(String property)
        Get the values for the property
        Parameters:
        property - property name
        Returns:
        list of values
      • hasValue

        public boolean hasValue​(String property,
                                String value)
        Check if the property has the value
        Parameters:
        property - property name
        value - property value
        Returns:
        true if property has the value
      • addValue

        public boolean addValue​(String property,
                                String value)
        Add a property value, creating the extension if needed
        Parameters:
        property - property name
        value - value
        Returns:
        true if added, false if already existed
      • deleteProperty

        public int deleteProperty​(String property)
        Delete the property and all the property values
        Parameters:
        property - property name
        Returns:
        deleted values count
      • deleteValue

        public int deleteValue​(String property,
                               String value)
        Delete the property value
        Parameters:
        property - property name
        value - property value
        Returns:
        deleted values count
      • deleteAll

        public int deleteAll()
        Delete all properties and values
        Returns:
        deleted values count
      • removeExtension

        public void removeExtension()
        Remove the extension