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

Method item

basex-core/src/main/java/org/basex/query/func/db/DbPath.java:17–28  ·  view source on GitHub ↗
(final QueryContext qc, final InputInfo ii)

Source from the content-addressed store, hash-verified

15 */
16public final class DbPath extends StandardFunc {
17 @Override
18 public Str item(final QueryContext qc, final InputInfo ii) throws QueryException {
19 XNode node, parent = toNode(arg(0), qc);
20 do {
21 node = parent;
22 parent = node.parent();
23 } while(parent != null);
24
25 final DBNode dbnode = toDBNode(node, false);
26 return dbnode.dbKind() == Data.DOC ? Str.get(dbnode.data().text(dbnode.pre(), true)) :
27 Str.EMPTY;
28 }
29}

Callers

nothing calls this directly

Calls 9

parentMethod · 0.95
getMethod · 0.95
dataMethod · 0.95
preMethod · 0.95
toDBNodeMethod · 0.80
dbKindMethod · 0.80
toNodeMethod · 0.45
argMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected