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
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 Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>> -
Field Summary
Fields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanload(org.jdom2.Element sharedSensors, org.jdom2.Element perNodeSensors) Create a SensorManager object of the correct class, then register and fill it.voidsetStoreElementClass(org.jdom2.Element sensors) Subclass provides implementation to create the correct top element, including the type information.org.jdom2.ElementDefault implementation for storing the contents of a SensorManager.Methods inherited from class jmri.managers.configurexml.AbstractSensorManagerConfigXML
loadOrder, loadSensors, storeMethods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
checkedNamedBeanHandle, checkedNamedBeanName, checkedNamedBeanReference, getSystemName, getUserName, getUserName, loadCommon, storeCommonMethods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, setExceptionHandler, store
-
Constructor Details
-
InternalSensorManagerXml
public InternalSensorManagerXml()
-
-
Method Details
-
setStoreElementClass
Description copied from class:AbstractSensorManagerConfigXMLSubclass provides implementation to create the correct top element, including the type information. Default implementation is to use the local class here.- Specified by:
setStoreElementClassin classAbstractSensorManagerConfigXML- Parameters:
sensors- The top-level element being created
-
store
Description copied from class:AbstractSensorManagerConfigXMLDefault implementation for storing the contents of a SensorManager.- Specified by:
storein interfaceXmlAdapter- Overrides:
storein 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:AbstractSensorManagerConfigXMLCreate a SensorManager object of the correct class, then register and fill it.- Specified by:
loadin interfaceXmlAdapter- Specified by:
loadin 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
-