Search in sources :

Example 1 with Visitor

use of org.sirix.api.visitor.Visitor in project sirix by sirixdb.

the class IndexBuilder method build.

/**
 * Build the index.
 *
 * @param rtx the current {@link XdmNodeReadTrx}
 * @param builders the index builders
 */
public static void build(final XdmNodeReadTrx rtx, final Set<Visitor> builders) {
    final long nodeKey = rtx.getNodeKey();
    rtx.moveToDocumentRoot();
    for (@SuppressWarnings("unused") final long key : new NonStructuralWrapperAxis(new DescendantAxis(rtx))) {
        for (final Visitor builder : builders) {
            rtx.acceptVisitor(builder);
        }
    }
    rtx.moveTo(nodeKey);
}
Also used : Visitor(org.sirix.api.visitor.Visitor) NonStructuralWrapperAxis(org.sirix.axis.NonStructuralWrapperAxis) DescendantAxis(org.sirix.axis.DescendantAxis)

Aggregations

Visitor (org.sirix.api.visitor.Visitor)1 DescendantAxis (org.sirix.axis.DescendantAxis)1 NonStructuralWrapperAxis (org.sirix.axis.NonStructuralWrapperAxis)1