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

Method labelID

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

Returns the name ID of the specified node. @param data data reference @param labels labels @return name ID, or 0 if key does not exist

(final Data data, final String labels)

Source from the content-addressed store, hash-verified

116 * @return name ID, or {@code 0} if key does not exist
117 */
118 public static int labelID(final Data data, final String labels) {
119 for(final byte[] key : Token.split(Token.token(labels), ',')) {
120 final int id = data.attrNames.index(key);
121 if(id > 0) return id;
122 }
123 return 0;
124 }
125
126 /**
127 * Returns the size ID of the specified node.

Callers 2

labelMethod · 0.95
paintComponentMethod · 0.95

Calls 3

splitMethod · 0.95
tokenMethod · 0.95
indexMethod · 0.65

Tested by

no test coverage detected