Merge branch '1.5.x' of github.com:wumpz/geoserver-manager.git into 1.5.x
This commit is contained in:
commit
fc17036e6f
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<groupId>it.geosolutions</groupId>
|
<groupId>it.geosolutions</groupId>
|
||||||
<artifactId>geoserver-manager</artifactId>
|
<artifactId>geoserver-manager</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|||||||
@ -371,8 +371,7 @@ public class GeoServerRESTPublisher {
|
|||||||
sUrl += "?name=" + encode(name);
|
sUrl += "?name=" + encode(name);
|
||||||
}
|
}
|
||||||
LOGGER.debug("POSTing new style " + name + " to " + sUrl);
|
LOGGER.debug("POSTing new style " + name + " to " + sUrl);
|
||||||
String result = HTTPUtils
|
String result = HTTPUtils.post(sUrl, sldFile, Format.SLD.getContentType(), gsuser, gspass);
|
||||||
.post(sUrl, sldFile, Format.SLD.getContentType(), gsuser, gspass);
|
|
||||||
return result != null;
|
return result != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,7 +512,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String getTypeName(StoreType type) {
|
public static String getTypeName(StoreType type) {
|
||||||
return StoreType.getTypeNameWithFormat(type,Format.XML);
|
return StoreType.getTypeNameWithFormat(type, Format.XML);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -552,7 +551,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return "featureTypes.{xml|html|...}" for DATASTORES, "coverages.{xml|html|...}" otherwise.
|
* @return "featureTypes.{xml|html|...}" for DATASTORES, "coverages.{xml|html|...}" otherwise.
|
||||||
*/
|
*/
|
||||||
public static String getTypeNameWithFormat(StoreType type, Format format) {
|
public static String getTypeNameWithFormat(StoreType type, Format format) {
|
||||||
return getTypeName(type)+"."+format;
|
return getTypeName(type) + "." + format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -563,7 +562,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return "featuretypes.{xml|html|...}" for DATASTORES, "coverages.{xml|html|...}" otherwise.
|
* @return "featuretypes.{xml|html|...}" for DATASTORES, "coverages.{xml|html|...}" otherwise.
|
||||||
*/
|
*/
|
||||||
public String getTypeNameWithFormat(Format format) {
|
public String getTypeNameWithFormat(Format format) {
|
||||||
return getTypeName(this).toLowerCase()+"."+format;
|
return getTypeName(this).toLowerCase() + "." + format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -774,7 +773,7 @@ public class GeoServerRESTPublisher {
|
|||||||
ParameterConfigure configure, NameValuePair... params) throws FileNotFoundException,
|
ParameterConfigure configure, NameValuePair... params) throws FileNotFoundException,
|
||||||
IllegalArgumentException {
|
IllegalArgumentException {
|
||||||
if (workspace == null || dsType == null || storeName == null || method == null
|
if (workspace == null || dsType == null || storeName == null || method == null
|
||||||
| extension == null || mimeType == null || uri == null) {
|
|| extension == null || mimeType == null || uri == null) {
|
||||||
throw new IllegalArgumentException("Null argument");
|
throw new IllegalArgumentException("Null argument");
|
||||||
}
|
}
|
||||||
StringBuilder sbUrl = new StringBuilder(restURL).append("/rest/workspaces/")
|
StringBuilder sbUrl = new StringBuilder(restURL).append("/rest/workspaces/")
|
||||||
@ -876,7 +875,7 @@ public class GeoServerRESTPublisher {
|
|||||||
/**
|
/**
|
||||||
* Create a PostGIS datastore.
|
* Create a PostGIS datastore.
|
||||||
*
|
*
|
||||||
* @deprecated Will be deleted in next version 1.6.x, use {@link GeoServerRESTStoreManager} instead.
|
* @deprecated Will be deleted in next version 1.5.x, use {@link GeoServerRESTDatastoreManager} instead.
|
||||||
*
|
*
|
||||||
* @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the
|
* @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the
|
||||||
* database.
|
* database.
|
||||||
@ -885,7 +884,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @return <TT>true</TT> if the PostGIS datastore has been successfully created, <TT>false</TT> otherwise
|
* @return <TT>true</TT> if the PostGIS datastore has been successfully created, <TT>false</TT> otherwise
|
||||||
*/
|
*/
|
||||||
public boolean createPostGISDatastore(String workspace,
|
public boolean createPostGISDatastore(String workspace,
|
||||||
it.geosolutions.geoserver.rest.encoder.GSPostGISDatastoreEncoder datastoreEncoder) {
|
GSPostGISDatastoreEncoder datastoreEncoder) {
|
||||||
String sUrl = restURL + "/rest/workspaces/" + workspace + "/datastores/";
|
String sUrl = restURL + "/rest/workspaces/" + workspace + "/datastores/";
|
||||||
String xml = datastoreEncoder.toString();
|
String xml = datastoreEncoder.toString();
|
||||||
String result = HTTPUtils.postXml(sUrl, xml, gsuser, gspass);
|
String result = HTTPUtils.postXml(sUrl, xml, gsuser, gspass);
|
||||||
@ -2008,32 +2007,7 @@ public class GeoServerRESTPublisher {
|
|||||||
*/
|
*/
|
||||||
public boolean removeDatastore(String workspace, String storename, final boolean recurse)
|
public boolean removeDatastore(String workspace, String storename, final boolean recurse)
|
||||||
throws IllegalArgumentException {
|
throws IllegalArgumentException {
|
||||||
try {
|
return removeStore(workspace, storename, StoreType.DATASTORES, recurse);
|
||||||
if (workspace == null || storename == null)
|
|
||||||
throw new IllegalArgumentException("Arguments may not be null!");
|
|
||||||
if (workspace.isEmpty() || storename.isEmpty())
|
|
||||||
throw new IllegalArgumentException("Arguments may not be empty!");
|
|
||||||
|
|
||||||
final StringBuilder url = new StringBuilder(restURL);
|
|
||||||
url.append("/rest/workspaces/").append(workspace).append("/datastores/")
|
|
||||||
.append(storename);
|
|
||||||
if (recurse)
|
|
||||||
url.append("?recurse=true");
|
|
||||||
final URL deleteStore = new URL(url.toString());
|
|
||||||
|
|
||||||
boolean deleted = HTTPUtils.delete(deleteStore.toExternalForm(), gsuser, gspass);
|
|
||||||
if (!deleted) {
|
|
||||||
LOGGER.warn("Could not delete datastore " + workspace + ":" + storename);
|
|
||||||
} else {
|
|
||||||
LOGGER.info("Datastore successfully deleted " + workspace + ":" + storename);
|
|
||||||
}
|
|
||||||
|
|
||||||
return deleted;
|
|
||||||
} catch (MalformedURLException ex) {
|
|
||||||
if (LOGGER.isErrorEnabled())
|
|
||||||
LOGGER.error(ex.getLocalizedMessage(), ex);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2045,13 +2019,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @deprecated use {@link #removeCoverageStore(String, String, boolean)}
|
* @deprecated use {@link #removeCoverageStore(String, String, boolean)}
|
||||||
*/
|
*/
|
||||||
public boolean removeCoverageStore(String workspace, String storename) {
|
public boolean removeCoverageStore(String workspace, String storename) {
|
||||||
try {
|
return removeCoverageStore(workspace, storename, true);
|
||||||
return removeCoverageStore(workspace, storename, true);
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
if (LOGGER.isErrorEnabled())
|
|
||||||
LOGGER.error("Arguments may not be null or empty!", e);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2064,6 +2032,21 @@ public class GeoServerRESTPublisher {
|
|||||||
*/
|
*/
|
||||||
public boolean removeCoverageStore(final String workspace, final String storename,
|
public boolean removeCoverageStore(final String workspace, final String storename,
|
||||||
final boolean recurse) throws IllegalArgumentException {
|
final boolean recurse) throws IllegalArgumentException {
|
||||||
|
return removeStore(workspace, storename, StoreType.COVERAGESTORES, recurse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a given Datastore in a given Workspace.
|
||||||
|
*
|
||||||
|
* @param workspace The name of the workspace
|
||||||
|
* @param storename The name of the Datastore to remove.
|
||||||
|
* @param the {@link StoreType} type
|
||||||
|
* @param recurse if remove should be performed recursively
|
||||||
|
* @throws IllegalArgumentException if workspace or storename are null or empty
|
||||||
|
* @return <TT>true</TT> if the store was successfully removed.
|
||||||
|
*/
|
||||||
|
private boolean removeStore(String workspace, String storename, StoreType type,
|
||||||
|
final boolean recurse) throws IllegalArgumentException {
|
||||||
try {
|
try {
|
||||||
if (workspace == null || storename == null)
|
if (workspace == null || storename == null)
|
||||||
throw new IllegalArgumentException("Arguments may not be null!");
|
throw new IllegalArgumentException("Arguments may not be null!");
|
||||||
@ -2071,7 +2054,7 @@ public class GeoServerRESTPublisher {
|
|||||||
throw new IllegalArgumentException("Arguments may not be empty!");
|
throw new IllegalArgumentException("Arguments may not be empty!");
|
||||||
|
|
||||||
final StringBuilder url = new StringBuilder(restURL);
|
final StringBuilder url = new StringBuilder(restURL);
|
||||||
url.append("/rest/workspaces/").append(workspace).append("/coveragestores/")
|
url.append("/rest/workspaces/").append(workspace).append("/").append(type).append("/")
|
||||||
.append(storename);
|
.append(storename);
|
||||||
if (recurse)
|
if (recurse)
|
||||||
url.append("?recurse=true");
|
url.append("?recurse=true");
|
||||||
@ -2079,12 +2062,12 @@ public class GeoServerRESTPublisher {
|
|||||||
|
|
||||||
boolean deleted = HTTPUtils.delete(deleteStore.toExternalForm(), gsuser, gspass);
|
boolean deleted = HTTPUtils.delete(deleteStore.toExternalForm(), gsuser, gspass);
|
||||||
if (!deleted) {
|
if (!deleted) {
|
||||||
LOGGER.warn("Could not delete CoverageStore " + workspace + ":" + storename);
|
LOGGER.warn("Could not delete store " + workspace + ":" + storename);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("CoverageStore successfully deleted " + workspace + ":" + storename);
|
LOGGER.info("Store successfully deleted " + workspace + ":" + storename);
|
||||||
}
|
}
|
||||||
return deleted;
|
|
||||||
|
|
||||||
|
return deleted;
|
||||||
} catch (MalformedURLException ex) {
|
} catch (MalformedURLException ex) {
|
||||||
if (LOGGER.isErrorEnabled())
|
if (LOGGER.isErrorEnabled())
|
||||||
LOGGER.error(ex.getLocalizedMessage(), ex);
|
LOGGER.error(ex.getLocalizedMessage(), ex);
|
||||||
@ -2101,13 +2084,7 @@ public class GeoServerRESTPublisher {
|
|||||||
* @deprecated {@link #removeWorkspace(String, boolean)}
|
* @deprecated {@link #removeWorkspace(String, boolean)}
|
||||||
*/
|
*/
|
||||||
public boolean removeWorkspace(String workspace) {
|
public boolean removeWorkspace(String workspace) {
|
||||||
try {
|
return removeWorkspace(workspace, false);
|
||||||
return removeWorkspace(workspace, false);
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
if (LOGGER.isErrorEnabled())
|
|
||||||
LOGGER.error("Arguments may not be null or empty!", e);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2261,17 +2238,17 @@ public class GeoServerRESTPublisher {
|
|||||||
final String store = HTTPUtils.get(url, this.gsuser, this.gspass);
|
final String store = HTTPUtils.get(url, this.gsuser, this.gspass);
|
||||||
|
|
||||||
if (store != null) {
|
if (store != null) {
|
||||||
String storeTag=storeType.getTypeName();
|
String storeTag = storeType.getTypeName();
|
||||||
// switch (storeType) {
|
// switch (storeType) {
|
||||||
// case COVERAGESTORES:
|
// case COVERAGESTORES:
|
||||||
// storeTag = storeType.toString().replaceAll("store", "");
|
// storeTag = storeType.toString().replaceAll("store", "");
|
||||||
// break;
|
// break;
|
||||||
// case DATASTORES:
|
// case DATASTORES:
|
||||||
// storeTag = "featureTypes";
|
// storeTag = "featureTypes";
|
||||||
// break;
|
// break;
|
||||||
// default:
|
// default:
|
||||||
// throw new IllegalArgumentException("Unrecognized type");
|
// throw new IllegalArgumentException("Unrecognized type");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
String startTag = "<" + storeTag + ">";
|
String startTag = "<" + storeTag + ">";
|
||||||
int start = store.indexOf(startTag);
|
int start = store.indexOf(startTag);
|
||||||
@ -2538,7 +2515,7 @@ public class GeoServerRESTPublisher {
|
|||||||
*
|
*
|
||||||
* configured - Only setup or configured feature types are returned. This is the default value. available - Only unconfigured feature types
|
* configured - Only setup or configured feature types are returned. This is the default value. available - Only unconfigured feature types
|
||||||
* (not yet setup) but are available from the specified datastore will be returned. available_with_geom - Same as available but only
|
* (not yet setup) but are available from the specified datastore will be returned. available_with_geom - Same as available but only
|
||||||
* includes feature types that have a geometry attribute. all - The union of configured and available.
|
* includes feature types that have a geometry granule. all - The union of configured and available.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return true if success
|
* @return true if success
|
||||||
|
|||||||
@ -27,8 +27,14 @@ package it.geosolutions.geoserver.rest.decoder;
|
|||||||
|
|
||||||
import it.geosolutions.geoserver.rest.decoder.utils.JDOMBuilder;
|
import it.geosolutions.geoserver.rest.decoder.utils.JDOMBuilder;
|
||||||
import it.geosolutions.geoserver.rest.decoder.utils.JDOMListIterator;
|
import it.geosolutions.geoserver.rest.decoder.utils.JDOMListIterator;
|
||||||
|
import it.geosolutions.geoserver.rest.encoder.feature.FeatureTypeAttribute;
|
||||||
|
import it.geosolutions.geoserver.rest.encoder.feature.GSAttributeEncoder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -244,4 +250,50 @@ public class RESTFeatureType extends RESTResource {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<FeatureTypeAttribute, String>> getAttributeList() {
|
||||||
|
List<Map<FeatureTypeAttribute, String>> attrsList = null;
|
||||||
|
|
||||||
|
final Element attrsRoot = rootElem.getChild("attributes");
|
||||||
|
if(attrsRoot!=null){
|
||||||
|
final List<Element> attrs = attrsRoot.getChildren();
|
||||||
|
if (attrs != null) {
|
||||||
|
attrsList = new ArrayList<Map<FeatureTypeAttribute, String>>(attrs.size());
|
||||||
|
for (Element attr : attrs) {
|
||||||
|
Map<FeatureTypeAttribute, String> attrsMap = new HashMap<FeatureTypeAttribute, String>();
|
||||||
|
attrsList.add(attrsMap);
|
||||||
|
for (FeatureTypeAttribute at : FeatureTypeAttribute.values()) {
|
||||||
|
String key = at.toString();
|
||||||
|
attrsMap.put(at, attr.getChildText(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return attrsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GSAttributeEncoder> getEncodedAttributeList() {
|
||||||
|
List<GSAttributeEncoder> attrsList = null;
|
||||||
|
|
||||||
|
final Element attrsRoot = rootElem.getChild("attributes");
|
||||||
|
if(attrsRoot!=null){
|
||||||
|
final List<Element> attrs = attrsRoot.getChildren();
|
||||||
|
if (attrs != null) {
|
||||||
|
attrsList = new ArrayList<GSAttributeEncoder>(attrs.size());
|
||||||
|
for (Element attr : attrs) {
|
||||||
|
final GSAttributeEncoder attrEnc = new GSAttributeEncoder();
|
||||||
|
for (FeatureTypeAttribute at : FeatureTypeAttribute.values()) {
|
||||||
|
String key = at.toString();
|
||||||
|
attrEnc.setAttribute(at, attr.getChildText(key));
|
||||||
|
}
|
||||||
|
attrsList.add(attrEnc);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return attrsList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,6 +113,14 @@ public class RESTLayer {
|
|||||||
return defaultStyle == null? null : defaultStyle.getChildText("name");
|
return defaultStyle == null? null : defaultStyle.getChildText("name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see <a href="https://github.com/geosolutions-it/geoserver-manager/issues/100">this issue</a>
|
||||||
|
*/
|
||||||
|
public String getDefaultStyleWorkspace() {
|
||||||
|
Element defaultStyle = layerElem.getChild("defaultStyle");
|
||||||
|
return defaultStyle == null? null : defaultStyle.getChildText("workspace");
|
||||||
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
Element resource = layerElem.getChild("resource");
|
Element resource = layerElem.getChild("resource");
|
||||||
return resource.getChildText("title");
|
return resource.getChildText("title");
|
||||||
|
|||||||
@ -72,6 +72,22 @@ public class RESTResource {
|
|||||||
return rootElem.getChildText("abstract");
|
return rootElem.getChildText("abstract");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getKeywords(){
|
||||||
|
List<String> kwdsList = null;
|
||||||
|
|
||||||
|
final Element keywordsRoot = rootElem.getChild("keywords");
|
||||||
|
if(keywordsRoot != null){
|
||||||
|
final List<Element> keywords = keywordsRoot.getChildren();
|
||||||
|
if(keywords != null){
|
||||||
|
kwdsList = new ArrayList<String>(keywords.size());
|
||||||
|
for(Element keyword : keywords){
|
||||||
|
kwdsList.add(keyword.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return kwdsList;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNameSpace() {
|
public String getNameSpace() {
|
||||||
return rootElem.getChild("namespace").getChildText("name");
|
return rootElem.getChild("namespace").getChildText("name");
|
||||||
}
|
}
|
||||||
@ -117,43 +133,22 @@ public class RESTResource {
|
|||||||
return getLatLonEdge("maxy");
|
return getLatLonEdge("maxy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use {@link RESTFeatureType#getAttributeList()}
|
||||||
|
* @return
|
||||||
|
* @throws UnsupportedOperationException
|
||||||
|
*/
|
||||||
public List<Map<FeatureTypeAttribute, String>> getAttributeList() {
|
public List<Map<FeatureTypeAttribute, String>> getAttributeList() {
|
||||||
List<Map<FeatureTypeAttribute, String>> attrsList = null;
|
throw new UnsupportedOperationException("This method is specific for RESTFeatureType");
|
||||||
|
|
||||||
final Element attrsRoot = rootElem.getChild("attributes");
|
|
||||||
final List<Element> attrs = attrsRoot.getChildren();
|
|
||||||
if (attrs != null) {
|
|
||||||
attrsList = new ArrayList<Map<FeatureTypeAttribute, String>>(attrs.size());
|
|
||||||
for (Element attr : attrs) {
|
|
||||||
Map<FeatureTypeAttribute, String> attrsMap = new HashMap<FeatureTypeAttribute, String>();
|
|
||||||
attrsList.add(attrsMap);
|
|
||||||
for (FeatureTypeAttribute at : FeatureTypeAttribute.values()) {
|
|
||||||
String key = at.toString();
|
|
||||||
attrsMap.put(at, attr.getChildText(key));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return attrsList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use {@link RESTFeatureType#getEncodedAttributeList()}
|
||||||
|
* @return
|
||||||
|
* @throws UnsupportedOperationException
|
||||||
|
*/
|
||||||
public List<GSAttributeEncoder> getEncodedAttributeList() {
|
public List<GSAttributeEncoder> getEncodedAttributeList() {
|
||||||
List<GSAttributeEncoder> attrsList = null;
|
throw new UnsupportedOperationException("This method is specific for RESTFeatureType");
|
||||||
|
|
||||||
final Element attrsRoot = rootElem.getChild("attributes");
|
|
||||||
final List<Element> attrs = attrsRoot.getChildren();
|
|
||||||
if (attrs != null) {
|
|
||||||
attrsList = new ArrayList<GSAttributeEncoder>(attrs.size());
|
|
||||||
for (Element attr : attrs) {
|
|
||||||
final GSAttributeEncoder attrEnc = new GSAttributeEncoder();
|
|
||||||
for (FeatureTypeAttribute at : FeatureTypeAttribute.values()) {
|
|
||||||
String key = at.toString();
|
|
||||||
attrEnc.setAttribute(at, attr.getChildText(key));
|
|
||||||
}
|
|
||||||
attrsList.add(attrEnc);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return attrsList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -182,43 +177,4 @@ public class RESTResource {
|
|||||||
return metaLinksList;
|
return metaLinksList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @return the list of available attribute names
|
|
||||||
// */
|
|
||||||
// public List<String> getAttributeNames() {
|
|
||||||
// return getAttributes("name");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * @return a list of object which are String representation of Classes
|
|
||||||
// */
|
|
||||||
// public List<String> getAttributeBinding() {
|
|
||||||
// return getAttributes("binding");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * <attribute><br>
|
|
||||||
// * <name>NATION</name><br>
|
|
||||||
// * <minOccurs>0</minOccurs><br>
|
|
||||||
// * <maxOccurs>1</maxOccurs><br>
|
|
||||||
// * <nillable>true</nillable><br>
|
|
||||||
// * <binding>java.lang.Integer</binding><br>
|
|
||||||
// * <length>3</length><br>
|
|
||||||
// * </attribute><br>
|
|
||||||
// *
|
|
||||||
// * @param name
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// private List<String> getAttributes(String name) {
|
|
||||||
// final Element attrsRoot = rootElem.getChild("attributes");
|
|
||||||
// final List<Element> attrs = attrsRoot.getChildren();
|
|
||||||
// List<String> attrNames = null;
|
|
||||||
// if (attrs != null) {
|
|
||||||
// attrNames = new ArrayList<String>(attrs.size());
|
|
||||||
// for (Element attr : attrs) {
|
|
||||||
// attrNames.add(attr.getChildText(name));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return attrNames;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
package it.geosolutions.geoserver.rest.encoder;
|
package it.geosolutions.geoserver.rest.encoder;
|
||||||
|
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
import org.jdom.filter.Filter;
|
||||||
|
|
||||||
import it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder;
|
import it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder;
|
||||||
|
|
||||||
@ -39,9 +40,13 @@ import it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder;
|
|||||||
*/
|
*/
|
||||||
public class GSLayerEncoder extends PropertyXMLEncoder {
|
public class GSLayerEncoder extends PropertyXMLEncoder {
|
||||||
|
|
||||||
|
public final static String STYLES = "styles";
|
||||||
|
final private Element stylesEncoder = new Element(STYLES);
|
||||||
|
|
||||||
public GSLayerEncoder() {
|
public GSLayerEncoder() {
|
||||||
super("layer");
|
super("layer");
|
||||||
addEnabled();
|
addEnabled();
|
||||||
|
addContent(stylesEncoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,4 +135,36 @@ public class GSLayerEncoder extends PropertyXMLEncoder {
|
|||||||
throw new IllegalArgumentException("Unable to set an empty or null parameter");
|
throw new IllegalArgumentException("Unable to set an empty or null parameter");
|
||||||
set("defaultStyle", defaultStyle);
|
set("defaultStyle", defaultStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a style
|
||||||
|
*
|
||||||
|
* @param style
|
||||||
|
*/
|
||||||
|
public void addStyle(String style) {
|
||||||
|
final Element el = new Element("style");
|
||||||
|
el.setText(style);
|
||||||
|
stylesEncoder.addContent(el);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* delete a style from the list
|
||||||
|
*
|
||||||
|
* @param style
|
||||||
|
* @return true if something is removed, false otherwise
|
||||||
|
*/
|
||||||
|
public boolean delStyle(final String style) {
|
||||||
|
final Element el = new Element("style");
|
||||||
|
el.setText(style);
|
||||||
|
return (stylesEncoder.removeContent(new Filter() {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public boolean matches(Object obj) {
|
||||||
|
if (((Element) obj).getText().equals(style)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})).size() == 0 ? false : true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,6 +44,7 @@ public class GSOracleNGDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
static final boolean DEFAULT_LOOSE_BBOX = true;
|
static final boolean DEFAULT_LOOSE_BBOX = true;
|
||||||
static final boolean DEFAULT_PREPARED_STATEMENTS = true;
|
static final boolean DEFAULT_PREPARED_STATEMENTS = true;
|
||||||
static final int DEFAULT_MAX_OPEN_PREPARED_STATEMENTS = 50;
|
static final int DEFAULT_MAX_OPEN_PREPARED_STATEMENTS = 50;
|
||||||
|
static final boolean DEFAULT_ESTIMATED_EXTENDS = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an {@value #TYPE} datastore with default connection parameters,
|
* Create an {@value #TYPE} datastore with default connection parameters,
|
||||||
@ -80,6 +81,7 @@ public class GSOracleNGDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
setLooseBBox(DEFAULT_LOOSE_BBOX);
|
setLooseBBox(DEFAULT_LOOSE_BBOX);
|
||||||
setPreparedStatements(DEFAULT_PREPARED_STATEMENTS);
|
setPreparedStatements(DEFAULT_PREPARED_STATEMENTS);
|
||||||
setMaxOpenPreparedStatements(DEFAULT_MAX_OPEN_PREPARED_STATEMENTS);
|
setMaxOpenPreparedStatements(DEFAULT_MAX_OPEN_PREPARED_STATEMENTS);
|
||||||
|
setEstimatedExtends(DEFAULT_ESTIMATED_EXTENDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -172,6 +174,10 @@ public class GSOracleNGDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
connectionParameters.set("Max open prepared statements", Integer.toString(maxOpenPreparedStatements));
|
connectionParameters.set("Max open prepared statements", Integer.toString(maxOpenPreparedStatements));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEstimatedExtends(boolean estimatedExtends){
|
||||||
|
connectionParameters.set("Estimated extends", Boolean.toString(estimatedExtends));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check database validity.
|
* Check database validity.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -43,6 +43,7 @@ public class GSPostGISDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
static final boolean DEFAULT_LOOSE_BBOX = true;
|
static final boolean DEFAULT_LOOSE_BBOX = true;
|
||||||
static final boolean DEFAULT_PREPARED_STATEMENTS = false;
|
static final boolean DEFAULT_PREPARED_STATEMENTS = false;
|
||||||
static final int DEFAULT_MAX_OPEN_PREPARED_STATEMENTS = 50;
|
static final int DEFAULT_MAX_OPEN_PREPARED_STATEMENTS = 50;
|
||||||
|
static final boolean DEFAULT_ESTIMATED_EXTENDS = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -63,6 +64,7 @@ public class GSPostGISDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
setLooseBBox(DEFAULT_LOOSE_BBOX);
|
setLooseBBox(DEFAULT_LOOSE_BBOX);
|
||||||
setPreparedStatements(DEFAULT_PREPARED_STATEMENTS);
|
setPreparedStatements(DEFAULT_PREPARED_STATEMENTS);
|
||||||
setMaxOpenPreparedStatements(DEFAULT_MAX_OPEN_PREPARED_STATEMENTS);
|
setMaxOpenPreparedStatements(DEFAULT_MAX_OPEN_PREPARED_STATEMENTS);
|
||||||
|
setEstimatedExtends(DEFAULT_ESTIMATED_EXTENDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +144,10 @@ public class GSPostGISDatastoreEncoder extends GSAbstractDatastoreEncoder {
|
|||||||
connectionParameters.set("Max open prepared statements", Integer.toString(maxOpenPreparedStatements));
|
connectionParameters.set("Max open prepared statements", Integer.toString(maxOpenPreparedStatements));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEstimatedExtends(boolean estimatedExtends){
|
||||||
|
connectionParameters.set("Estimated extends", Boolean.toString(estimatedExtends));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@value #TYPE}
|
* @return {@value #TYPE}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
package it.geosolutions.geoserver.rest.manager;
|
package it.geosolutions.geoserver.rest.manager;
|
||||||
|
|
||||||
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher.Format;
|
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher.Format;
|
||||||
|
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher.StoreType;
|
||||||
import it.geosolutions.geoserver.rest.HTTPUtils;
|
import it.geosolutions.geoserver.rest.HTTPUtils;
|
||||||
import it.geosolutions.geoserver.rest.encoder.GSAbstractStoreEncoder;
|
import it.geosolutions.geoserver.rest.encoder.GSAbstractStoreEncoder;
|
||||||
import it.geosolutions.geoserver.rest.encoder.datastore.GSAbstractDatastoreEncoder;
|
import it.geosolutions.geoserver.rest.encoder.datastore.GSAbstractDatastoreEncoder;
|
||||||
@ -120,4 +121,6 @@ public class GeoServerRESTStoreManager extends GeoServerRESTAbstractManager {
|
|||||||
// }
|
// }
|
||||||
return deleted;
|
return deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,23 +69,4 @@ public class MetadataDecoderTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testMetadataLinkInfo() throws IOException{
|
|
||||||
File coverageFile = new ClassPathResource("testdata/coverageExample.xml").getFile();
|
|
||||||
String coverageString = FileUtils.readFileToString(coverageFile);
|
|
||||||
RESTCoverage coverage = RESTCoverage.build(coverageString);
|
|
||||||
|
|
||||||
List<GSMetadataLinkInfoEncoder> list = coverage.getEncodedMetadataLinkInfoList();
|
|
||||||
|
|
||||||
GSMetadataLinkInfoEncoder metadataLinkInfo1 = list.get(0);
|
|
||||||
Assert.assertEquals("text/xml", metadataLinkInfo1.getType());
|
|
||||||
Assert.assertEquals("ISO19115:2003", metadataLinkInfo1.getMetadataType());
|
|
||||||
Assert.assertEquals("http://www.organization.org/metadata1", metadataLinkInfo1.getContent());
|
|
||||||
|
|
||||||
GSMetadataLinkInfoEncoder metadataLinkInfo2 = list.get(1);
|
|
||||||
Assert.assertEquals("text/html",metadataLinkInfo2.getType());
|
|
||||||
Assert.assertEquals("ISO19115:2003",metadataLinkInfo2.getMetadataType());
|
|
||||||
Assert.assertEquals("http://www.organization.org/metadata2",metadataLinkInfo2.getContent());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,120 @@
|
|||||||
|
package it.geosolutions.geoserver.decoder;
|
||||||
|
|
||||||
|
import it.geosolutions.geoserver.rest.decoder.RESTCoverage;
|
||||||
|
import it.geosolutions.geoserver.rest.encoder.metadatalink.GSMetadataLinkInfoEncoder;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ResourceDecoderTest
|
||||||
|
*
|
||||||
|
* @author eblondel
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ResourceDecoderTest {
|
||||||
|
|
||||||
|
|
||||||
|
RESTCoverage coverage;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() throws IOException {
|
||||||
|
File coverageFile = new ClassPathResource(
|
||||||
|
"testdata/coverageExample.xml").getFile();
|
||||||
|
String coverageString = FileUtils.readFileToString(coverageFile);
|
||||||
|
coverage = RESTCoverage.build(coverageString);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testName() {
|
||||||
|
Assert.assertEquals(coverage.getName(), "granuleTestMosaic");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNativeName() {
|
||||||
|
Assert.assertEquals(coverage.getNativeName(), "granuleTestMosaic");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTitle() {
|
||||||
|
Assert.assertEquals(coverage.getNativeName(), "granuleTestMosaic");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testAbstract() {
|
||||||
|
Assert.assertEquals(coverage.getAbstract(), "this is an abstract");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testKeywords() {
|
||||||
|
List<String> keywords = coverage.getKeywords();
|
||||||
|
Assert.assertEquals(keywords.get(0), "keyword1");
|
||||||
|
Assert.assertEquals(keywords.get(1), "keyword2");
|
||||||
|
Assert.assertEquals(keywords.get(2), "keyword3");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNameSpace() {
|
||||||
|
Assert.assertEquals(coverage.getNameSpace(), "topp");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testStoreName() {
|
||||||
|
Assert.assertEquals(coverage.getStoreName(), "granuleTestMosaic");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testStoreType() {
|
||||||
|
Assert.assertEquals(coverage.getStoreType(), "coverageStore");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testStoreUrl() {
|
||||||
|
Assert.assertEquals(
|
||||||
|
coverage.getStoreUrl(),
|
||||||
|
"http://localhost:8080/geoserver/rest/workspaces/topp/coveragestores/granuleTestMosaic.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCRS() {
|
||||||
|
Assert.assertEquals(coverage.getCRS(), "EPSG:4326");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBoundingBox() {
|
||||||
|
Assert.assertEquals(coverage.getMinX(), -180.0, 0);
|
||||||
|
Assert.assertEquals(coverage.getMaxX(), 180.0, 0);
|
||||||
|
Assert.assertEquals(coverage.getMinY(), -90, 0);
|
||||||
|
Assert.assertEquals(coverage.getMaxY(), 90, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMetadataLinkInfo() throws IOException {
|
||||||
|
|
||||||
|
List<GSMetadataLinkInfoEncoder> list = coverage
|
||||||
|
.getEncodedMetadataLinkInfoList();
|
||||||
|
|
||||||
|
GSMetadataLinkInfoEncoder metadataLinkInfo1 = list.get(0);
|
||||||
|
Assert.assertEquals("text/xml", metadataLinkInfo1.getType());
|
||||||
|
Assert.assertEquals("ISO19115:2003",
|
||||||
|
metadataLinkInfo1.getMetadataType());
|
||||||
|
Assert.assertEquals("http://www.organization.org/metadata1",
|
||||||
|
metadataLinkInfo1.getContent());
|
||||||
|
|
||||||
|
GSMetadataLinkInfoEncoder metadataLinkInfo2 = list.get(1);
|
||||||
|
Assert.assertEquals("text/html", metadataLinkInfo2.getType());
|
||||||
|
Assert.assertEquals("ISO19115:2003",
|
||||||
|
metadataLinkInfo2.getMetadataType());
|
||||||
|
Assert.assertEquals("http://www.organization.org/metadata2",
|
||||||
|
metadataLinkInfo2.getContent());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2007 - 2011 GeoSolutions S.A.S.
|
||||||
|
* http://www.geo-solutions.it
|
||||||
|
*
|
||||||
|
* GPLv3 + Classpath exception
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package it.geosolutions.geoserver.rest.encoder;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
|
import org.jdom.Element;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GSLayerEncoderTest
|
||||||
|
*
|
||||||
|
* @author Emmanuel Blondel - emmanuel.blondel1@gmail.com |
|
||||||
|
* emmanuel.blondel@fao.org
|
||||||
|
*/
|
||||||
|
public class GSLayerEncoderTest {
|
||||||
|
|
||||||
|
GSLayerEncoder layerEncoder;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
layerEncoder = new GSLayerEncoder();
|
||||||
|
layerEncoder.setEnabled(true);
|
||||||
|
layerEncoder.setQueryable(true);
|
||||||
|
layerEncoder.setDefaultStyle("point");
|
||||||
|
layerEncoder.addStyle("additional_style1");
|
||||||
|
layerEncoder.addStyle("additional_style2");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testProperties() {
|
||||||
|
Assert.assertEquals(
|
||||||
|
true,
|
||||||
|
Boolean.parseBoolean(layerEncoder.getRoot().getChild("enabled")
|
||||||
|
.getValue()));
|
||||||
|
Assert.assertEquals(
|
||||||
|
true,
|
||||||
|
Boolean.parseBoolean(layerEncoder.getRoot()
|
||||||
|
.getChild("queryable").getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefaultStyle() {
|
||||||
|
Assert.assertEquals("point",
|
||||||
|
layerEncoder.getRoot().getChild("defaultStyle").getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMultipleStyles() {
|
||||||
|
Assert.assertEquals(2, layerEncoder.getRoot().getChild("styles")
|
||||||
|
.getChildren().size());
|
||||||
|
Assert.assertEquals("additional_style1", ((Element) layerEncoder
|
||||||
|
.getRoot().getChild("styles").getChildren().get(0)).getText());
|
||||||
|
Assert.assertEquals("additional_style2", ((Element) layerEncoder
|
||||||
|
.getRoot().getChild("styles").getChildren().get(1)).getText());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testRemoveStyle() {
|
||||||
|
Assert.assertTrue(layerEncoder.delStyle("additional_style1"));
|
||||||
|
Assert.assertEquals(1, layerEncoder.getRoot().getChild("styles")
|
||||||
|
.getChildren().size());
|
||||||
|
Assert.assertEquals("additional_style2", ((Element) layerEncoder
|
||||||
|
.getRoot().getChild("styles").getChildren().get(0)).getText());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -48,9 +48,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Note on adding multiple available styles to the GSLayerEncoder: - to run the
|
||||||
|
* testIntegration(), 2 clones of the "point" style, named "point2" and "point3"
|
||||||
|
* have to be created.
|
||||||
*
|
*
|
||||||
* @author ETj (etj at geo-solutions.it)
|
* @author ETj (etj at geo-solutions.it)
|
||||||
* @author Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
|
* @author Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
|
||||||
|
* @author Emmanuel Blondel - emmanuel.blondel1@gmail.com |
|
||||||
|
* emmanuel.blondel@fao.org
|
||||||
*/
|
*/
|
||||||
public class GSFeatureEncoderTest extends GeoserverRESTPublisherTest {
|
public class GSFeatureEncoderTest extends GeoserverRESTPublisherTest {
|
||||||
protected final static Logger LOGGER = LoggerFactory.getLogger(GSFeatureEncoderTest.class);
|
protected final static Logger LOGGER = LoggerFactory.getLogger(GSFeatureEncoderTest.class);
|
||||||
@ -86,6 +91,8 @@ public class GSFeatureEncoderTest extends GeoserverRESTPublisherTest {
|
|||||||
layerEncoder.setQueryable(true);
|
layerEncoder.setQueryable(true);
|
||||||
|
|
||||||
layerEncoder.setDefaultStyle("point");
|
layerEncoder.setDefaultStyle("point");
|
||||||
|
layerEncoder.addStyle("point2");
|
||||||
|
layerEncoder.addStyle("point3");
|
||||||
|
|
||||||
publisher.createWorkspace(DEFAULT_WS);
|
publisher.createWorkspace(DEFAULT_WS);
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,17 @@
|
|||||||
<coverage>
|
<coverage>
|
||||||
<name>granuleTestMosaic</name>
|
<name>granuleTestMosaic</name>
|
||||||
<nativeName>granuleTestMosaic</nativeName>
|
<nativeName>granuleTestMosaic</nativeName>
|
||||||
|
<abstract>this is an abstract</abstract>
|
||||||
<namespace>
|
<namespace>
|
||||||
<name>topp</name>
|
<name>topp</name>
|
||||||
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/topp.xml" type="application/xml"/>
|
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/topp.xml" type="application/xml"/>
|
||||||
</namespace>
|
</namespace>
|
||||||
<title>granuleTestMosaic</title>
|
<title>granuleTestMosaic</title>
|
||||||
|
<keywords>
|
||||||
|
<string>keyword1</string>
|
||||||
|
<string>keyword2</string>
|
||||||
|
<string>keyword3</string>
|
||||||
|
</keywords>
|
||||||
<metadataLinks>
|
<metadataLinks>
|
||||||
<metadataLink>
|
<metadataLink>
|
||||||
<type>text/xml</type>
|
<type>text/xml</type>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user