Interface XmlAdapter

All Known Implementing Classes:
AbstractAudioManagerConfigXML, AbstractConnectionConfigXml, AbstractDCCppSerialConnectionConfigXml, AbstractDebuggerMaleSocketXml, AbstractLightManagerConfigXML, AbstractMaleSocketXml, AbstractManagerXml, AbstractMemoryManagerConfigXML, AbstractMeterManagerXml, AbstractNamedBeanManagerConfigXML, AbstractNetworkConnectionConfigXml, AbstractReporterManagerConfigXML, AbstractSensorManagerConfigXML, AbstractSerialConnectionConfigXml, AbstractSignalHeadManagerXml, AbstractStreamConnectionConfigXml, AbstractStringIOManagerConfigXML, AbstractTurnoutManagerConfigXML, AbstractUsbConnectionConfigXml, AbstractXmlAdapter, AbstractXNetSerialConnectionConfigXml, AcelaLightManagerXml, AcelaSensorManagerXml, AcelaSignalHeadXml, AcelaTurnoutManagerXml, ActionAudioIconXml, ActionAudioXml, ActionBlockXml, ActionClearSlotsXml, ActionClockRateXml, ActionClockXml, ActionCreateBeansFromTableXml, ActionDispatcherXml, ActionEntryExitXml, ActionFindTableRowOrColumnXml, ActionLayoutTurnoutXml, ActionLightIntensityXml, ActionLightXml, ActionListenOnBeansLocalVariableXml, ActionListenOnBeansTableXml, ActionListenOnBeansXml, ActionLocalVariableXml, ActionMemoryXml, ActionOBlockXml, ActionPositionableByClassXml, ActionPositionableXml, ActionPowerXml, ActionReporterXml, ActionRequestUpdateAllSensorsXml, ActionRequestUpdateOfSensorXml, ActionRequestUpdateOfTurnoutXml, ActionScriptXml, ActionSensorXml, ActionSetReporterXml, ActionShutDownTaskXml, ActionSignalHeadXml, ActionSignalMastXml, ActionSimpleScriptXml, ActionSoundXml, ActionTableXml, ActionThrottleFunctionXml, ActionThrottleXml, ActionTimerXml, ActionTurnoutLockXml, ActionTurnoutXml, ActionUpdateSlotsXml, ActionWarrantXml, AnalogActionLightIntensityXml, AnalogActionMemoryXml, AnalogClock2DisplayXml, AnalogExpressionAnalogIOXml, AnalogExpressionConstantXml, AnalogExpressionLocalVariableXml, AnalogExpressionMemoryXml, AnalogFormulaXml, AnalogManyXml, AndXml, AntecedentXml, AnymaDMX_ConnectionConfigXml, AudioIconXml, BeanSwitchXml, BiDiBLightManagerXml, BiDiBReporterManagerXml, BiDiBSensorManagerXml, BiDiBSignalMastXml, BiDiBTurnoutManagerXml, BlockBossLogicProviderXml, BlockBossLogicXml, BlockContentsIconXml, BlockContentsIconXml, BlockManagerXml, BreakXml, CanisbConnectionConfigXml, CbusLightManagerXml, CbusReporterManagerXml, CbusSensorManagerXml, CbusTurnoutManagerXml, ClipboardManyXml, 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, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionConfigXml, ConnectionNameXml, ContinueXml, ControlPanelEditorXml, CreateButtonModelXml, CtcManagerXml, Dcc4PcReporterManagerXml, Dcc4PcSensorManagerXml, DccLocoAddressXml, DCCppLightManagerXml, DCCppSensorManagerXml, DCCppStreamConnectionConfigXml, DCCppTurnoutManagerXml, DccSignalHeadXml, DccSignalMastXml, DebuggerMaleAnalogActionSocketXml, DebuggerMaleAnalogExpressionSocketXml, DebuggerMaleDigitalActionSocketXml, DebuggerMaleDigitalBooleanActionSocketXml, DebuggerMaleDigitalExpressionSocketXml, DebuggerMaleStringActionSocketXml, DebuggerMaleStringExpressionSocketXml, DefaultAnalogActionManagerXml, DefaultAnalogExpressionManagerXml, DefaultAudioManagerXml, DefaultConditionalManagerXml, DefaultConditionalNGManagerXml, DefaultCsvNamedTableXml, DefaultDigitalActionManagerXml, DefaultDigitalBooleanActionManagerXml, DefaultDigitalExpressionManagerXml, DefaultGlobalVariableManagerXml, DefaultGlobalVariableXml, DefaultJavaBeanConfigXML, DefaultLogixManagerXml, DefaultLogixNGManagerXml, DefaultMaleAnalogActionSocketXml, DefaultMaleAnalogExpressionSocketXml, DefaultMaleDigitalActionSocketXml, DefaultMaleDigitalBooleanActionSocketXml, DefaultMaleDigitalExpressionSocketXml, DefaultMaleStringActionSocketXml, DefaultMaleStringExpressionSocketXml, DefaultMemoryManagerXml, DefaultModuleManagerXml, DefaultModuleXml, DefaultNamedTableManagerXml, DefaultRouteManagerXml, DefaultSectionManagerXml, DefaultSignalGroupManagerXml, DefaultSignalMastLogicManagerXml, DefaultSignalMastManagerXml, DefaultStringActionManagerXml, DefaultStringExpressionManagerXml, DefaultTransitManagerXml, DefaultUserMessagePreferencesXml, DefaultVariableLightManagerXml, DigitalBooleanLogixActionXml, DigitalBooleanManyXml, DigitalCallModuleXml, DigitalCallModuleXml, DigitalFormulaXml, DigitalFormulaXml, DigitalManyXml, DoAnalogActionXml, DoStringActionXml, DoubleTurnoutSignalHeadXml, EasyDccTurnoutManagerXml, EcosLocoAddressManagerXml, EcosPreferencesXml, EcosReporterManagerXml, EcosSensorManagerXml, EcosTurnoutManagerXml, EliteXNetTurnoutManagerXml, EnableLogixNGXml, EnableLogixXml, EntryExitPairsXml, ErrorXml, ExecuteActionXml, ExecuteDelayedXml, ExecuteProgramXml, ExitXml, ExpressionAudioXml, ExpressionBlockXml, ExpressionClockXml, ExpressionConditionalXml, ExpressionDispatcherXml, ExpressionEntryExitXml, ExpressionLightXml, ExpressionLinuxLinePowerXml, ExpressionLocalVariableXml, ExpressionMemoryXml, ExpressionOBlockXml, ExpressionPowerXml, ExpressionReferenceXml, ExpressionReporterXml, ExpressionScriptXml, ExpressionSectionXml, ExpressionSensorEdgeXml, ExpressionSensorXml, ExpressionSignalHeadXml, ExpressionSignalMastXml, ExpressionSlotUsageXml, ExpressionTransitXml, ExpressionTurnoutXml, ExpressionWarrantXml, FalseXml, FileAsFlagXml, FileHistoryXml, FileLocationPaneXml, ForEachWithDelayXml, ForEachXml, ForXml, GlobalVariableComboIconXml, GlobalVariableIconXml, GlobalVariableIconXml, GlobalVariableInputIconXml, GlobalVariableSpinnerIconXml, HoldXml, IfThenElseXml, IndicatorTrackIconXml, IndicatorTurnoutIconXml, InternalAnalogIOManagerXml, InternalLightManagerXml, InternalMeterManagerXml, InternalReporterManagerXml, InternalSensorManagerXml, InternalStringIOManagerXml, InternalTurnoutManagerXml, IpocsConnectionConfigXml, IpocsLightManagerXml, IpocsSensorManagerXml, IpocsTurnoutManagerXml, JMRIClientLightManagerXml, JMRIClientReporterManagerXml, JMRIClientSensorManagerXml, JMRIClientTurnoutManagerXml, JmrixConfigPaneXml, JsonDecodeXml, LastResultOfDigitalExpressionXml, LayoutBlockManagerXml, LayoutDoubleSlipViewXml, LayoutDoubleXOverViewXml, LayoutEditorXml, LayoutLHTurnoutViewXml, LayoutLHXOverViewXml, LayoutRHTurnoutViewXml, LayoutRHXOverViewXml, LayoutShapeXml, LayoutSingleSlipViewXml, LayoutSlipViewXml, LayoutTrackDrawingOptionsXml, LayoutTrackViewXml, LayoutTurnoutViewXml, LayoutTurntableViewXml, LayoutWyeViewXml, LayoutXOverViewXml, LevelXingViewXml, LightIconXml, LinkingLabelXml, LNCPSignalMastXml, LnLightManagerXml, LnReporterManagerXml, LnSensorManagerXml, LnSensorManagerXml, LnStreamConnectionConfigXml, LnStringIOManagerXml, LnTurnoutManagerXml, LocoAddressXml, LocoIconXml, LogDataXml, LogDataXml, LogixNGIconXml, LogixXml, LogLocalVariablesXml, LsDecSignalHeadXml, ManagerDefaultsConfigPaneXml, ManagerDefaultSelectorXml, MarklinSensorManagerXml, MarklinSimConnectionConfigXml, MarklinTurnoutManagerXml, MatrixSignalMastXml, MemoryComboIconXml, MemoryIconXml, MemoryIconXml, MemoryInputIconXml, MemorySpinnerIconXml, MergConnectionConfigXml, MergSD2SignalHeadXml, MeterFrameManagerXml, MqttConnectionConfigXml, MqttLightManagerXml, MqttReporterManagerXml, MqttSensorManagerXml, MqttSignalMastXml, MqttTurnoutManagerXml, MrcTurnoutManagerXml, MultiSensorIconXml, NceLightManagerXml, NceSensorManagerXml, NceTurnoutManagerXml, NoFeedbackTurnoutOperationXml, NotXml, OBlockManagerXml, OlcbLightManagerXml, OlcbMeterManagerXml, OlcbReporterManagerXml, OlcbSensorManagerXml, OlcbSignalMastXml, OlcbStringIOManagerXml, OlcbTurnoutManagerXml, OperationsProStartAutomationXml, OrXml, PanelEditorXml, PerformActionModelXml, PerformFileModelXml, PerformScriptModelXml, PiSprog3ConnectionConfigXml, PiSprog3PlusConnectionConfigXml, PiSprog3v2ConnectionConfigXml, PortalIconXml, PositionableCircleXml, PositionableEllipseXml, PositionableLabelXml, PositionablePointViewXml, PositionablePolygonXml, PositionableRectangleXml, PositionableRoundRectXml, PositionableShapeXml, ProgrammerConfigPaneXml, ProgramOnMainXml, ProxyTurnoutManagerXml, PublishXml, QuadOutputSignalHeadXml, RaspberryPiConnectionConfigXml, RaspberryPiSensorManagerXml, RaspberryPiSimulatorConnectionConfigXml, RaspberryPiTurnoutManagerXml, RawTurnoutOperationXml, ReporterIconXml, ReturnXml, RevHistoryXml, RfidReporterManagerXml, RfidSensorManagerXml, RfidStreamConnectionConfigXml, RosterConfigPaneXml, RpsPositionIconXml, RpsReporterManagerXml, RpsSensorManagerXml, RunOnceXml, SampleFunctionalClassXml, ScriptButtonModelXml, SE8cSignalHeadXml, SE8cSignalHeadXml, SendMergCbusEventXml, SensorIconXml, SensorTurnoutOperationXml, SequenceXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialLightManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSensorManagerXml, SerialSignalHeadXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SetSpeedZeroXml, ShowDialogXml, ShutdownComputerXml, SignalHeadIconXml, SignalHeadSignalMastXml, SignalMastIconXml, SimpleTimebaseXml, SimulateTurnoutFeedbackXml, SingleTurnoutSignalHeadXml, SlipTurnoutIconXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificLightManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, SpecificSensorManagerXml, Sprog3PlusConnectionConfigXml, SprogCSStreamConnectionConfigXml, SprogTurnoutManagerXml, SRCPSensorManagerXml, SRCPTurnoutManagerXml, StandaloneReporterManagerXml, StandaloneSensorManagerXml, StartupActionsPreferencesPanelXml, StartupPauseModelXml, StringActionMemoryXml, StringActionStringIOXml, StringExpressionConstantXml, StringExpressionMemoryXml, StringExpressionStringIOXml, StringFormulaXml, StringManyXml, SubscribeXml, SwitchboardEditorXml, SystemConsoleConfigPanelXml, TableForEachXml, TamsSensorManagerXml, TamsTurnoutManagerXml, TimeoutXml, TimerXml, TimeSinceMidnightXml, TrackSegmentViewXml, TrainIconXml, TriggerOnceXml, TriggerRouteModelXml, TriggerRouteXml, TripleOutputSignalHeadXml, TripleTurnoutSignalHeadXml, TrueXml, TurnoutIconXml, TurnoutOperationManagerXml, TurnoutOperationXml, TurnoutSignalMastXml, UsbLightManagerXml, VirtualSignalHeadXml, VirtualSignalMastXml, WarrantManagerXml, WebBrowserXml, WebRequestXml, WindowManagementXml, XBeeLightManagerXml, XBeeSensorManagerXml, XBeeTurnoutManagerXml, XNetLightManagerXml, XNetSensorManagerXml, XNetStreamConnectionConfigXml, XNetTurnoutManagerXml, XpaTurnoutManagerXml, Z21ReporterManagerXml, Z21SensorManagerXml, Z21SimulatorConnectionConfigXml, Z21XNetTurnoutManagerXml, ZTC611XNetTurnoutManagerXml

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

    Modifier and Type
    Method
    Description
    Get the default error handler.
    Get the current error handler.
    void
    handleException(String description, String operation, String systemName, String userName, Exception exception)
    Provide a simple handler for errors.
    boolean
    load(org.jdom2.Element e)
    Create a set of configured objects from their XML description
    void
    load(org.jdom2.Element e, Object o)
    Create a set of configured objects from their XML description, using an auxiliary object.
    boolean
    load(org.jdom2.Element shared, org.jdom2.Element perNode)
    Create a set of configured objects from their XML description.
    void
    load(org.jdom2.Element shared, org.jdom2.Element perNode, Object o)
    Create a set of configured objects from their XML description, using an auxiliary object.
    boolean
    Determine if this set of configured objects should be loaded after basic GUI construction is completed
    int
     
    void
    Set the error handler that will handle any errors encountered while parsing the XML.
    org.jdom2.Element
    Store the object in XML
    org.jdom2.Element
    store(Object o, boolean shared)
    Store the object in XML
  • Method Details

    • load

      boolean load(org.jdom2.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(org.jdom2.Element shared, org.jdom2.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

      void load(org.jdom2.Element e, 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:
      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(org.jdom2.Element shared, org.jdom2.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

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

      org.jdom2.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

      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