Transitions retVal = transitions;
if(inputFile!=null){
try{
LOG.debug("Parsing xml transitions file "+inputFile.getAbsolutePath());
SAXReader reader = new SAXReader();
Document document = reader.read(inputFile);
Node rootNode = document.selectSingleNode("/transitions");
if(rootNode != null){
Node defType = rootNode.selectSingleNode("@defaulttype");
Node defTransDur = rootNode.selectSingleNode("@defaulttduration");
Node defDur = rootNode.selectSingleNode("@defaultduration");
if(defType != null && defTransDur != null && defDur != null){
if(transitions.getDefaultTransition() != null){
throw new SlideShowException(SlideShowException.ERR_DEFAULT_TRANSITION_ALREADY_SET);
}else{
transitions.setDefaultTransition(new Transition(Transition.EVERY_PAGE, new Integer(defTransDur.getText().trim()).intValue(), defType.getText().trim(), new Integer(defDur.getText().trim()).intValue()));
}
}
List transitionsList = document.selectNodes("/transitions/transition");
for (int i = 0; transitionsList != null && i < transitionsList.size(); i++) {
Node transitionNode = (Node) transitionsList.get(i);
Node type = transitionNode.selectSingleNode("@type");
Node transDuration = transitionNode.selectSingleNode("@tduration");
Node duration = transitionNode.selectSingleNode("@duration");