public abstract class OAPIFeatureCoreGenerator extends FeatureCoreGenerator
| Modifier and Type | Field and Description |
|---|---|
protected static Projections |
DEFAULT_PROJECTIONS
Default projections
|
protected int |
downloadAttempts
Download attempts per feature request
|
protected static String |
EPSG_VERSION
EPSG CRS Version
|
protected String |
id
Identifier (name) of a specific collection
|
protected Integer |
limit
The optional limit parameter limits the number of items that are
presented in the response document.
|
protected static Pattern |
LIMIT_PATTERN
Limit pattern
|
protected static Projection |
OGC_CRS84
OGC CRS84 Projection
|
protected static String |
OGC_VERSION
OGC CRS Version
|
protected String |
period
Time period string that adheres to RFC 3339
|
protected String |
server
Base server url
|
protected String |
time
Either a date-time or a period string that adheres to RFC 3339
|
protected Integer |
totalLimit
Total limit of number of items to request
|
boundingBox, boundingBoxProjection, columns, EPSG_WGS84, geometryColumns, geoPackage, progress, projection, srs, tableName, transactionLimit| Constructor and Description |
|---|
OAPIFeatureCoreGenerator(GeoPackageCore geoPackage,
String tableName,
String server,
String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildCollectionRequestUrl()
Build the collection request URL
|
Collection |
collectionRequest()
Collection request
|
protected Collection |
collectionRequest(String url)
Collection request for the provided URL
|
protected void |
createFeature(Feature feature)
Create the feature
|
protected int |
createFeatures(FeatureCollection featureCollection)
Create features from the feature collection
|
protected FeatureCollection |
createFeatures(String features)
Create features in the feature DAO from the features value
|
int |
generateFeatures()
Generate the features
|
int |
generateFeatures(String urlString,
int currentCount)
Generate features
|
protected Crs |
getCrs(Projection projection)
Get the CRS from the projection
|
int |
getDownloadAttempts()
Get the number of download attempts
|
String |
getId()
Get the collection id
|
Integer |
getLimit()
Get the limit
|
String |
getPeriod()
Get the time period
|
Projections |
getProjections()
Get the supported projections
|
Projections |
getProjections(Collection collection)
Get the supported projections
|
Projections |
getProjections(String url)
Get the supported projections
|
String |
getServer()
Get the server
|
protected Projection |
getSrsProjection()
Get the projection for creating the Spatial Reference System
|
String |
getTime()
Get the time
|
Integer |
getTotalLimit()
Get the total limit
|
boolean |
isDefaultProjection(Projection projection)
Check if the projection is a default projection
|
boolean |
requestProjection(Projection projection)
Determine if the projection should be requested from the server
|
void |
setDownloadAttempts(int downloadAttempts)
Set the number of download attempts
|
void |
setLimit(Integer limit)
Set the limit
|
void |
setPeriod(Date period)
Set the time period
|
void |
setPeriod(String period)
Set the time period
|
void |
setTime(Date time)
Set the time
|
void |
setTime(String time)
Set the time
|
void |
setTotalLimit(Integer totalLimit)
Set the total limit
|
protected String |
urlRequest(String urlValue)
URL request
|
protected String |
urlRequest(String urlValue,
URL url)
Perform a URL request
|
addColumn, addProjection, createColumn, createFeature, createGeometryData, createProjection, createSrs, createTable, getBoundingBox, getBoundingBoxProjection, getColumn, getColumns, getGeometryColumns, getGeoPackage, getProgress, getProjection, getSrs, getTableName, getTransactionLimit, getType, getValue, getValue, initializeTable, isActive, saveFeature, setBoundingBox, setBoundingBoxProjection, setProgress, setProjection, setTransactionLimitprotected static final Pattern LIMIT_PATTERN
protected static final Projection OGC_CRS84
protected static final String OGC_VERSION
protected static final String EPSG_VERSION
protected static final Projections DEFAULT_PROJECTIONS
protected final String server
protected final String id
protected Integer limit
protected String time
protected String period
protected Integer totalLimit
protected int downloadAttempts
public OAPIFeatureCoreGenerator(GeoPackageCore geoPackage, String tableName, String server, String id)
geoPackage - GeoPackagetableName - table nameserver - server urlid - collection identifierpublic String getServer()
public String getId()
public Integer getLimit()
public void setLimit(Integer limit)
limit - limitpublic String getTime()
public void setTime(String time)
time - timepublic void setTime(Date time)
time - timepublic String getPeriod()
public void setPeriod(String period)
period - periodpublic void setPeriod(Date period)
period - periodpublic Integer getTotalLimit()
public void setTotalLimit(Integer totalLimit)
totalLimit - total limitpublic int getDownloadAttempts()
public void setDownloadAttempts(int downloadAttempts)
downloadAttempts - download attemptsprotected Projection getSrsProjection()
getSrsProjection in class FeatureCoreGeneratorprotected void createFeature(Feature feature) throws SQLException
feature - featureSQLException - upon errorpublic int generateFeatures()
throws SQLException
generateFeatures in class FeatureCoreGeneratorSQLException - upon errorprotected String buildCollectionRequestUrl()
public Projections getProjections()
public Projections getProjections(String url)
url - URLpublic Projections getProjections(Collection collection)
collection - collectionpublic boolean requestProjection(Projection projection)
projection - projectionpublic boolean isDefaultProjection(Projection projection)
projection - projectionpublic Collection collectionRequest()
protected Collection collectionRequest(String url)
url - url valuepublic int generateFeatures(String urlString, int currentCount) throws SQLException
urlString - URLcurrentCount - current countSQLException - upon failureprotected String urlRequest(String urlValue)
urlValue - URL valueprotected String urlRequest(String urlValue, URL url)
urlValue - URL string valueurl - URLprotected FeatureCollection createFeatures(String features) throws SQLException
features - features jsonSQLException - upon errorprotected int createFeatures(FeatureCollection featureCollection)
featureCollection - feature collectionprotected Crs getCrs(Projection projection)
projection - projectionCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.