class SequenceDescriptorAttributesParser implements NodeParser<SequenceDescriptorAttributes> {

    @Override
    public SequenceDescriptorAttributes parseNode(final Node node, final Document document) {
        SequenceDescriptorAttributes result;
        Element sequenceElement = (Element) node;
        String groupName = document.getDocumentElement().getAttribute("groupname");
        String name = sequenceElement.getAttribute("name");
        String sequenceHandlerClassName = sequenceElement.getAttribute("class");
        long timeout = getTimeout(sequenceElement);
        ParameterList parameters = getParameters(sequenceElement);
        SequenceHandler sequenceHandler = sequenceHandlerInitializer.getExternalClassObject(sequenceHandlerClassName);
        result = new SequenceDescriptorAttributes.Builder().handler(sequenceHandler).name(name).groupname(groupName).defaultTimeout(timeout)
                .parameterList(parameters).build();
        return result;
    }

}