package org.texttechnologylab.project.gruppe_05_1.xml;

import org.texttechnologylab.project.gruppe_05_1.domain.mdb.*;
import org.texttechnologylab.project.gruppe_05_1.domain.speaker.Speaker;
import org.texttechnologylab.project.gruppe_05_1.xml.mdb.*;
import org.texttechnologylab.project.gruppe_05_1.xml.speaker.Speaker_File_Impl;
import org.w3c.dom.Node;

public class FileObjectFactory {

    private static FileObjectFactory oFactory = null;

    /**
     *
     * @return FileObjectFactory
     */
    public static FileObjectFactory getFactory() {
        if (oFactory == null) {
            oFactory = new FileObjectFactory();
        }
        return oFactory;
    }

    /*
     *      *** MDB Strukturen ***
     *      =====================
     */
    public BiografischeAngaben createBiografischeAngaben(Node node) {
        return new BiografischeAngaben_File_Impl().fromXmlNode(node);
    }

    public Institution createInstitution(Node node) {
        return new Institution_File_Impl().fromXmlNode(node);
    }


    public Mdb createMdb(Node node) {
        return new Mdb_File_Impl().fromXmlNode(node);
    }


    public MdbDocument createMdbDocument(Node node) {
        return new MdbDocument_File_Impl().fromXmlNode(node);
    }

    public MdbName createMdbName(Node node) {
        return new MdbName_File_Impl().fromXmlNode(node);
    }

    public Wahlperiode createWahlperiode(Node node) {
        return new Wahlperiode_File_Impl().fromXmlNode(node);
    }

    /*
     *      *** Redner- Strukturen ***
     *      =====================
     */

    public Speaker createSpeaker(Node node) {
        return new Speaker_File_Impl().fromXmlNode(node);
    }

}
