001package jmri.jmrix.dccpp.configurexml;
002
003import org.jdom2.Element;
004import org.slf4j.Logger;
005import org.slf4j.LoggerFactory;
006
007/**
008 * Provides load and store functionality for configuring DCCppTurnoutManagers.
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 (c) 2002
014 * @author Mark Underwood Copyright (c) 2015
015 */
016public class DCCppTurnoutManagerXml extends jmri.managers.configurexml.AbstractTurnoutManagerConfigXML {
017
018    public DCCppTurnoutManagerXml() {
019        super();
020    }
021
022    @Override
023    public void setStoreElementClass(Element turnouts) {
024        turnouts.setAttribute("class", "jmri.jmrix.dccpp.configurexml.DCCppTurnoutManagerXml");
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 turnouts) {
034        // load individual turnouts
035        return loadTurnouts(turnouts, null);
036    }
037
038    private static final Logger log = LoggerFactory.getLogger(DCCppTurnoutManagerXml.class);
039
040    @Override
041    public boolean load(Element shared, Element perNode) {
042        return this.loadTurnouts(shared, perNode);
043    }
044
045}