Skip to content

Commit c2143de

Browse files
committed
Merge pull request #24 from ngageoint/develop
Develop to Master, 1.1.7 updates
2 parents 0394be5 + 7c99f5b commit c2143de

File tree

5 files changed

+85
-6
lines changed

5 files changed

+85
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
66

7-
## 1.1.7 (TBD)
7+
## [1.1.7](https://github.com/ngageoint/geopackage-core-java/releases/tag/1.1.7) (04-18-2016)
88

9-
* TBD
9+
* Additional GeoPackage methods to get all tables and check table types
10+
* wkb version update to 1.0.2
1011

1112
## [1.1.6](https://github.com/ngageoint/geopackage-core-java/releases/tag/1.1.6) (02-19-2016)
1213

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ The [GeoPackage Java](https://github.com/ngageoint/geopackage-java) library is a
3333

3434
### Installation ###
3535

36-
Pull from the [Maven Central Repository](http://search.maven.org/#artifactdetails|mil.nga.geopackage|geopackage-core|1.1.6|jar) (JAR, POM, Source, Javadoc)
36+
Pull from the [Maven Central Repository](http://search.maven.org/#artifactdetails|mil.nga.geopackage|geopackage-core|1.1.7|jar) (JAR, POM, Source, Javadoc)
3737

3838
<dependency>
3939
<groupId>mil.nga.geopackage</groupId>
4040
<artifactId>geopackage-core</artifactId>
41-
<version>1.1.6</version>
41+
<version>1.1.7</version>
4242
</dependency>
4343

4444
### Build ###

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>mil.nga</groupId>
5252
<artifactId>wkb</artifactId>
53-
<version>1.0.1</version>
53+
<version>1.0.2</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>org.osgeo</groupId>

src/main/java/mil/nga/geopackage/GeoPackageCore.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,44 @@ public interface GeoPackageCore extends Closeable {
8383
*/
8484
public List<String> getTileTables();
8585

86+
/**
87+
* Get the feature and tile tables
88+
*
89+
* @return feature and tile table names
90+
* @since 1.1.7
91+
*/
92+
public List<String> getTables();
93+
94+
/**
95+
* Check if the table is a feature table
96+
*
97+
* @param table
98+
* table name
99+
* @return true if a feature table
100+
* @since 1.1.7
101+
*/
102+
public boolean isFeatureTable(String table);
103+
104+
/**
105+
* Check if the table is a tile table
106+
*
107+
* @param table
108+
* table name
109+
* @return true if a tile table
110+
* @since 1.1.7
111+
*/
112+
public boolean isTileTable(String table);
113+
114+
/**
115+
* Check if the table exists as a feature or tile table
116+
*
117+
* @param table
118+
* table name
119+
* @return true if a feature or tile table
120+
* @since 1.1.7
121+
*/
122+
public boolean isFeatureOrTileTable(String table);
123+
86124
/**
87125
* Get a Spatial Reference System DAO
88126
*

src/main/java/mil/nga/geopackage/factory/GeoPackageCoreImpl.java

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import java.sql.SQLException;
44
import java.util.ArrayList;
55
import java.util.Date;
6+
import java.util.HashSet;
67
import java.util.List;
8+
import java.util.Set;
79

810
import mil.nga.geopackage.BoundingBox;
911
import mil.nga.geopackage.GeoPackageCore;
@@ -187,6 +189,44 @@ public List<String> getTileTables() {
187189
return tableNames;
188190
}
189191

192+
/**
193+
* {@inheritDoc}
194+
*/
195+
@Override
196+
public List<String> getTables() {
197+
List<String> tables = new ArrayList<String>();
198+
tables.addAll(getFeatureTables());
199+
tables.addAll(getTileTables());
200+
return tables;
201+
}
202+
203+
/**
204+
* {@inheritDoc}
205+
*/
206+
@Override
207+
public boolean isFeatureTable(String table) {
208+
Set<String> featureTables = new HashSet<String>(getFeatureTables());
209+
return featureTables.contains(table);
210+
}
211+
212+
/**
213+
* {@inheritDoc}
214+
*/
215+
@Override
216+
public boolean isTileTable(String table) {
217+
Set<String> tileTables = new HashSet<String>(getTileTables());
218+
return tileTables.contains(table);
219+
}
220+
221+
/**
222+
* {@inheritDoc}
223+
*/
224+
@Override
225+
public boolean isFeatureOrTileTable(String table) {
226+
Set<String> tables = new HashSet<String>(getTables());
227+
return tables.contains(table);
228+
}
229+
190230
/**
191231
* {@inheritDoc}
192232
*/
@@ -706,7 +746,7 @@ public void deleteTable(String table) {
706746
verifyWritable();
707747

708748
NGAExtensions.deleteTableExtensions(this, table);
709-
749+
710750
ContentsDao contentsDao = getContentsDao();
711751
contentsDao.deleteTable(table);
712752
}

0 commit comments

Comments
 (0)