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

Method text

basex-core/src/main/java/org/basex/gui/view/ViewData.java:81–89  ·  view source on GitHub ↗

Returns textual contents for the specified node. @param data data reference @param pre PRE value @return text

(final Data data, final int pre)

Source from the content-addressed store, hash-verified

79 * @return text
80 */
81 public static byte[] text(final Data data, final int pre) {
82 final int kind = data.kind(pre);
83 return switch(kind) {
84 case Data.ELEM -> data.name(pre, kind);
85 case Data.ATTR -> Token.concat(XMLToken.AT, data.name(pre, kind), XMLToken.ATT1,
86 data.text(pre, false), XMLToken.ATT2);
87 default -> data.text(pre, true);
88 };
89 }
90
91 /**
92 * Returns a label for the specified node.

Callers 5

labelMethod · 0.95
drawRectanglesMethod · 0.95
textMethod · 0.95
drawEntryMethod · 0.95
pathMethod · 0.45

Calls 3

concatMethod · 0.95
kindMethod · 0.65
nameMethod · 0.65

Tested by

no test coverage detected