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

Method attr

basex-core/src/main/java/org/basex/data/Data.java:1018–1027  ·  view source on GitHub ↗

Adds an attribute to the internal update buffer. @param dist parent distance @param nameId ID of attribute name @param value attribute value @param uriId ID of namespace URI

(final int dist, final int nameId, final byte[] value, final int uriId)

Source from the content-addressed store, hash-verified

1016 * @param uriId ID of namespace URI
1017 */
1018 public final void attr(final int dist, final int nameId, final byte[] value, final int uriId) {
1019 // add attribute to text storage
1020 final int id = newID();
1021 final long v = textRef(value, false);
1022 s(Math.min(IO.MAXATTS, dist) << 3 | ATTR);
1023 s(nameId >> 8); s(nameId); s(v >> 32);
1024 s(v >> 24); s(v >> 16); s(v >> 8); s(v);
1025 s(0); s(0); s(0); s(uriId);
1026 s(id >> 24); s(id >> 16); s(id >> 8); s(id);
1027 }
1028
1029 /**
1030 * Stores the specified value in the update buffer.

Callers 15

replaceMethod · 0.95
insertMethod · 0.95
createMethod · 0.45
addParamMethod · 0.45
run0Method · 0.45
createMethod · 0.45
addAttributeMethod · 0.45
attrClipMethod · 0.45
toXmlMethod · 0.45
finishMethod · 0.45
addTypeMethod · 0.45
addValueMethod · 0.45

Calls 4

newIDMethod · 0.95
textRefMethod · 0.95
sMethod · 0.95
minMethod · 0.45

Tested by 3

addAttributeMethod · 0.36
attrClipMethod · 0.36
createMethod · 0.36