Search in sources :

Example 1 with NamespaceManager

use of eu.esdihumboldt.hale.io.geoserver.rest.NamespaceManager in project hale by halestudio.

the class AppSchemaMappingUploader method publishNamespaces.

private void publishNamespaces() {
    NamespaceManager nsMgr = new NamespaceManager(geoserverURL);
    nsMgr.setCredentials(username, password);
    // check whether main namespace/workspace exists; if not, create it
    Namespace mainNs = generator.getMainNamespace();
    createNamespaceIfRequired(nsMgr, mainNs);
    // check whether secondary namespaces/workspaces exist; if not, create
    // them
    List<Namespace> secondaryNamespaces = generator.getSecondaryNamespaces();
    for (Namespace ns : secondaryNamespaces) {
        createNamespaceIfRequired(nsMgr, ns);
    }
}
Also used : NamespaceManager(eu.esdihumboldt.hale.io.geoserver.rest.NamespaceManager) Namespace(eu.esdihumboldt.hale.io.geoserver.Namespace)

Aggregations

Namespace (eu.esdihumboldt.hale.io.geoserver.Namespace)1 NamespaceManager (eu.esdihumboldt.hale.io.geoserver.rest.NamespaceManager)1