Package jmri.configurexml
Interface XmlAdapter
-
- All Known Implementing Classes:
AbstractAudioManagerConfigXML
,AbstractConnectionConfigXml
,AbstractDCCppSerialConnectionConfigXml
,AbstractDebuggerMaleSocketXml
,AbstractLightManagerConfigXML
,AbstractMaleSocketXml
,AbstractManagerXml
,AbstractMemoryManagerConfigXML
,AbstractMeterManagerXml
,AbstractNamedBeanManagerConfigXML
,AbstractNetworkConnectionConfigXml
,AbstractReporterManagerConfigXML
,AbstractSensorManagerConfigXML
,AbstractSerialConnectionConfigXml
,AbstractSignalHeadManagerXml
,AbstractStreamConnectionConfigXml
,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
,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
,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
,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
,ForEachXml
,ForXml
,GlobalVariableComboIconXml
,GlobalVariableIconXml
,GlobalVariableIconXml
,GlobalVariableInputIconXml
,GlobalVariableSpinnerIconXml
,HoldXml
,IfThenElseXml
,IndicatorTrackIconXml
,IndicatorTurnoutIconXml
,InternalAnalogIOManagerXml
,InternalLightManagerXml
,InternalMeterManagerXml
,InternalReporterManagerXml
,InternalSensorManagerXml
,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
,OlcbReporterManagerXml
,OlcbSensorManagerXml
,OlcbSignalMastXml
,OlcbTurnoutManagerXml
,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
,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
,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:
ConfigXmlManager
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ErrorHandler
getDefaultExceptionHandler()
Get the default error handler.ErrorHandler
getExceptionHandler()
Get the current error handler.void
handleException(java.lang.String description, java.lang.String operation, java.lang.String systemName, java.lang.String userName, java.lang.Exception exception)
Provide a simple handler for errors.boolean
load(org.jdom2.Element e)
Create a set of configured objects from their XML descriptionvoid
load(org.jdom2.Element e, java.lang.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, java.lang.Object o)
Create a set of configured objects from their XML description, using an auxiliary object.boolean
loadDeferred()
Determine if this set of configured objects should be loaded after basic GUI construction is completedint
loadOrder()
void
setExceptionHandler(ErrorHandler errorHandler)
Set the error handler that will handle any errors encountered while parsing the XML.org.jdom2.Element
store(java.lang.Object o)
Store the object in XMLorg.jdom2.Element
store(java.lang.Object o, boolean shared)
Store the object in XML
-
-
-
Method Detail
-
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 descriptionperNode
- 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, java.lang.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 descriptiono
- 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, java.lang.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 descriptionperNode
- Top-level XML element containing the per-node descriptiono
- 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(java.lang.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(java.lang.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 java.lang.String description, @CheckForNull java.lang.String operation, @CheckForNull java.lang.String systemName, @CheckForNull java.lang.String userName, @CheckForNull java.lang.Exception exception) throws JmriConfigureXmlException
Provide a simple handler for errors. Calls the configuredErrorHandler
with anErrorMemo
created using the provided parameters.- Parameters:
description
- description of error encounteredoperation
- the operation being performed, may be nullsystemName
- system name of bean being handled, may be nulluserName
- user name of the bean being handled, may be nullexception
- 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
ErrorHandler getExceptionHandler()
Get the current error handler.- Returns:
- the error handler or null if no error handler is assigned
-
getDefaultExceptionHandler
static ErrorHandler getDefaultExceptionHandler()
Get the default error handler.- Returns:
- the default error handler
-
-