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

Method info

basex-core/src/main/java/org/basex/data/NSNode.java:323–331  ·  view source on GitHub ↗

Adds namespace information for the specified node to a map. @param map namespace map @param ns namespace reference

(final TokenObjectMap<TokenList> map, final Namespaces ns)

Source from the content-addressed store, hash-verified

321 * @param ns namespace reference
322 */
323 void info(final TokenObjectMap<TokenList> map, final Namespaces ns) {
324 final int vl = values.length;
325 for(int v = 0; v < vl; v += 2) {
326 final byte[] prefix = ns.prefix(values[v]), uri = ns.uri(values[v + 1]);
327 final TokenList prfs = map.computeIfAbsent(uri, () -> new TokenList(1));
328 if(!prfs.contains(prefix)) prfs.add(prefix);
329 }
330 for(int c = 0; c < size; ++c) nodes[c].info(map, ns);
331 }
332
333 /**
334 * Prints the node structure.

Callers

nothing calls this directly

Calls 6

addMethod · 0.95
containsMethod · 0.65
infoMethod · 0.65
prefixMethod · 0.45
uriMethod · 0.45
computeIfAbsentMethod · 0.45

Tested by

no test coverage detected