Set the URL Base for the Page.
@param target Default link target, null if none.
@param href Default absolute href, null if none.
@return This Page (for chained commands)
775875
public final Page setBase(String target, String href)
    {
        base="<base " +
            ((target!=null)?("TARGET=\""+target+"\""):"") +
            ((href!=null)?("HREF=\""+href+"\""):"") +
            ">";
        return this;
    }
837200
public static void setImageLink(String path, Map<String, String> attributes, String linkPath, String target) {

        CmsJSONMap attributesJS = CmsJSONMap.createJSONMap();
        for (Entry<String, String> entry : attributes.entrySet()) {
            attributesJS.put(entry.getKey(), entry.getValue());
        }
        nativeSetImageLink(path, attributesJS, linkPath, target);
    }
1064178
function(url, src) {
		if (src) {
			this._setupsrc(src);
		}
		if (url) {
			this.element.src = url;
		}
		return this.contentLocation.href;
	}
1359507
public function asLink($href=NULL,$target=NULL) {
		if (isset($href))
			$this->setProperty("href", $href);
		if(isset($target))
			$this->setProperty("target", $target);
		return $this->setTagName("a");
	}
457922
function(url, base) {
			if (!url || url.indexOf('://') !== -1) { return url; }

			var anchor = document.createElement('a');
			anchor.href = (base || location.href);

			var protocol	= anchor.protocol + '//',
				host		= anchor.host,
				path		= anchor.pathname,
				parts		= filter(path.split('/'), function(part) { return part !== ''; });

			each(url.replace(/\?.*/, '').split('/'), function(part, index) {
				switch(part) {
					case '..':
						if (!parts.length) {
							throw new Error('Path outside of root: ' + url);
						}
						parts.length--;
						break;
					case '.':	break;
					default:	parts.push(part); break
				}
			});
			return protocol + host + '/' + parts.join('/');
		}
927873
function _default(base, link) {
  // Dynamic stuff:
  if (typeof link !== "string" || link.match(REGEX_DYNAMIC)) {
    return base;
  } // Link is absolute:


  if (link.match(REGEX_ABSOLUTE)) {
    try {
      const parsedBase = parseLink(base);
      const parsedLink = parseLink(link); // Both `base` and `link` are on different domains:

      if (parsedBase.domain !== parsedLink.domain) {
        return false;
      } // Absolute path from same domain:


      if (parsedLink.path) {
        return (0, _url.resolve)(base, parsedLink.path);
      } // Same domains without path:


      return (0, _url.parse)(base).href;
    } catch (err) {
      return false;
    }
  } // Relative stuff:


  return regenerateLink(base, link);
}
376903
public void showLink(final String href) {
            if (null != href && !href.isEmpty()) {
                if (logger.isTraceEnabled()) {
                    logger.trace("JS asks to browse to {}", href);
                }
                if (!Desktop.isDesktopSupported()) {
                    if (logger.isWarnEnabled()) {
                        logger.warn("no desktop support for displaying {}", href);
                    }
                } else {
                    try {
                        Desktop.getDesktop().browse(new URI(href));
                    } catch (final IOException | URISyntaxException e) {
                        if (logger.isWarnEnabled()) {
                            logger.warn("can't display {}", href, e);
                        }
                    }
                }
            }
        }
858385
def link(self, href, **kwargs):
        """"""
        return link.Link(dict(href=href, **kwargs), self.base_uri)
343792
@Override
    public List<String> setTargetHostsFromCmsQueryUrl(String cmsQueryUrl)
            throws TargetHostsLoadException {
        List<String> targetHosts = new ArrayList<String>();
        try {

            logger.info("will use default project label");
            targetHosts = setTargetHostsFromCmsQueryUrl(cmsQueryUrl, "label");
        } catch (Exception e) {
            throw new TargetHostsLoadException("error when reading  "
                    + cmsQueryUrl, e);
        }

        return targetHosts;

    }
1242823
function setBaseUrl(projectBaseUrl) {
        var context = _getProjectViewStateContext();

        projectBaseUrl = model.setBaseUrl(projectBaseUrl);

        PreferencesManager.setViewState("project.baseUrl", projectBaseUrl, context);
    }
681483
@Override
	public boolean apply(final Link link) {
		final String sourceHost = link.source.getHost(), targetHost = link.target.getHost();
		if (sourceHost == null) throw new IllegalArgumentException("URI \"" + link.source + "\" has no host");
		if (targetHost == null) throw new IllegalArgumentException("URI \"" + link.target + "\" has no host");
		// BURL hosts are always lower cased
		return sourceHost.equals(targetHost);
	}
628885
public function setDefaultTarget(CNabuDataObject $nb_site_target)
    {
        $this->setDefaultTargetUseURI(CNabuSiteTargetLink::USE_URI_TRANSLATED);
        $this->transferValue($nb_site_target, 'nb_site_target_id', 'nb_site_default_target_id');

        return $this;
    }
621872
public void setTarget(AstNode target) {
        // Don't throw exception if target is an "invalid" node type.
        // See mozilla/js/tests/js1_7/block/regress-350279.js
        if (target == null)
            throw new IllegalArgumentException("invalid target arg");
        this.target = target;
        target.setParent(this);
    }
328664
protected Resource resolveResource(String href, String base) throws TransformerException {
        final Resource resolvedResource;
        if (base != null) {
            final Resource baseResource = this.resourceLoader.getResource(base);

            try {
                resolvedResource = baseResource.createRelative(href);
            } catch (IOException e) {
                throw new TransformerException(
                        "Failed to find '" + href + "' relative to: " + baseResource, e);
            }

            this.logger.debug(
                    "Created resource {} for href: {} and base: {}",
                    new Object[] {resolvedResource, href, baseResource});
        } else {
            resolvedResource = this.resourceLoader.getResource(href);

            this.logger.debug("Created resource {} for href: {}", resolvedResource, href);
        }
        return resolvedResource;
    }
348959
public void setTarget(java.lang.String target) {
        getStateHelper().put(PropertyKeys.target, target);
    }
877906
public Href with(final Object key, final Object value) {
        final SortedMap<String, List<String>> map = new TreeMap<>(this.params);
        if (!map.containsKey(key.toString())) {
            map.put(key.toString(), new LinkedList<>());
        }
        map.get(key.toString()).add(value.toString());
        return new Href(this.uri, map, this.fragment);
    }
221653
public void setServiceEndPointUrl(String url) {
		ServiceDefTarget endpoint = (ServiceDefTarget) service;
		endpoint.setServiceEntryPoint(url);
	}