001package jmri.jmrix.srcp.configurexml;
002
003import jmri.configurexml.JmriConfigureXmlException;
004import org.jdom2.Element;
005import org.slf4j.Logger;
006import org.slf4j.LoggerFactory;
007
008/**
009 * Provides load and store functionality for configuring SRCPSensorManagers.
010 * <p>
011 * Uses the store method from the abstract base class, but provides a load
012 * method here.
013 *
014 * @author Bob Jacobsen Copyright: Copyright (c) 2003, 2013
015 */
016public class SRCPSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML {
017
018    public SRCPSensorManagerXml() {
019        super();
020    }
021
022    @Override
023    public void setStoreElementClass(Element sensors) {
024        sensors.setAttribute("class", this.getClass().getName());
025    }
026
027    @Override
028    public void load(Element element, Object o) {
029        log.error("Invalid method called");
030    }
031
032    @Override
033    public boolean load(Element shared, Element perNode) throws JmriConfigureXmlException {
034        // load individual sensors
035        return loadSensors(shared);
036    }
037
038    private final static Logger log = LoggerFactory.getLogger(SRCPSensorManagerXml.class);
039}