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

Method info

basex-core/src/main/java/org/basex/data/Namespaces.java:412–432  ·  view source on GitHub ↗

Returns namespace information. @return info string

()

Source from the content-addressed store, hash-verified

410 * @return info string
411 */
412 public byte[] info() {
413 final TokenObjectMap<TokenList> map = new TokenObjectMap<>();
414 root.info(map, this);
415 final TokenBuilder tb = new TokenBuilder();
416 for(final byte[] key : map) {
417 tb.add(" ");
418 final TokenList values = map.get(key).sort();
419 final int ks = values.size();
420 if(ks > 1 || values.get(0).length != 0) {
421 if(values.size() != 1) tb.add("(");
422 for(int k = 0; k < ks; ++k) {
423 if(k != 0) tb.add(", ");
424 tb.add(values.get(k));
425 }
426 if(ks != 1) tb.add(")");
427 tb.add(" = ");
428 }
429 tb.addExt("\"%\"" + NL, key);
430 }
431 return tb.finish();
432 }
433
434 /**
435 * Returns a string representation of the namespaces.

Callers

nothing calls this directly

Calls 8

addMethod · 0.95
getMethod · 0.95
addExtMethod · 0.95
finishMethod · 0.95
infoMethod · 0.65
sizeMethod · 0.65
getMethod · 0.65
sortMethod · 0.45

Tested by

no test coverage detected