src/main/java/org/jamppa/component/utils/RSMUtils.java
public static RSM parseRSM(Element queryElement) {
        RSM rsm = new RSM();

        Element setElement = queryElement.element("set");
        if (setElement == null) {
            return rsm;
        }

        Element after = setElement.element("after");
        if (after != null) {
            rsm.setAfter(after.getText());
        }

        Element before = setElement.element("before");
        if (before != null) {
            String beforeText = before.getText();
            rsm.setBefore(beforeText == null ? "" : beforeText);
        }

        Element index = setElement.element("index");
        if (index != null) {
            rsm.setIndex(Integer.parseInt(index.getText()));
        }

        Element max = setElement.element("max");
        if (max != null) {
            rsm.setMax(Integer.parseInt(max.getText()));
        }

        return rsm;
    }
public static RSM parseRSM(Element queryElement) {
        RSM rsm = new RSM();

        Element setElement = queryElement.element("set");
        if (setElement == null) {
            return rsm;
        }

        Element after = setElement.element("after");
        if (after != null) {
            rsm.setAfter(after.getText());
        }

        Element before = setElement.element("before");
        if (before != null) {
            String beforeText = before.getText();
            rsm.setBefore(beforeText == null ? "" : beforeText);
        }

        Element index = setElement.element("index");
        if (index != null) {
            rsm.setIndex(Integer.parseInt(index.getText()));
        }

        Element max = setElement.element("max");
        if (max != null) {
            rsm.setMax(Integer.parseInt(max.getText()));
        }

        return rsm;
    }
public static RSM parseRSM ( Element queryElement ) { RSM rsm = new RSM ( ) ; Element setElement = queryElement . element ( "set" ) ; if ( setElement == null ) { return rsm ; } Element after = setElement . element ( "after" ) ; if ( after != null ) { rsm . setAfter ( after . getText ( ) ) ; } Element before = setElement . element ( "before" ) ; if ( before != null ) { String beforeText = before . getText ( ) ; rsm . setBefore ( beforeText == null ? "" : beforeText ) ; } Element index = setElement . element ( "index" ) ; if ( index != null ) { rsm . setIndex ( Integer . parseInt ( index . getText ( ) ) ) ; } Element max = setElement . element ( "max" ) ; if ( max != null ) { rsm . setMax ( Integer . parseInt ( max . getText ( ) ) ) ; } return rsm ; }
Parses an RSM from a query XML element

@param queryElement
@return The parsed RSM object
Parses an RSM from a query XML element