MCPcopy Create free account
hub / github.com/BaseXdb/basex / createUrl

Method createUrl

basex-core/src/main/java/org/basex/query/func/web/WebFn.java:38–46  ·  view source on GitHub ↗

Creates a URL from the function arguments. @param qc query context @return generated url @throws QueryException query exception

(final QueryContext qc)

Source from the content-addressed store, hash-verified

36 * @throws QueryException query exception
37 */
38 final String createUrl(final QueryContext qc) throws QueryException {
39 final byte[] href = toToken(arg(0), qc);
40 final XQMap parameters = toEmptyMap(arg(1), qc);
41 final byte[] anchor = toZeroToken(arg(2), qc);
42
43 final TokenBuilder url = createUrl(href, parameters, '&', info);
44 if(anchor.length > 0) url.add('#').add(Token.encodeUri(anchor, UriEncoder.URI));
45 return url.toString();
46 }
47
48 /**
49 * Creates a URL from the function arguments.

Callers 4

itemMethod · 0.95
itemMethod · 0.45
itemMethod · 0.45
itemMethod · 0.45

Calls 10

addMethod · 0.95
encodeUriMethod · 0.95
toStringMethod · 0.95
toTokenMethod · 0.80
toEmptyMapMethod · 0.80
toZeroTokenMethod · 0.80
addMethod · 0.65
argMethod · 0.45
forEachMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected