001package jmri.jmrix.pi.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 010 * configuring RaspberryPiSensorManagers. 011 * <p> 012 * Uses the store method from the abstract base class, but 013 * provides a load method here. 014 * 015 * @author Paul Bender Copyright (c) 2003 016 */ 017public class RaspberryPiSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML { 018 019 public RaspberryPiSensorManagerXml() { 020 super(); 021 } 022 023 @Override 024 public void setStoreElementClass(Element sensors) { 025 sensors.setAttribute("class", "jmri.jmrix.pi.configurexml.RaspberryPiSensorManagerXml"); 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 private final static Logger log = LoggerFactory.getLogger(RaspberryPiSensorManagerXml.class); 040 041}