Search in sources :

Example 11 with UrlResource

use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.

the class AbstractWebService method setPassword.

public void setPassword(final String password) {
    this.password = PasswordUtil.decrypt(password);
    final UrlResource serviceUrl = this.serviceUrl;
    if (serviceUrl != null) {
        String username = this.username;
        if (username == null) {
            username = serviceUrl.getUsername();
        }
        this.serviceUrl = serviceUrl.newUrlResourceAuthorization(username, this.password);
    }
}
Also used : UrlResource(com.revolsys.spring.resource.UrlResource)

Example 12 with UrlResource

use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.

the class ArcGisRestServerRecordLayer method setLayerDescription.

public void setLayerDescription(final FeatureLayer layerDescription) {
    this.layerDescription = layerDescription;
    if (layerDescription != null) {
        final String name = layerDescription.getName();
        setName(name);
        final UrlResource url = layerDescription.getRootServiceUrl();
        setUrl(url);
        final PathName pathName = layerDescription.getPathName();
        setLayerPath(pathName);
        final long minScale = layerDescription.getMinScale();
        setMinimumScale(minScale);
        final long maxScale = layerDescription.getMaxScale();
        setMaximumScale(maxScale);
    }
}
Also used : UrlResource(com.revolsys.spring.resource.UrlResource) PathName(com.revolsys.io.PathName)

Example 13 with UrlResource

use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.

the class OsmDocument method newDocument.

public static OsmDocument newDocument(final String serverUrl, BoundingBox boundingBox) {
    if (boundingBox != null) {
        boundingBox = boundingBox.convert(OsmConstants.WGS84_2D);
        if (!boundingBox.isEmpty()) {
            final StringBuilder url = new StringBuilder(serverUrl);
            url.append("map?bbox=");
            url.append(boundingBox.getMinX());
            url.append(",");
            url.append(boundingBox.getMinY());
            url.append(",");
            url.append(boundingBox.getMaxX());
            url.append(",");
            url.append(boundingBox.getMaxY());
            final Resource resource = new UrlResource(url.toString());
            return new OsmDocument(resource);
        }
    }
    return new OsmDocument();
}
Also used : UrlResource(com.revolsys.spring.resource.UrlResource) Resource(com.revolsys.spring.resource.Resource) UrlResource(com.revolsys.spring.resource.UrlResource)

Example 14 with UrlResource

use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.

the class AbstractWebService method setUsername.

public void setUsername(final String username) {
    this.username = username;
    final UrlResource serviceUrl = this.serviceUrl;
    if (serviceUrl != null) {
        String password = this.password;
        if (password == null) {
            password = serviceUrl.getPassword();
        }
        this.serviceUrl = serviceUrl.newUrlResourceAuthorization(username, password);
    }
}
Also used : UrlResource(com.revolsys.spring.resource.UrlResource)

Example 15 with UrlResource

use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.

the class MapGuideWebServerRecordLayer method setWebServiceLayer.

public void setWebServiceLayer(final FeatureLayer layerDescription) {
    this.webServiceLayer = layerDescription;
    if (this.webServiceLayer != null) {
        final String name = this.webServiceLayer.getName();
        setName(name);
        final UrlResource serviceUrl = this.webServiceLayer.getWebService().getServiceUrl();
        setUrl(serviceUrl);
        final PathName pathName = this.webServiceLayer.getPathName();
        setLayerPath(pathName);
    }
}
Also used : UrlResource(com.revolsys.spring.resource.UrlResource) PathName(com.revolsys.io.PathName)

Aggregations

UrlResource (com.revolsys.spring.resource.UrlResource)18 MapEx (com.revolsys.collection.map.MapEx)4 Resource (com.revolsys.spring.resource.Resource)4 PathName (com.revolsys.io.PathName)3 LinkedHashMapEx (com.revolsys.collection.map.LinkedHashMapEx)2 WmsCapabilities (com.revolsys.gis.wms.capabilities.WmsCapabilities)2 File (java.io.File)2 LinkedHashMap (java.util.LinkedHashMap)2 CoordinateOperationMethod (com.revolsys.geometry.cs.CoordinateOperationMethod)1 CoordinateSystem (com.revolsys.geometry.cs.CoordinateSystem)1 GeographicCoordinateSystem (com.revolsys.geometry.cs.GeographicCoordinateSystem)1 ProjectedCoordinateSystem (com.revolsys.geometry.cs.ProjectedCoordinateSystem)1 GzipResource (com.revolsys.spring.resource.GzipResource)1 SymbolLibrary (com.revolsys.swing.map.symbol.SymbolLibrary)1 WebServiceResource (com.revolsys.webservice.WebServiceResource)1 InputStream (java.io.InputStream)1 URI (java.net.URI)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Set (java.util.Set)1