Class TurnoutOperationXml

java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.configurexml.turnoutoperations.TurnoutOperationXml
All Implemented Interfaces:
XmlAdapter
Direct Known Subclasses:
CommonTurnoutOperationXml

public abstract class TurnoutOperationXml extends AbstractXmlAdapter
Superclass for save/restore of TurnoutOperation subclasses in XML.
  • Constructor Details

  • Method Details

    • 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
    • loadOne

      public abstract TurnoutOperation loadOne(org.jdom2.Element e)
    • loadOperation

      public static TurnoutOperation loadOperation(org.jdom2.Element e)
      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

      public org.jdom2.Element store(Object o)
      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