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 SerialSensorManagers.
009 * <p>
010 * Uses the store method from the abstract base class, but provides a load
011 * method here.
012 *
013 * @author Bob Jacobsen Copyright: Copyright (c) 2003
014 *
015 * @author Bob Coleman, Copyright (c) 2007, 2008 Based on CMRI serial example,
016 * modified to establish Acela support.
017 */
018public class AcelaSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML {
019
020    public AcelaSensorManagerXml() {
021        super();
022    }
023
024    @Override
025    public void setStoreElementClass(Element sensors) {
026        sensors.setAttribute("class", "jmri.jmrix.acela.configurexml.AcelaSensorManagerXml");
027    }
028
029    @Override
030    public void load(Element element, Object o) {
031        log.error("Invalid method called");
032    }
033
034    @Override
035    public boolean load(Element shared, Element perNode) throws jmri.configurexml.JmriConfigureXmlException {
036        // load individual sensors
037        return loadSensors(shared);
038    }
039
040    private final static Logger log = LoggerFactory.getLogger(AcelaSensorManagerXml.class);
041
042}