Interface XmlAdapter

All Known Implementing Classes:
AbstractAudioManagerConfigXML, AbstractConnectionConfigXml, AbstractDCCppSerialConnectionConfigXml, AbstractLightManagerConfigXML, AbstractMemoryManagerConfigXML, AbstractMeterManagerXml, AbstractNamedBeanManagerConfigXML, AbstractNetworkConnectionConfigXml, AbstractReporterManagerConfigXML, AbstractSensorManagerConfigXML, AbstractSerialConnectionConfigXml, AbstractSignalHeadManagerXml, AbstractStreamConnectionConfigXml, AbstractTurnoutManagerConfigXML, AbstractUsbConnectionConfigXml, AbstractXmlAdapter, AbstractXNetSerialConnectionConfigXml, AcelaLightManagerXml, AcelaSensorManagerXml, AcelaSignalHeadXml, AcelaTurnoutManagerXml, AnalogClock2DisplayXml, AnymaDMX_ConnectionConfigXml, BeanSwitchXml, BlockBossLogicProviderXml, BlockBossLogicXml, BlockContentsIconXml, BlockContentsIconXml, BlockManagerXml, CanisbConnectionConfigXml, CanSprogConnectionConfigXml, CbusLightManagerXml, CbusReporterManagerXml, CbusSensorManagerXml, CbusTurnoutManagerXml, CommonTurnoutOperationXml, ConcentratorReporterManagerXml, ConcentratorSensorManagerXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ControlPanelEditorXml, CreateButtonModelXml, CtcManagerXml, Dcc4PcReporterManagerXml, Dcc4PcSensorManagerXml, DccLocoAddressXml, DCCppLightManagerXml, DCCppSensorManagerXml, DCCppStreamConnectionConfigXml, DCCppTurnoutManagerXml, DccSignalHeadXml, DccSignalMastXml, DefaultAudioManagerXml, DefaultConditionalManagerXml, DefaultJavaBeanConfigXML, DefaultLogixManagerXml, DefaultMemoryManagerXml, DefaultRouteManagerXml, DefaultSignalGroupManagerXml, DefaultSignalMastLogicManagerXml, DefaultSignalMastManagerXml, DefaultUserMessagePreferencesXml, DoubleTurnoutSignalHeadXml, EasyDccTurnoutManagerXml, EcosLocoAddressManagerXml, EcosPreferencesXml, EcosReporterManagerXml, EcosSensorManagerXml, EcosTurnoutManagerXml, EliteXNetTurnoutManagerXml, EntryExitPairsXml, FileHistoryXml, FileLocationPaneXml, GuiLafConfigPaneXml, IndicatorTrackIconXml, IndicatorTurnoutIconXml, InternalLightManagerXml, InternalMeterManagerXml, InternalReporterManagerXml, InternalSensorManagerXml, InternalTurnoutManagerXml, IpocsConnectionConfigXml, IpocsLightManagerXml, IpocsSensorManagerXml, IpocsTurnoutManagerXml, JMRIClientLightManagerXml, JMRIClientReporterManagerXml, JMRIClientSensorManagerXml, JMRIClientTurnoutManagerXml, JmrixConfigPaneXml, LayoutBlockManagerXml, LayoutDoubleSlipXml, LayoutDoubleXOverXml, LayoutEditorXml, LayoutLHTurnoutXml, LayoutLHXOverXml, LayoutRHTurnoutXml, LayoutRHXOverXml, LayoutShapeXml, LayoutSingleSlipXml, LayoutSlipXml, LayoutTrackDrawingOptionsXml, LayoutTurnoutXml, LayoutTurntableXml, LayoutWyeXml, LayoutXOverXml, LevelXingXml, LightIconXml, LinkingLabelXml, LNCPSignalMastXml, LnLightManagerXml, LnReporterManagerXml, LnSensorManagerXml, LnSensorManagerXml, LnStreamConnectionConfigXml, LnTurnoutManagerXml, LocoAddressXml, LocoIconXml, LocoLabelXml, LsDecSignalHeadXml, ManagerDefaultsConfigPaneXml, ManagerDefaultSelectorXml, MarklinSensorManagerXml, MarklinTurnoutManagerXml, MatrixSignalMastXml, MemoryComboIconXml, MemoryIconXml, MemoryIconXml, MemoryInputIconXml, MemorySpinnerIconXml, MergConnectionConfigXml, MergSD2SignalHeadXml, MeterFrameManagerXml, MqttConnectionConfigXml, MqttLightManagerXml, MqttSensorManagerXml, MqttTurnoutManagerXml, MrcTurnoutManagerXml, MultiSensorIconXml, NceLightManagerXml, NceSensorManagerXml, NceTurnoutManagerXml, NoFeedbackTurnoutOperationXml, OBlockManagerXml, OlcbLightManagerXml, OlcbSensorManagerXml, OlcbSignalMastXml, OlcbTurnoutManagerXml, PanelEditorXml, PerformActionModelXml, PerformActionModelXml, PerformFileModelXml, PerformFileModelXml, PerformScriptModelXml, PerformScriptModelXml, PiSprog3ConnectionConfigXml, PortalIconXml, PositionableCircleXml, PositionableEllipseXml, PositionableLabelXml, PositionablePointXml, PositionablePolygonXml, PositionableRectangleXml, PositionableRoundRectXml, PositionableShapeXml, ProgrammerConfigPaneXml, ProxyTurnoutManagerXml, QuadOutputSignalHeadXml, RaspberryPiConnectionConfigXml, RaspberryPiSensorManagerXml, RaspberryPiTurnoutManagerXml, RawTurnoutOperationXml, ReporterIconXml, RevHistoryXml, RfidReporterManagerXml, RfidSensorManagerXml, RfidStreamConnectionConfigXml, RosterConfigPaneXml, RpsPositionIconXml, RpsReporterManagerXml, RpsSensorManagerXml, SampleFunctionalClassXml, ScriptButtonModelXml, SE8cSignalHeadXml, SE8cSignalHeadXml, SectionManagerXml, SensorIconXml, SensorTurnoutOperationXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSignalHeadXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SignalHeadIconXml, SignalHeadSignalMastXml, SignalMastIconXml, SimpleTimebaseXml, SingleTurnoutSignalHeadXml, SlipTurnoutIconXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, Sprog3PlusConnectionConfigXml, SprogCSStreamConnectionConfigXml, SprogTurnoutManagerXml, SRCPSensorManagerXml, SRCPTurnoutManagerXml, StandaloneReporterManagerXml, StandaloneSensorManagerXml, StartupActionsPreferencesPanelXml, StartupPauseModelXml, SwitchboardEditorXml, SystemConsoleConfigPanelXml, TamsSensorManagerXml, TamsTurnoutManagerXml, TrackSegmentXml, TrainIconXml, TransitManagerXml, TriggerRouteModelXml, TripleOutputSignalHeadXml, TripleTurnoutSignalHeadXml, TurnoutIconXml, TurnoutOperationManagerXml, TurnoutOperationXml, TurnoutSignalMastXml, UsbLightManagerXml, VirtualSignalHeadXml, VirtualSignalMastXml, WarrantManagerXml, XBeeLightManagerXml, XBeeSensorManagerXml, XBeeTurnoutManagerXml, XNetLightManagerXml, XNetSensorManagerXml, XNetStreamConnectionConfigXml, XNetTurnoutManagerXml, XpaTurnoutManagerXml, Z21ReporterManagerXml, Z21SensorManagerXml, Z21SimulatorConnectionConfigXml, Z21XNetTurnoutManagerXml, ZTC611XNetTurnoutManagerXml

public interface XmlAdapter
Interface assumed during configuration operations.
See Also:
ConfigXmlManager
  • Method Details

    • load

      boolean load​(Element e) throws JmriConfigureXmlException
      Create a set of configured objects from their XML description
      Parameters:
      e - Top-level XML element containing the description
      Returns:
      true if successful
      Throws:
      JmriConfigureXmlException - when a error prevents creating the objects as as required by the input XML.
    • load

      boolean load​(Element shared, Element perNode) throws JmriConfigureXmlException
      Create a set of configured objects from their XML description.
      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
      Throws:
      JmriConfigureXmlException - when a error prevents creating the objects as as required by the input XML
    • loadDeferred

      boolean loadDeferred()
      Determine if this set of configured objects should be loaded after basic GUI construction is completed
      Returns:
      true to defer loading
      Since:
      2.11.2
    • load

      Create a set of configured objects from their XML description, using an auxiliary object.

      For example, the auxilary object o might be a manager or GUI of some type that needs to be informed as each object is created.

      Parameters:
      e - Top-level XML element containing the description
      o - Implementation-specific Object needed for the conversion
      Throws:
      JmriConfigureXmlException - when a error prevents creating the objects as as required by the input XML
    • load

      void load​(Element shared, Element perNode, Object o) throws JmriConfigureXmlException
      Create a set of configured objects from their XML description, using an auxiliary object.

      For example, the auxilary object o might be a manager or GUI of some type that needs to be informed as each object is created.

      Parameters:
      shared - Top-level XML element containing the common description
      perNode - Top-level XML element containing the per-node description
      o - Implementation-specific Object needed for the conversion
      Throws:
      JmriConfigureXmlException - when a error prevents creating the objects as as required by the input XML
    • store

      Store the object in XML
      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:
      The XML representation Element
    • store

      Element store​(Object o, boolean shared)
      Store the object in XML
      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.
      shared - true if the returned element should be the common XML and false if the returned element should be per-node.
      Returns:
      The XML representation Element
    • loadOrder

      int loadOrder()
    • handleException

      void handleException​(@Nonnull String description, @CheckForNull String operation, @CheckForNull String systemName, @CheckForNull String userName, @CheckForNull Exception exception) throws JmriConfigureXmlException
      Provide a simple handler for errors. Calls the configured ErrorHandler with an ErrorMemo created using the provided parameters.
      Parameters:
      description - description of error encountered
      operation - the operation being performed, may be null
      systemName - system name of bean being handled, may be null
      userName - user name of the bean being handled, may be null
      exception - Any exception being handled in the processing, may be null
      Throws:
      JmriConfigureXmlException - in place for later expansion; should be propagated upward to higher-level error handling
    • setExceptionHandler

      void setExceptionHandler​(ErrorHandler errorHandler)
      Set the error handler that will handle any errors encountered while parsing the XML. If not specified, the default error handler will be used.
      Parameters:
      errorHandler - the error handler or null to ignore parser errors
    • getExceptionHandler

      Get the current error handler.
      Returns:
      the error handler or null if no error handler is assigned
    • getDefaultExceptionHandler

      Get the default error handler.
      Returns:
      the default error handler