Class ConnectionConfigXml

  • All Implemented Interfaces:
    XmlAdapter

    public class ConnectionConfigXml
    extends AbstractConnectionConfigXml
    Handle XML persistance of layout connections by persistening the XNetSimulatorAdapter (and connections). Note this is named as the XML version of a ConnectionConfig object, but it's actually persisting the XNetSimulatorAdapter.

    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.

    • Method Detail

      • store

        public org.jdom2.Element store​(java.lang.Object o)
        A Simulator connection needs no extra information, so we reimplement the superclass method to just write the necessary parts.
        Parameters:
        o - The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.
        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: AbstractXmlAdapter
        Create a set of configured objects from their XML description.
        Specified by:
        load in interface XmlAdapter
        Overrides:
        load in class AbstractXmlAdapter
        Parameters:
        shared - Top-level XML element containing the common, multi-node elements of the description
        perNode - Top-level XML element containing the private, single-node elements of the description
        Returns:
        true if successful
      • getInstance

        protected void getInstance​(java.lang.Object object)