Class PropertiesManagerCore<T extends GeoPackageCore>
- java.lang.Object
-
- mil.nga.geopackage.extension.nga.properties.PropertiesManagerCore<T>
-
- Type Parameters:
T
- templated GeoPackage object
public abstract class PropertiesManagerCore<T extends GeoPackageCore> extends Object
Properties Manager Core using the Properties Extension on a group of cached GeoPackages- Since:
- 3.0.2
- Author:
- osbornb
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PropertiesManagerCore()
Constructorprotected
PropertiesManagerCore(Collection<T> geoPackages)
Constructorprotected
PropertiesManagerCore(GeoPackageCoreCache<T> cache)
Constructorprotected
PropertiesManagerCore(T geoPackage)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addGeoPackage(T geoPackage)
Add GeoPackagevoid
addGeoPackages(Collection<T> geoPackages)
Add a collection of GeoPackagesint
addValue(String property, String value)
Add a property value to all GeoPackagesboolean
addValue(String geoPackage, String property, String value)
Add a property value to a specified GeoPackagevoid
clearGeoPackages()
Clears all cached GeoPackages but does not close themboolean
closeGeoPackage(String name)
Close the GeoPackage with namevoid
closeGeoPackages()
Close all GeoPackages in the managervoid
closeGeoPackages(Collection<String> names)
Close GeoPackages with namesvoid
closeRetainGeoPackages(Collection<String> retain)
Close GeoPackages not specified in the retain GeoPackage namesint
deleteAll()
Delete all properties and values from all GeoPackagesboolean
deleteAll(String geoPackage)
Delete all properties and values from a specified GeoPackageint
deleteProperty(String property)
Delete the property and values from all GeoPackagesboolean
deleteProperty(String geoPackage, String property)
Delete the property and values from a specified GeoPackageint
deleteValue(String property, String value)
Delete the property value from all GeoPackagesboolean
deleteValue(String geoPackage, String property, String value)
Delete the property value from a specified GeoPackageT
getGeoPackage(String name)
Get the GeoPackage for the GeoPackage nameSet<String>
getGeoPackageNames()
Get the GeoPackage namesList<T>
getGeoPackages()
Get the GeoPackagesSet<String>
getProperties()
Get the unique propertiesprotected abstract PropertiesCoreExtension<T,?,?,?>
getPropertiesExtension(T geoPackage)
Create a properties extension from the GeoPackageSet<String>
getValues(String property)
Get the unique values for the propertyboolean
hasGeoPackage(String name)
Checks if the GeoPackage name existsList<T>
hasProperty(String property)
Get the GeoPackages with the property nameList<T>
hasValue(String property, String value)
Get the GeoPackages with the property name and valueboolean
hasValues(String property)
Check if the property has any valuesList<T>
missingProperty(String property)
Get the GeoPackages missing the property nameList<T>
missingValue(String property, String value)
Get the GeoPackages missing the property name and valueint
numGeoPackages()
Get the number of GeoPackagesint
numProperties()
Get the number of unique propertiesint
numValues(String property)
Get the number of unique values for the propertyboolean
removeAndCloseGeoPackage(String name)
Remove and close the GeoPackage with name, same ascloseGeoPackage(String)
void
removeExtension()
Remove the extension from all GeoPackagesvoid
removeExtension(String geoPackage)
Remove the extension from a specified GeoPackageT
removeGeoPackage(String name)
Remove the GeoPackage with the name but does not close it
-
-
-
Constructor Detail
-
PropertiesManagerCore
protected PropertiesManagerCore()
Constructor
-
PropertiesManagerCore
protected PropertiesManagerCore(T geoPackage)
Constructor- Parameters:
geoPackage
- GeoPackage
-
PropertiesManagerCore
protected PropertiesManagerCore(Collection<T> geoPackages)
Constructor- Parameters:
geoPackages
- collection of GeoPackages
-
PropertiesManagerCore
protected PropertiesManagerCore(GeoPackageCoreCache<T> cache)
Constructor- Parameters:
cache
- GeoPackage cache
-
-
Method Detail
-
getPropertiesExtension
protected abstract PropertiesCoreExtension<T,?,?,?> getPropertiesExtension(T geoPackage)
Create a properties extension from the GeoPackage- Parameters:
geoPackage
- GeoPackage- Returns:
- properties extension
-
numGeoPackages
public int numGeoPackages()
Get the number of GeoPackages- Returns:
- GeoPackage count
-
getGeoPackages
public List<T> getGeoPackages()
Get the GeoPackages- Returns:
- collection of GeoPackages
-
hasGeoPackage
public boolean hasGeoPackage(String name)
Checks if the GeoPackage name exists- Parameters:
name
- GeoPackage name- Returns:
- true if exists
-
getGeoPackage
public T getGeoPackage(String name)
Get the GeoPackage for the GeoPackage name- Parameters:
name
- GeoPackage name- Returns:
- GeoPackage
-
addGeoPackages
public void addGeoPackages(Collection<T> geoPackages)
Add a collection of GeoPackages- Parameters:
geoPackages
- GeoPackages
-
addGeoPackage
public void addGeoPackage(T geoPackage)
Add GeoPackage- Parameters:
geoPackage
- GeoPackage
-
closeGeoPackages
public void closeGeoPackages()
Close all GeoPackages in the manager
-
removeGeoPackage
public T removeGeoPackage(String name)
Remove the GeoPackage with the name but does not close it- Parameters:
name
- GeoPackage name- Returns:
- removed GeoPackage
-
clearGeoPackages
public void clearGeoPackages()
Clears all cached GeoPackages but does not close them
-
removeAndCloseGeoPackage
public boolean removeAndCloseGeoPackage(String name)
Remove and close the GeoPackage with name, same ascloseGeoPackage(String)
- Parameters:
name
- GeoPackage name- Returns:
- true if found, removed, and closed
-
closeGeoPackage
public boolean closeGeoPackage(String name)
Close the GeoPackage with name- Parameters:
name
- GeoPackage name- Returns:
- true if found and closed
-
closeRetainGeoPackages
public void closeRetainGeoPackages(Collection<String> retain)
Close GeoPackages not specified in the retain GeoPackage names- Parameters:
retain
- GeoPackages to retain
-
closeGeoPackages
public void closeGeoPackages(Collection<String> names)
Close GeoPackages with names- Parameters:
names
- GeoPackage names
-
numProperties
public int numProperties()
Get the number of unique properties- Returns:
- property count
-
getProperties
public Set<String> getProperties()
Get the unique properties- Returns:
- set of properties
-
hasProperty
public List<T> hasProperty(String property)
Get the GeoPackages with the property name- Parameters:
property
- property name- Returns:
- GeoPackages
-
missingProperty
public List<T> missingProperty(String property)
Get the GeoPackages missing the property name- Parameters:
property
- property name- Returns:
- GeoPackages
-
numValues
public int numValues(String property)
Get the number of unique values for the property- Parameters:
property
- property name- Returns:
- number of values
-
hasValues
public boolean hasValues(String property)
Check if the property has any values- Parameters:
property
- property name- Returns:
- true if has any values
-
getValues
public Set<String> getValues(String property)
Get the unique values for the property- Parameters:
property
- property name- Returns:
- set of values
-
hasValue
public List<T> hasValue(String property, String value)
Get the GeoPackages with the property name and value- Parameters:
property
- property namevalue
- property value- Returns:
- GeoPackages
-
missingValue
public List<T> missingValue(String property, String value)
Get the GeoPackages missing the property name and value- Parameters:
property
- property namevalue
- property value- Returns:
- GeoPackages
-
addValue
public int addValue(String property, String value)
Add a property value to all GeoPackages- Parameters:
property
- property namevalue
- value- Returns:
- number of GeoPackages added to
-
addValue
public boolean addValue(String geoPackage, String property, String value)
Add a property value to a specified GeoPackage- Parameters:
geoPackage
- GeoPackage nameproperty
- property namevalue
- value- Returns:
- true if added
-
deleteProperty
public int deleteProperty(String property)
Delete the property and values from all GeoPackages- Parameters:
property
- property name- Returns:
- number of GeoPackages deleted from
-
deleteProperty
public boolean deleteProperty(String geoPackage, String property)
Delete the property and values from a specified GeoPackage- Parameters:
geoPackage
- GeoPackage nameproperty
- property name- Returns:
- true if deleted
-
deleteValue
public int deleteValue(String property, String value)
Delete the property value from all GeoPackages- Parameters:
property
- property namevalue
- property value- Returns:
- number of GeoPackages deleted from
-
deleteValue
public boolean deleteValue(String geoPackage, String property, String value)
Delete the property value from a specified GeoPackage- Parameters:
geoPackage
- GeoPackage nameproperty
- property namevalue
- property value- Returns:
- true if deleted
-
deleteAll
public int deleteAll()
Delete all properties and values from all GeoPackages- Returns:
- number of GeoPackages deleted from
-
deleteAll
public boolean deleteAll(String geoPackage)
Delete all properties and values from a specified GeoPackage- Parameters:
geoPackage
- GeoPackage name- Returns:
- true if any deleted
-
removeExtension
public void removeExtension()
Remove the extension from all GeoPackages
-
removeExtension
public void removeExtension(String geoPackage)
Remove the extension from a specified GeoPackage- Parameters:
geoPackage
- GeoPackage name
-
-