001package jmri.jmrix.acela.configurexml; 002 003import org.jdom2.Element; 004import org.slf4j.Logger; 005import org.slf4j.LoggerFactory; 006 007/** 008 * Provide load and store functionality for configuring AcelaLightManagers. 009 * <p> 010 * Uses the store method from the abstract base class, but provides a load 011 * method here. 012 * 013 * @author Dave Duchamp Copyright (c) 2006 014 * @author Bob Coleman, Copyright (c) 2007, 2008 Based on LocoNet example, 015 * modified to establish Acela support. 016 */ 017public class AcelaLightManagerXml extends jmri.managers.configurexml.AbstractLightManagerConfigXML { 018 019 public AcelaLightManagerXml() { 020 super(); 021 } 022 023 @Override 024 public void setStoreElementClass(Element lights) { 025 lights.setAttribute("class", "jmri.jmrix.acela.configurexml.AcelaLightManagerXml"); 026 } 027 028 @Override 029 public void load(Element element, Object o) { 030 log.error("Invalid method called"); 031 } 032 033 @Override 034 public boolean load(Element shared, Element perNode) { 035 // load individual lights 036 return loadLights(shared); 037 } 038 039 private final static Logger log = LoggerFactory.getLogger(AcelaLightManagerXml.class); 040 041}