src/main/java/org/jamppa/component/utils/RSMUtils.java
public static void appendRSMElement(Element queryElement, RSM rsm) {
        Element setElement = queryElement.addElement("set", RSM.NAMESPACE);

        if (rsm.getFirst() != null) {
            Element firstElement = setElement.addElement("first");
            firstElement.addAttribute("index", rsm.getIndex().toString());
            firstElement.setText(rsm.getFirst());
        }

        if (rsm.getLast() != null) {
            Element lastElement = setElement.addElement("last");
            lastElement.setText(rsm.getLast());
        }

        setElement.addElement("count").setText(String.valueOf(rsm.getCount()));
    }
public static void appendRSMElement(Element queryElement, RSM rsm) {
        Element setElement = queryElement.addElement("set", RSM.NAMESPACE);

        if (rsm.getFirst() != null) {
            Element firstElement = setElement.addElement("first");
            firstElement.addAttribute("index", rsm.getIndex().toString());
            firstElement.setText(rsm.getFirst());
        }

        if (rsm.getLast() != null) {
            Element lastElement = setElement.addElement("last");
            lastElement.setText(rsm.getLast());
        }

        setElement.addElement("count").setText(String.valueOf(rsm.getCount()));
    }
Appends RSM info to query response.

@param queryElement
@param rsm