+ //
+ // STATIC METHODS
+ //
+
+ /**
+ * Parses the given XML file into a {@link Chain}.
+ *
+ * @param xmlFile
+ * The XML file to parse
+ * @return The parsed chain
+ */
+ private static Chain parseXmlFile(File xmlFile) {
+ try {
+ JAXBContext context = JAXBContext.newInstance(Chain.class);
+ Unmarshaller unmarshaller = context.createUnmarshaller();
+ logger.debug(String.format("Reading %s...", xmlFile.getPath()));
+ return (Chain) unmarshaller.unmarshal(xmlFile);
+ } catch (JAXBException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+