Here is my code to upload a new layer from a shapefile (zipped):
boolean exists = reader.existsDatastore(workspaceName, storeName);
if ( !exists ) {
File shapeFile = new File( "path/to/zipFile.zip" );
boolean published = publisher.publishShp(workspaceName,
storeName, "TheLayerName", shapeFile, "EPSG:4326", "");
}
All is fine, but I need to set the "Description" of the new Store and maybe the "Create spatial index if missing/outdated" value too.
After run this code, I go to GeoServer and select "Stores". On "Edit Vector Data Source" screen I can see the "Description" field is empty.
After googling a lot I discover the GSCoverageEncoder layerEncoder = new GSCoverageEncoder();
method, but I've tried many ways and have no success ( with configureCoverage
).