Package jmri.jmrit.sample.configurexml
Class SampleFunctionalClassXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrit.sample.configurexml.SampleFunctionalClassXml
- All Implemented Interfaces:
XmlAdapter
Handle XML persistance of SampleFunctionalClass objects.
Note we have not (yet) updated xml/schema to provide an XML schema for this sample. Configure PanelPro to first run the jython/TurnOffXmlValidation.py script to disable verification when loading files written by this.
-
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
FieldsFields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUpdate static data from XML filebooleanload(org.jdom2.Element shared, org.jdom2.Element perNode) Create a set of configured objects from their XML description.intorg.jdom2.ElementDefault implementation for storing the contents of a SampleFunctionalClassXml.Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, setExceptionHandler, store
-
Field Details
-
format
-
-
Constructor Details
-
SampleFunctionalClassXml
public SampleFunctionalClassXml()
-
-
Method Details
-
store
Default implementation for storing the contents of a SampleFunctionalClassXml.- Parameters:
o- Object to store- Returns:
- Element containing the complete info
-
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
-
load
Update static data from XML file- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
element- Top level Element to unpack.o- ignored
-
loadOrder
Description copied from class:AbstractXmlAdapter- Specified by:
loadOrderin interfaceXmlAdapter- Overrides:
loadOrderin classAbstractXmlAdapter
-