001package jmri.jmrix.jmriclient.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 010 * JMRIClientSensorManagers. 011 * <p> 012 * Uses the store method from the abstract base class, but provides a load 013 * method here. 014 * 015 * @author Bob Jacobsen Copyright: Copyright (c) 2008 016 */ 017public class JMRIClientSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML { 018 019 public JMRIClientSensorManagerXml() { 020 super(); 021 } 022 023 @Override 024 public void setStoreElementClass(Element sensors) { 025 sensors.setAttribute("class", "jmri.jmrix.jmriclient.configurexml.JMRIClientSensorManagerXml"); 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) throws JmriConfigureXmlException { 035 // load individual sensors 036 return loadSensors(shared); 037 } 038 039 // initialize logging 040 private final static Logger log = LoggerFactory.getLogger(JMRIClientSensorManagerXml.class); 041}