001package jmri.jmrix.ecos.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 EcosSensorManagers. 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) 2002, 2008 015 */ 016public class EcosSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML { 017 018 public EcosSensorManagerXml() { 019 super(); 020 } 021 022 @Override 023 public void setStoreElementClass(Element sensors) { 024 sensors.setAttribute("class", "jmri.jmrix.ecos.configurexml.EcosSensorManagerXml"); 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 // create the master object 035 //EcosSensorManager.instance(); 036 // load individual sensors 037 return loadSensors(shared); 038 } 039 040 private final static Logger log = LoggerFactory.getLogger(EcosSensorManagerXml.class); 041}