/**
 * Created by IntelliJ IDEA.
 * User: Owner
 * Date: Sep 1, 2003
 * Time: 8:15:53 PM
 * To change this template use Options | File Templates.
 */
package org.apache.fop.batik;

import org.apache.fop.fo.XMLObj;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.DirectPropertyListBuilder;
import org.apache.fop.apps.FOPException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;

public class BatikObj extends XMLObj {
    /**
     * inner class for making svg objects.
     */
    public static class Maker extends FObj.Maker {
        String tag;

        Maker(String str) {
            tag = str;
        }

        /**
         * make an svg object.
         *
         * @param parent the parent formatting object
         * @param propertyList the explicit properties of this object
         *
         * @return the svg object
         */
        public FObj make(FObj parent, PropertyList propertyList,
                         String systemId, int line, int column)
            throws FOPException {
            return new BatikObj(parent, propertyList, tag,
                              systemId, line, column);
        }
    }

    /**
     * returns the maker for this object.
     *
     * @return the maker for an svg object
     */
    public static FObj.Maker maker(String str) {
        return new BatikObj.Maker(str);
    }



    /**
     * constructs an svg object (called by Maker).
     *
     * @param parent the parent formatting object
     * @param propertyList the explicit properties of this object
     */
    protected BatikObj(FObj parent, PropertyList propertyList, String tag,
                     String systemId, int line, int column) {
        super(parent, propertyList, tag, systemId, line, column);
    }

    public String getName() {
        //return "svg:"+tagName;
        return tagName;
    }

    public String getNameSpace() {
        return "http://xml.apache.org/batik/ext";
    }
}
