Class ConnectionConfigXml
- java.lang.Object
-
- jmri.configurexml.AbstractXmlAdapter
-
- jmri.jmrix.configurexml.AbstractConnectionConfigXml
-
- jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
-
- jmri.jmrix.can.adapters.loopback.configurexml.ConnectionConfigXml
-
- All Implemented Interfaces:
XmlAdapter
public class ConnectionConfigXml extends AbstractSerialConnectionConfigXml
Handle XML persistance of layout connections by persistening the CAN simulator (and connections).This class is invoked from jmrix.JmrixConfigPaneXml on write, as that class is the one actually registered. Reads are brought here directly via the class attribute in the XML.
-
-
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>>
-
-
Field Summary
-
Fields inherited from class jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
adapter
-
Fields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES
-
-
Constructor Summary
Constructors Constructor Description ConnectionConfigXml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidextendElement(org.jdom2.Element e)Customizable method if you need to add anything more.protected voidgetInstance()protected voidgetInstance(java.lang.Object object)booleanload(org.jdom2.Element shared, org.jdom2.Element perNode)Create a set of configured objects from their XML description.protected voidloadOptions(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter)load optionsprotected voidregister()org.jdom2.Elementstore(java.lang.Object o)A simulated connection needs no extra information, so we reimplement the superclass method to just write the necessary parts.-
Methods inherited from class jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
dispose, load
-
Methods inherited from class jmri.jmrix.configurexml.AbstractConnectionConfigXml
findParmValue, loadCommon, register, saveOptions, setOutputInterval, store, storeCommon, unpackElement
-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler
-
-
-
-
Constructor Detail
-
ConnectionConfigXml
public ConnectionConfigXml()
-
-
Method Detail
-
store
public org.jdom2.Element store(java.lang.Object o)
A simulated connection needs no extra information, so we reimplement the superclass method to just write the necessary parts.- Specified by:
storein interfaceXmlAdapter- Overrides:
storein classAbstractSerialConnectionConfigXml- Parameters:
o- object to store- Returns:
- formatted element containing no attributes except the class name
-
load
public boolean load(org.jdom2.Element shared, org.jdom2.Element perNode)
Description copied from class:AbstractXmlAdapterCreate a set of configured objects from their XML description.- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractSerialConnectionConfigXml- 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
-
getInstance
protected void getInstance()
- Specified by:
getInstancein classAbstractConnectionConfigXml
-
getInstance
protected void getInstance(java.lang.Object object)
- Overrides:
getInstancein classAbstractSerialConnectionConfigXml
-
register
protected void register()
- Specified by:
registerin classAbstractConnectionConfigXml
-
loadOptions
protected void loadOptions(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter)
Description copied from class:AbstractConnectionConfigXmlload options- Overrides:
loadOptionsin classAbstractConnectionConfigXml- Parameters:
shared- the shared elementperNode- the per node elementadapter- the port adapter
-
extendElement
protected void extendElement(org.jdom2.Element e)
Description copied from class:AbstractSerialConnectionConfigXmlCustomizable method if you need to add anything more.- Overrides:
extendElementin classAbstractSerialConnectionConfigXml- Parameters:
e- Element being created, update as needed
-
-