Class TurnoutOperationXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.configurexml.turnoutoperations.TurnoutOperationXml
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
CommonTurnoutOperationXml
Superclass for save/restore of TurnoutOperation subclasses in XML.
-
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 TypeMethodDescriptionstatic TurnoutOperationXmlGiven an instance of a concrete subclass of the TurnoutOperation class, looks for a corresponding ...Xml class and creates an instance of it.booleanload(org.jdom2.Element shared, org.jdom2.Element perNode) Create a set of configured objects from their XML description.abstract TurnoutOperationloadOne(org.jdom2.Element e) static TurnoutOperationloadOperation(org.jdom2.Element e) Load one operation, using the appropriate adapterorg.jdom2.Elementcommon part of store - create the element and store the name and the classMethods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, loadOrder, setExceptionHandler, store
-
Constructor Details
-
TurnoutOperationXml
public TurnoutOperationXml()
-
-
Method Details
-
load
Description copied from class:AbstractXmlAdapterCreate a set of configured objects from their XML description.- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
shared- Top-level XML element containing the common, multi-node elements of the descriptionperNode- Top-level XML element containing the private, single-node elements of the description- Returns:
- true if successful
-
loadOne
-
loadOperation
Load one operation, using the appropriate adapter- Parameters:
e- element for operation- Returns:
- the loaded TurnoutOperation or null if unable to load from e
-
store
common part of store - create the element and store the name and the class- Parameters:
o- TurnoutOperation object- Returns:
- partially filled element
-
getAdapter
Given an instance of a concrete subclass of the TurnoutOperation class, looks for a corresponding ...Xml class and creates an instance of it. If anything goes wrong (no such class, wrong constructors, instantiation error, ....) just return null- Parameters:
op- operation for which configurator is required- Returns:
- the configurator
-