jmri.managers.configurexml
Class AbstractTurnoutManagerConfigXML

java.lang.Object
  extended by jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
      extended by jmri.managers.configurexml.AbstractTurnoutManagerConfigXML
All Implemented Interfaces:
XmlAdapter
Direct Known Subclasses:
AbstractTurnoutManagerConfigXML, AcelaTurnoutManagerXml, CbusTurnoutManagerXml, EasyDccTurnoutManagerXml, EcosTurnoutManagerXml, EliteXNetTurnoutManagerXml, InternalTurnoutManagerXml, LnTurnoutManagerXml, NceTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SerialTurnoutManagerXml, SprogTurnoutManagerXml, SRCPTurnoutManagerXml, XNetTurnoutManagerXml, XpaTurnoutManagerXml

public abstract class AbstractTurnoutManagerConfigXML
extends AbstractNamedBeanManagerConfigXML

Provides the abstract base and store functionality for configuring TurnoutManagers, working with AbstractTurnoutManagers.

Typically, a subclass will just implement the load(Element turnouts) class, relying on implementation here to load the individual turnouts. Note that these are stored explicitly, so the resolution mechanism doesn't need to see *Xml classes for each specific Turnout or AbstractTurnout subclass at store time.

Author:
Bob Jacobsen Copyright: Copyright (c) 2002

Constructor Summary
AbstractTurnoutManagerConfigXML()
           
 
Method Summary
abstract  boolean load(Element turnouts)
          Create a TurnoutManager object of the correct class, then register and fill it.
 boolean loadTurnouts(Element turnouts)
          Utility method to load the individual Turnout objects.
abstract  void setStoreElementClass(Element turnouts)
          Subclass provides implementation to create the correct top element, including the type information.
 Element store(Object o)
          Default implementation for storing the contents of a TurnoutManager and associated TurnoutOperation's
 
Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
loadCommon, storeCommon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.configurexml.XmlAdapter
load
 

Constructor Detail

AbstractTurnoutManagerConfigXML

public AbstractTurnoutManagerConfigXML()
Method Detail

store

public Element store(Object o)
Default implementation for storing the contents of a TurnoutManager and associated TurnoutOperation's

Parameters:
o - Object to store, of type TurnoutManager
Returns:
Element containing the complete info

setStoreElementClass

public abstract void setStoreElementClass(Element turnouts)
Subclass provides implementation to create the correct top element, including the type information. Default implementation is to use the local class here.

Parameters:
turnouts - The top-level element being created

load

public abstract boolean load(Element turnouts)
Create a TurnoutManager object of the correct class, then register and fill it.

Parameters:
turnouts - Top level Element to unpack.
Returns:
true if successful

loadTurnouts

public boolean loadTurnouts(Element turnouts)
Utility method to load the individual Turnout objects. If there's no additional info needed for a specific turnout type, invoke this with the parent of the set of Turnout elements.

Parameters:
turnouts - Element containing the Turnout elements to load.
Returns:
true if succeeded


Copyright © 1997 - 2009 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads