mil.nga.geopackage.extension.SchemaExtension Maven / Gradle / Ivy
package mil.nga.geopackage.extension;
import mil.nga.geopackage.GeoPackageConstants;
import mil.nga.geopackage.GeoPackageCore;
import mil.nga.geopackage.property.GeoPackageProperties;
import mil.nga.geopackage.property.PropertyConstants;
/**
* Schema extension
*
* @author osbornb
* @since 1.1.8
*/
public class SchemaExtension extends BaseExtension {
/**
* Name
*/
public static final String NAME = "schema";
/**
* Extension name
*/
public static final String EXTENSION_NAME = GeoPackageConstants.GEO_PACKAGE_EXTENSION_AUTHOR
+ Extensions.EXTENSION_NAME_DIVIDER + NAME;
/**
* Extension definition URL
*/
public static final String DEFINITION = GeoPackageProperties.getProperty(
PropertyConstants.EXTENSIONS, NAME);
/**
* Constructor
*
* @param geoPackage
* GeoPackage
*
*/
public SchemaExtension(GeoPackageCore geoPackage) {
super(geoPackage);
}
/**
* Get or create the extension
*
* @return extension
*/
public Extensions getOrCreate() {
Extensions extension = getOrCreate(EXTENSION_NAME, null, null,
DEFINITION, ExtensionScopeType.READ_WRITE);
return extension;
}
/**
* Determine if the GeoPackage has the extension
*
* @return true if has extension
*/
public boolean has() {
boolean exists = has(EXTENSION_NAME, null, null);
return exists;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy