Fixing issue #18. Check on existing directory shuld be performed on the remote GeoServer not locally to the caller.
This commit is contained in:
parent
0e3bf5e9cb
commit
e9aab4f744
@ -354,7 +354,9 @@ public class GeoServerRESTPublisher {
|
||||
String layername, String srs, String defaultStyle) {
|
||||
|
||||
final GSFeatureTypeEncoder fte = new GSFeatureTypeEncoder();
|
||||
|
||||
fte.setProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
|
||||
fte.addKeyword("KEYWORD");
|
||||
fte.addName(layername);
|
||||
fte.addSRS(srs); // srs=null?"EPSG:4326":srs);
|
||||
final GSLayerEncoder layerEncoder = new GSLayerEncoder();
|
||||
@ -600,10 +602,16 @@ public class GeoServerRESTPublisher {
|
||||
public RESTCoverageStore createExternaMosaicDatastore(String workspace,
|
||||
String storeName, File mosaicDir, ParameterConfigure configure,
|
||||
ParameterUpdate update) throws FileNotFoundException {
|
||||
/*
|
||||
* Carlo (23 Nov 2011):
|
||||
* commented out since this directory should be readable by targhet GeoServer
|
||||
* not the calling client!
|
||||
*/
|
||||
if (!mosaicDir.isDirectory()) {
|
||||
throw new IllegalArgumentException("Not a directory '" + mosaicDir
|
||||
+ "'");
|
||||
if (LOGGER.isEnabledFor(Level.WARN))
|
||||
LOGGER.warn("Directory '" + mosaicDir+ "' not exists locally. Continue: please check existance on the remote server.");
|
||||
}
|
||||
|
||||
String sUrl = restURL + "/rest/workspaces/" + workspace
|
||||
+ "/coveragestores/" + storeName
|
||||
+ "/external.imagemosaic?configure=" + configure.toString()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user