001package jmri.jmrix.tams.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 TamsSensorManagers. 010 * <p> 011 * Uses the store method from the abstract base class, but provides a load 012 * method here. 013 * 014 * Based on work by Bob Jacobsen 015 * 016 * @author Kevin Dickerson Copyright (C) 2012 017 */ 018public class TamsSensorManagerXml extends jmri.managers.configurexml.AbstractSensorManagerConfigXML { 019 020 public TamsSensorManagerXml() { 021 super(); 022 } 023 024 @Override 025 public void setStoreElementClass(Element sensors) { 026 sensors.setAttribute("class", "jmri.jmrix.tams.configurexml.TamsSensorManagerXml"); 027 } 028 029 @Override 030 public void load(Element element, Object o) { 031 log.error("Invalid method called"); 032 } 033 034 @Override 035 public boolean load(Element shared, Element perNode) throws JmriConfigureXmlException { 036 // create the master object 037 //TamsSensorManager.instance(); 038 // load individual sensors 039 return loadSensors(shared); 040 } 041 042 private final static Logger log = LoggerFactory.getLogger(TamsSensorManagerXml.class); 043}