jmri.jmrit.audio.configurexml
Class DefaultAudioManagerXml

java.lang.Object
  extended by jmri.configurexml.AbstractXmlAdapter
      extended by jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
          extended by jmri.managers.configurexml.AbstractAudioManagerConfigXML
              extended by jmri.jmrit.audio.configurexml.DefaultAudioManagerXml
All Implemented Interfaces:
XmlAdapter

public class DefaultAudioManagerXml
extends AbstractAudioManagerConfigXML

Persistency implementation for the default AudioManager persistence.

The state of audio objects is not persisted, just their existence.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author:
Matthew Harris copyright (c) 2009

Constructor Summary
DefaultAudioManagerXml()
          Default constructor
 
Method Summary
 boolean load(Element audio)
          Create a AudioManager object of the correct class, then register and fill it.
 void setStoreElementClass(Element audio)
          Subclass provides implementation to create the correct top element, including the type information.
 
Methods inherited from class jmri.managers.configurexml.AbstractAudioManagerConfigXML
load, loadAudio, loadOrder, store
 
Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
getSystemName, getUserName, getUserName, loadCommon, storeCommon
 
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
creationErrorEncountered, getConfigXmlManager, loadDeferred, setConfigXmlManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAudioManagerXml

public DefaultAudioManagerXml()
Default constructor

Method Detail

setStoreElementClass

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

Specified by:
setStoreElementClass in class AbstractAudioManagerConfigXML
Parameters:
audio - The top-level element being created

load

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

Specified by:
load in interface XmlAdapter
Specified by:
load in class AbstractAudioManagerConfigXML
Parameters:
audio - Top level Element to unpack.
Returns:
true if successful


Copyright © 1997 - 2011 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