jmri.jmrix.maple.serialdriver.configurexml
Class ConnectionConfigXml

java.lang.Object
  extended by jmri.configurexml.AbstractXmlAdapter
      extended by jmri.jmrix.configurexml.AbstractConnectionConfigXml
          extended by jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
              extended by jmri.jmrix.maple.serialdriver.configurexml.ConnectionConfigXml
All Implemented Interfaces:
XmlAdapter

public class ConnectionConfigXml
extends AbstractSerialConnectionConfigXml

Handle XML persistance of layout connections by persisting the SerialDriverAdapter (and connections). Note this is named as the XML version of a ConnectionConfig object, but it's actually persisting the SerialDriverAdapter.

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. NOTE: Code related to pulsed turnout control has been commented out.


Field Summary
(package private) static org.slf4j.Logger log
           
 
Fields inherited from class jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
adapter, rb
 
Constructor Summary
ConnectionConfigXml()
           
 
Method Summary
protected  void extendElement(org.jdom.Element e)
          Write out the SerialNode objects too
(package private)  String findParmValue(org.jdom.Element e, String name)
          Service routine to look through "parameter" child elements to find a particular parameter value
protected  void getInstance()
           
protected  org.jdom.Element makeParameter(String name, String value)
           
protected  void register()
           
protected  void unpackElement(org.jdom.Element e)
          Unpack the node information when reading the "connection" element
 
Methods inherited from class jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml
getInstance, load, load, store
 
Methods inherited from class jmri.jmrix.configurexml.AbstractConnectionConfigXml
loadCommon, loadOptions, saveOptions, storeCommon
 
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
creationErrorEncountered, getConfigXmlManager, loadDeferred, loadOrder, setConfigXmlManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static org.slf4j.Logger log
Constructor Detail

ConnectionConfigXml

public ConnectionConfigXml()
Method Detail

extendElement

protected void extendElement(org.jdom.Element e)
Write out the SerialNode objects too

Overrides:
extendElement in class AbstractSerialConnectionConfigXml
Parameters:
e - Element being extended

makeParameter

protected org.jdom.Element makeParameter(String name,
                                         String value)

getInstance

protected void getInstance()
Specified by:
getInstance in class AbstractSerialConnectionConfigXml

unpackElement

protected void unpackElement(org.jdom.Element e)
Unpack the node information when reading the "connection" element

Overrides:
unpackElement in class AbstractSerialConnectionConfigXml
Parameters:
e - Element containing the connection info

findParmValue

String findParmValue(org.jdom.Element e,
                     String name)
Service routine to look through "parameter" child elements to find a particular parameter value

Parameters:
e - Element containing parameters
name - name of desired parameter
Returns:
String value

register

protected void register()
Specified by:
register in class AbstractSerialConnectionConfigXml


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads