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

Method run

basex-core/src/main/java/org/basex/core/cmd/InfoIndex.java:40–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 }
39
40 @Override
41 protected boolean run() throws IOException {
42 final Data data = context.data();
43 if(!args[0].isEmpty()) {
44 final CmdIndexInfo ci = getOption(CmdIndexInfo.class);
45 if(ci == null) return error(UNKNOWN_CMD_X, this);
46 final byte[] inf = info(ci, data, options);
47 out.print(inf);
48 return inf.length != 0;
49 }
50
51 final TokenBuilder tb = new TokenBuilder();
52 tb.add(info(CmdIndexInfo.ELEMNAME, data, options));
53 tb.add(info(CmdIndexInfo.ATTRNAME, data, options));
54 tb.add(info(CmdIndexInfo.TEXT, data, options));
55 tb.add(info(CmdIndexInfo.ATTRIBUTE, data, options));
56 tb.add(info(CmdIndexInfo.TOKEN, data, options));
57 tb.add(info(CmdIndexInfo.FULLTEXT, data, options));
58 tb.add(info(CmdIndexInfo.PATH, data, options));
59 out.print(tb.finish());
60 return true;
61 }
62
63 @Override
64 public void addLocks() {

Callers

nothing calls this directly

Calls 8

infoMethod · 0.95
addMethod · 0.95
finishMethod · 0.95
getOptionMethod · 0.80
printMethod · 0.65
dataMethod · 0.45
isEmptyMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected