Package jmri.jmrix.internal.configurexml
Class InternalSensorManagerXml
- java.lang.Object
-
- jmri.configurexml.AbstractXmlAdapter
-
- jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
-
- jmri.managers.configurexml.AbstractSensorManagerConfigXML
-
- jmri.jmrix.internal.configurexml.InternalSensorManagerXml
-
- All Implemented Interfaces:
XmlAdapter
public class InternalSensorManagerXml extends AbstractSensorManagerConfigXML
Provides load and store functionality for configuring InternalSensorManagers.Uses the store method from the abstract base class, but provides a load method here.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends java.lang.Enum<T>>
-
-
Constructor Summary
Constructors Constructor Description InternalSensorManagerXml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
load(org.jdom2.Element sharedSensors, org.jdom2.Element perNodeSensors)
Create a SensorManager object of the correct class, then register and fill it.void
setStoreElementClass(org.jdom2.Element sensors)
Subclass provides implementation to create the correct top element, including the type information.org.jdom2.Element
store(java.lang.Object o)
Default implementation for storing the contents of a SensorManager.-
Methods inherited from class jmri.managers.configurexml.AbstractSensorManagerConfigXML
loadOrder, loadSensors, store
-
Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
checkedNamedBeanHandle, checkedNamedBeanName, checkedNamedBeanReference, getSystemName, getUserName, getUserName, loadCommon, storeCommon
-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, setExceptionHandler, store
-
-
-
-
Constructor Detail
-
InternalSensorManagerXml
public InternalSensorManagerXml()
-
-
Method Detail
-
setStoreElementClass
public void setStoreElementClass(org.jdom2.Element sensors)
Description copied from class:AbstractSensorManagerConfigXML
Subclass provides implementation to create the correct top element, including the type information. Default implementation is to use the local class here.- Specified by:
setStoreElementClass
in classAbstractSensorManagerConfigXML
- Parameters:
sensors
- The top-level element being created
-
store
public org.jdom2.Element store(java.lang.Object o)
Description copied from class:AbstractSensorManagerConfigXML
Default implementation for storing the contents of a SensorManager.- Specified by:
store
in interfaceXmlAdapter
- Overrides:
store
in classAbstractSensorManagerConfigXML
- Parameters:
o
- Object to store, of type SensorManager- Returns:
- Element containing the complete info
-
load
public boolean load(org.jdom2.Element sharedSensors, org.jdom2.Element perNodeSensors) throws JmriConfigureXmlException
Description copied from class:AbstractSensorManagerConfigXML
Create a SensorManager object of the correct class, then register and fill it.- Specified by:
load
in interfaceXmlAdapter
- Specified by:
load
in classAbstractSensorManagerConfigXML
- Parameters:
sharedSensors
- Shared top level Element to unpack.perNodeSensors
- Per-node top level Element to unpack.- Returns:
- true if successful
- Throws:
JmriConfigureXmlException
- if error during load
-
-