use of org.sirix.node.interfaces.StructNode in project sirix by sirixdb.
the class XdmNodeReadTrxImpl method getFirstChildDeweyID.
@Override
public Optional<SirixDeweyID> getFirstChildDeweyID() {
if (mResourceManager.getResourceConfig().mDeweyIDsStored) {
final StructNode node = getStructuralNode();
final long nodeKey = node.getNodeKey();
Optional<SirixDeweyID> deweyID = Optional.<SirixDeweyID>empty();
if (node.hasFirstChild()) {
// Right sibling node.
deweyID = moveTo(node.getFirstChildKey()).get().getDeweyID();
}
moveTo(nodeKey);
return deweyID;
}
return Optional.<SirixDeweyID>empty();
}
use of org.sirix.node.interfaces.StructNode in project sirix by sirixdb.
the class XdmNodeReadTrxImpl method getFirstChildKind.
@Override
public Kind getFirstChildKind() {
assertNotClosed();
if (mCurrentNode instanceof StructNode && hasFirstChild()) {
final long nodeKey = mCurrentNode.getNodeKey();
moveToFirstChild();
final Kind firstChildKind = mCurrentNode.getKind();
moveTo(nodeKey);
return firstChildKind;
}
return Kind.UNKNOWN;
}
use of org.sirix.node.interfaces.StructNode in project sirix by sirixdb.
the class XdmNodeReadTrxImpl method getLeftSiblingDeweyID.
@Override
public Optional<SirixDeweyID> getLeftSiblingDeweyID() {
assertNotClosed();
if (mResourceManager.getResourceConfig().mDeweyIDsStored) {
final StructNode node = getStructuralNode();
final long nodeKey = node.getNodeKey();
Optional<SirixDeweyID> deweyID = Optional.<SirixDeweyID>empty();
if (node.hasLeftSibling()) {
// Left sibling node.
deweyID = moveTo(node.getLeftSiblingKey()).get().getDeweyID();
}
moveTo(nodeKey);
return deweyID;
}
return Optional.<SirixDeweyID>empty();
}
use of org.sirix.node.interfaces.StructNode in project sirix by sirixdb.
the class XdmNodeReadTrxImpl method moveToLeftSibling.
@Override
public Move<? extends XdmNodeReadTrx> moveToLeftSibling() {
assertNotClosed();
final StructNode node = getStructuralNode();
if (!node.hasLeftSibling()) {
return Move.notMoved();
}
return moveTo(node.getLeftSiblingKey());
}
use of org.sirix.node.interfaces.StructNode in project sirix by sirixdb.
the class XdmNodeReadTrxImpl method getLeftSiblingKind.
@Override
public Kind getLeftSiblingKind() {
assertNotClosed();
if (mCurrentNode instanceof StructNode && hasLeftSibling()) {
final long nodeKey = mCurrentNode.getNodeKey();
moveToLeftSibling();
final Kind leftSiblKind = mCurrentNode.getKind();
moveTo(nodeKey);
return leftSiblKind;
}
return Kind.UNKNOWN;
}
Aggregations