Determines the URL based on the configured value. If the URL is
not configured, search for an embedded database driver on the
classpath and retrieve a default URL for it.

@return The calculated URL
162123
public String getUrl() {
        final String url = basicJdbcConfiguration.getConfiguredUrl();
        if (calculatedUrl == null || StringUtils.hasText(url)) {
            calculatedUrl = url;
            if (!StringUtils.hasText(calculatedUrl) && embeddedDatabaseConnection.isPresent()) {
                calculatedUrl = embeddedDatabaseConnection.get().getUrl(basicJdbcConfiguration.getName());
            }
            if (!StringUtils.hasText(calculatedUrl)) {
                throw new ConfigurationException(String.format("Error configuring data source '%s'. No URL specified", basicJdbcConfiguration.getName()));
            }
        }

        return calculatedUrl;
    }
657585
public String getEffectiveUrl() {
        StringBuilder url = new StringBuilder(this.getUrlPrefix());
        url.append(this.getRepositoryPath());
        char propertyDelim = getPropertyDelimiter();
        for (String propertyName : getProperties().stringPropertyNames()) {
            String value = getProperties().getProperty(propertyName);
            if (value == null) {
                continue;
            }
            if (LocalJcrDriver.PASSWORD_PROPERTY_NAME.equals(propertyName)) {
                value = StringUtil.createString('*', value.length());
            }
            url.append(propertyDelim).append(propertyName).append('=').append(value);
            propertyDelim = '&';
        }
        return url.toString();
    }
986915
@Override
    public String getCompleteURL() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getCompleteURL();
        return null;
    }
668852
public StringBuffer getRequestURL()
    {
        StringBuffer buf = _httpRequest.getRootURL();
        buf.append(getRequestURI());
        return buf;
    }
70643
@SuppressWarnings("MagicNumber")
    public static Optional<JdbcDatabase> findDatabase(String jdbcUrl) {
        if (StringUtils.isNotEmpty(jdbcUrl)) {
            if (!jdbcUrl.startsWith("jdbc")) {
                throw new IllegalArgumentException("JDBC URLs must start with 'jdbc'");
            }
            String partialUrl = jdbcUrl.substring(5);
            String prefix = partialUrl.substring(0, partialUrl.indexOf(':')).toLowerCase();

            return databases.stream().filter(db -> db.containsPrefix(prefix)).findFirst();
        }
        return Optional.empty();
    }
334910
@Override
	public String getWebInterfaceURL() {
		try {
			return getWebMonitorBaseUrl().get().toString();
		} catch (InterruptedException | ExecutionException e) {
			ExceptionUtils.checkInterrupted(e);

			log.warn("Could not retrieve the web interface URL for the cluster.", e);
			return "Unknown address.";
		}
	}
889689
public String getUrl() {
		if (this.url == null) {
			if ((this.host == null) || (this.port == null)) {
				return null;
			}
			return FRONT + this.host + ":" + this.port + BACK;
		}
		return this.url;
	}
1346648
public static String getWriteUrl() {
        String writeUrl = XianConfig.get(DB_URL_KEY);
        LOG.info("db_url = " + writeUrl);
        return writeUrl;
    }
547614
public function getUrl()
    {
        if (is_null($this->_url)) {
            $this->_resourceTypeConfig = $this->getResourceTypeConfig();
            if (is_null($this->_resourceTypeConfig)) {
                $connector =& CKFinder_Connector_Core_Factory::getInstance("Core_Connector");
                $oErrorHandler =& $connector->getErrorHandler();
                $oErrorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_TYPE);
                $this->_url = "";
            }
            else {
                $this->_url = $this->_resourceTypeConfig->getUrl() . ltrim($this->getClientPath(), "/");
            }
        }

        return $this->_url;
    }
1023574
public function getUrl()
    {
        if ($this->url === null) {
            switch ($this->dataType) {
                case 'json':
                    $this->url = $this->urlJson;
                    break;
                case 'xml':
                    $this->url = $this->urlXml;
                    break;
                default:
                    throw new InvalidConfigException('“dataType”配置错误！');
            }
        }
        
        return $this->url;
    }
1195569
public String url() {
        try {
            return driver.getCurrentUrl();
        } catch (Exception e) {
            log.warn(e);
            return null;
        }
    }
257462
public String getUrl() {
        final StringBuilder sb = new StringBuilder();

        sb.append(secured() ? "https://" : "http://")
          .append(website())
          .append(path())
          .append(name())
          .append(extension());

        return sb.toString();
    }
642604
public static URL getURL(String classpathOrFilePath) {
        try {
            return getURI(classpathOrFilePath).toURL();
        } catch (MalformedURLException e) {
            return JMExceptionManager.handleExceptionAndReturnNull(log, e,
                    "getURL", classpathOrFilePath);
        }
    }
1316844
public String getUrl() {
		Environment env = getEnvironment();
		Map<String, String> parameters = env.getHiddenParameters();
		parameters.put(WWINDOW_REQUEST_PARAM_KEY, getId());
		// Override the step count with WWindow step
		parameters.put(Environment.STEP_VARIABLE, String.valueOf(getStep()));

		String url = env.getWServletPath();

		return WebUtilities.getPath(url, parameters, true);
	}
1120653
public String getCurrentUrl() {
    Activity activity = serverInstrumentation.getCurrentActivity();
    if (activity == null) {
      return null;
    }
    return "and-activity://" + activity.getLocalClassName();
  }
1195447
private String getUrl(DataSource dataSource) {
        Connection conn = null;
        try {
            conn = dataSource.getConnection();
            return conn.getMetaData().getURL();
        } catch (SQLException e) {
            throw new PageException(e);
        } finally {
            if (conn != null) {
                try {
                    if (closeConn) {
                        conn.close();
                    }
                } catch (SQLException e) {
                    //ignore
                }
            }
        }
    }
741687
public java.lang.String getSourceUrl() {
    java.lang.Object ref = sourceUrl_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      sourceUrl_ = s;
      return s;
    }
  }