Examples of GSNamespaceEncoder


Examples of it.geosolutions.geoserver.rest.encoder.GSNamespaceEncoder

     * @return <TT>true</TT> if the Namespace was successfully created.
     * @see <a href="http://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html#namespaces"> GeoServer Documentation</a>
     */
    public boolean createNamespace(final String prefix, final URI uri) {
        final String sUrl = restURL + "/rest/namespaces";
        final GSNamespaceEncoder nsenc = new GSNamespaceEncoder(prefix, uri);
        final String nsxml = nsenc.toString();
        final String result = HTTPUtils.postXml(sUrl, nsxml, gsuser, gspass);
        return result != null;
    }
View Full Code Here

Examples of it.geosolutions.geoserver.rest.encoder.GSNamespaceEncoder

     *
     * @return <TT>true</TT> if the Namespace was successfully updated.
     */
    public boolean updateNamespace(final String prefix, final URI uri) {
        final String sUrl = restURL + "/rest/namespaces/" + encode(prefix);
        final GSNamespaceEncoder nsenc = new GSNamespaceEncoder(prefix, uri);
        final String nsxml = nsenc.toString();
        final String result = HTTPUtils.put(sUrl, nsxml, "application/xml", gsuser, gspass);
        return result != null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.