Added ImageMosaic pubblicatiobn JUnit test. Fixed Unpublish issue. Various publisher enhancements.
This commit is contained in:
parent
e3ce6ab148
commit
a56a08a9d0
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,8 @@ public class RESTCoverageStore {
|
||||
public static RESTCoverageStore build(String response) {
|
||||
if(response == null)
|
||||
return null;
|
||||
if(response.isEmpty())
|
||||
return new RESTCoverageStore(new Element("coverageStore")); // TODO check how to response
|
||||
|
||||
Element pb = JDOMBuilder.buildElement(response);
|
||||
if(pb != null)
|
||||
|
||||
@ -52,6 +52,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
|
||||
final private GSMetadataEncoder<T> metadata = new GSMetadataEncoder<T>();
|
||||
final private Element keywordsListEncoder = new Element("keywords");
|
||||
|
||||
/**
|
||||
* @param rootName
|
||||
* Actually 'feature' or 'coverage'
|
||||
@ -81,7 +82,8 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key the name of the metadata to add (f.e.: elevation, time)
|
||||
* @param key
|
||||
* the name of the metadata to add (f.e.: elevation, time)
|
||||
* @return true if something is removed, false otherwise
|
||||
*/
|
||||
public boolean delMetadata(String key) {
|
||||
@ -92,7 +94,6 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
metadata.set(key, dimensionInfo.getRoot());
|
||||
}
|
||||
|
||||
|
||||
public void addKeyword(String keyword) {
|
||||
final Element el = new Element("string");
|
||||
el.setText(keyword);
|
||||
@ -101,6 +102,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
|
||||
/**
|
||||
* delete a keyword from the list
|
||||
*
|
||||
* @param keyword
|
||||
* @return true if something is removed, false otherwise
|
||||
*/
|
||||
@ -109,6 +111,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
el.setText(keyword);
|
||||
return (keywordsListEncoder.removeContent(new Filter() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public boolean matches(Object obj) {
|
||||
if (((Element) obj).getText().equals(keyword)) {
|
||||
return true;
|
||||
@ -126,6 +129,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
}
|
||||
|
||||
private final static String PROJECTIONPOLICY = "projectionPolicy";
|
||||
|
||||
/**
|
||||
* NONE, REPROJECT_TO_DECLARED, FORCE_DECLARED
|
||||
*
|
||||
@ -153,6 +157,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
public void addName(final String name) {
|
||||
add(NAME, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set or modify the 'name' node with a text value from 'name'
|
||||
*
|
||||
@ -171,6 +176,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
}
|
||||
|
||||
private final static String TITLE = "title";
|
||||
|
||||
/**
|
||||
* Add the 'title' node with a text value from 'title'
|
||||
*
|
||||
@ -189,6 +195,7 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
}
|
||||
|
||||
private final static String SRS = "srs";
|
||||
|
||||
/**
|
||||
* Add the 'SRS' node with a text value from 'srs'
|
||||
*
|
||||
@ -222,17 +229,17 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
* @param miny
|
||||
* @param crs
|
||||
*/
|
||||
public void addLatLonBoundingBox(double minx, double maxy, double maxx,
|
||||
double miny, final String crs) {
|
||||
public void addLatLonBoundingBox(double minx, double miny, double maxx,
|
||||
double maxy, final String crs) {
|
||||
add(LATLONBBMINX, String.valueOf(minx));
|
||||
add(LATLONBBMINY, String.valueOf(miny));
|
||||
add(LATLONBBMAXY, String.valueOf(maxy));
|
||||
add(LATLONBBMAXX, String.valueOf(maxx));
|
||||
add(LATLONBBMINY, String.valueOf(miny));
|
||||
add(LATLONBBCRS, crs);
|
||||
}
|
||||
|
||||
public void setLatLonBoundingBox(double minx, double maxy, double maxx,
|
||||
double miny, final String crs) {
|
||||
public void setLatLonBoundingBox(double minx, double miny, double maxx,
|
||||
double maxy, final String crs) {
|
||||
set(LATLONBBMINX, String.valueOf(minx));
|
||||
set(LATLONBBMAXY, String.valueOf(maxy));
|
||||
set(LATLONBBMAXX, String.valueOf(maxx));
|
||||
@ -256,8 +263,8 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
* @param miny
|
||||
* @param crs
|
||||
*/
|
||||
public void addNativeBoundingBox(double minx, double maxy, double maxx,
|
||||
double miny, final String crs) {
|
||||
public void addNativeBoundingBox(double minx, double miny, double maxx,
|
||||
double maxy, final String crs) {
|
||||
add(NATIVEBBMINX, String.valueOf(minx));
|
||||
add(NATIVEBBMAXY, String.valueOf(maxy));
|
||||
add(NATIVEBBMAXX, String.valueOf(maxx));
|
||||
@ -265,8 +272,8 @@ public abstract class GSResourceEncoder<T extends GSDimensionInfoEncoder>
|
||||
add(NATIVEBBCRS, crs);
|
||||
}
|
||||
|
||||
public void setNativeBoundingBox(double minx, double maxy, double maxx,
|
||||
double miny, final String crs) {
|
||||
public void setNativeBoundingBox(double minx, double miny, double maxx,
|
||||
double maxy, final String crs) {
|
||||
set(NATIVEBBMINX, String.valueOf(minx));
|
||||
set(NATIVEBBMAXY, String.valueOf(maxy));
|
||||
set(NATIVEBBMAXX, String.valueOf(maxx));
|
||||
|
||||
@ -110,10 +110,10 @@ public class GSImageMosaicEncoder extends GSCoverageEncoder {
|
||||
* @param val
|
||||
*/
|
||||
public void addFilter(final String val){
|
||||
final Element param=new Element(ENTRY);
|
||||
param.addContent(new Element(STRING).setText(filter));
|
||||
param.addContent(new Element(STRING).setText(val));
|
||||
parameters.add(null,param);
|
||||
final List<Element> list=new ArrayList<Element>(2);
|
||||
list.add(new Element(STRING).setText(filter));
|
||||
list.add(new Element(STRING).setText(val));
|
||||
parameters.add(null,list);
|
||||
}
|
||||
|
||||
private final static Filter filterFilter=new parametersFilter(filter);
|
||||
|
||||
@ -50,7 +50,7 @@ import org.springframework.core.io.ClassPathResource;
|
||||
public class ConfigTest extends GeoserverRESTTest {
|
||||
private final static Logger LOGGER = Logger.getLogger(ConfigTest.class);
|
||||
|
||||
private static final String DEFAULT_WS = "it.geosolutions";
|
||||
private static final String DEFAULT_WS = "geosolutions";
|
||||
|
||||
|
||||
public ConfigTest(String testName) {
|
||||
|
||||
@ -175,7 +175,6 @@ public class GeoserverRESTPublisherTest extends GeoserverRESTTest {
|
||||
deleteAllWorkspaces();
|
||||
assertTrue(publisher.createWorkspace(DEFAULT_WS));
|
||||
|
||||
// String ns = "it.geosolutions";
|
||||
String storeName = "resttestshp";
|
||||
String layerName = "cities";
|
||||
|
||||
|
||||
3
src/test/resources/testdata/time_geotiff/indexer.properties
vendored
Normal file
3
src/test/resources/testdata/time_geotiff/indexer.properties
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
TimeAttribute=time
|
||||
Schema= the_geom:Polygon,location:String,time:java.util.Date
|
||||
PropertyCollectors=TimestampFileNameExtractorSPI[timeregex](time)
|
||||
1
src/test/resources/testdata/time_geotiff/stringregex.properties
vendored
Normal file
1
src/test/resources/testdata/time_geotiff/stringregex.properties
vendored
Normal file
@ -0,0 +1 @@
|
||||
regex=[a-z]{5,5}
|
||||
1
src/test/resources/testdata/time_geotiff/timeregex.properties
vendored
Normal file
1
src/test/resources/testdata/time_geotiff/timeregex.properties
vendored
Normal file
@ -0,0 +1 @@
|
||||
regex=[0-9]{6}
|
||||
BIN
src/test/resources/testdata/time_geotiff/world.200401.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200401.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200402.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200402.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200403.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200403.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200404.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200404.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200405.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200405.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200406.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200406.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
BIN
src/test/resources/testdata/time_geotiff/world.200407.3x5400x2700.tiff
vendored
Normal file
BIN
src/test/resources/testdata/time_geotiff/world.200407.3x5400x2700.tiff
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user