Search in sources :

Example 1 with SE8cSignalHead

use of jmri.jmrix.loconet.SE8cSignalHead in project JMRI by JMRI.

the class SE8cSignalHeadXml method store.

/**
     * Default implementation for storing the contents of a SE8cSignalHead
     *
     * @param o Object to store, of type SE8cSignalHead
     * @return Element containing the complete info
     */
@Override
public Element store(Object o) {
    SE8cSignalHead p = (SE8cSignalHead) o;
    // NOI18N
    Element element = new Element("signalhead");
    // NOI18N
    element.setAttribute("class", this.getClass().getName());
    // include contents
    // NOI18N
    element.setAttribute("systemName", p.getSystemName());
    // NOI18N
    element.addContent(new Element("systemName").addContent(p.getSystemName()));
    storeCommon(p, element);
    // store the turnout number, not a name, as that's needed when recreating
    element.addContent(addTurnoutElement(p.getNumber()));
    return element;
}
Also used : Element(org.jdom2.Element) SE8cSignalHead(jmri.jmrix.loconet.SE8cSignalHead)

Aggregations

SE8cSignalHead (jmri.jmrix.loconet.SE8cSignalHead)1 Element (org.jdom2.Element)1