Class GeoPackageMetadataDataSource

java.lang.Object
mil.nga.geopackage.db.metadata.GeoPackageMetadataDataSource

public class GeoPackageMetadataDataSource extends Object
GeoPackage metadata Data Source
  • Constructor Details

    • GeoPackageMetadataDataSource

      public GeoPackageMetadataDataSource(GeoPackageMetadataDb db)
      Constructor
      Parameters:
      db - GeoPackage metadata db
  • Method Details

    • create

      public void create(GeoPackageMetadata metadata)
      Create a new GeoPackage metadata
      Parameters:
      metadata - GeoPackage metadata
    • delete

      public boolean delete(GeoPackageMetadata metadata)
      Delete the GeoPackage metadata
      Parameters:
      metadata - GeoPackage metadata
      Returns:
      deleted flag
    • delete

      public boolean delete(String database)
      Delete the database
      Parameters:
      database - database name
      Returns:
      deleted flag
    • rename

      public boolean rename(GeoPackageMetadata metadata, String newName)
      Rename the GeoPackage metadata to the new name
      Parameters:
      metadata - GeoPackage metadata
      newName - new name
      Returns:
      renamed flag
    • rename

      public boolean rename(String name, String newName)
      Rename the GeoPackage name to the new name
      Parameters:
      name - GeoPackage name
      newName - new name
      Returns:
      renamed flag
    • getAll

      public List<GeoPackageMetadata> getAll()
      Get all GeoPackage metadata
      Returns:
      all GeoPackage metadata
    • getAllExternal

      public List<GeoPackageMetadata> getAllExternal()
      Get all external GeoPackage metadata
      Returns:
      external GeoPackage metadata
    • get

      public GeoPackageMetadata get(String database)
      Get GeoPackage metadata by name
      Parameters:
      database - database name
      Returns:
      GeoPackage metadata
    • get

      public GeoPackageMetadata get(long id)
      Get GeoPackage metadata by id
      Parameters:
      id - id
      Returns:
      GeoPackage metadata
    • getOrCreate

      public GeoPackageMetadata getOrCreate(String geoPackage)
      Get GeoPackage metadata or create it if it does not exist
      Parameters:
      geoPackage - GeoPackage name
      Returns:
      GeoPackage metadata
    • exists

      public boolean exists(String database)
      Determine if the metadata exists
      Parameters:
      database - database name
      Returns:
      exists flag
    • isExternal

      public boolean isExternal(String database)
      Determine if the GeoPackage is external
      Parameters:
      database - database name
      Returns:
      external flag
    • getExternalAtPath

      public GeoPackageMetadata getExternalAtPath(String path)
      Get external GeoPackage metadata by external path
      Parameters:
      path - path
      Returns:
      GeoPackage metadata
    • getMetadataWhereNameLike

      public List<String> getMetadataWhereNameLike(String like, String sortColumn)
      Get metadata where the name is like
      Parameters:
      like - like argument
      sortColumn - sort by column
      Returns:
      metadata names
      Since:
      1.2.7
    • getMetadataWhereNameNotLike

      public List<String> getMetadataWhereNameNotLike(String notLike, String sortColumn)
      Get metadata where the name is not like
      Parameters:
      notLike - not like argument
      sortColumn - sort by column
      Returns:
      metadata names
      Since:
      1.2.7