Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributesImpl


    private void writeTaskProperty(TransformerHandler handler, String id, String name, String type, String valueType) throws SAXException {
        writeTaskProperty(handler, id, name, type, valueType, null);
    }
    private void writeTaskProperty(TransformerHandler handler, String id, String name, String type, String valueType, String defaultValue) throws SAXException {
        AttributesImpl attrs = new AttributesImpl();
        addAttribute("id", id, attrs);
        addAttribute("name", name, attrs);
        addAttribute("type", type, attrs);
        addAttribute("valuetype", valueType, attrs);
        if (defaultValue!=null) {
View Full Code Here


    }
   
    private void serialize(TransformerHandler handler, File outputFile) throws SAXException, IOException, ExportException {
        String filenameWithoutExtension = getFilenameWithoutExtension(outputFile);
        handler.startDocument();
        AttributesImpl attrs = new AttributesImpl();
       
        writeViews(getUIFacade(), handler);
        startElement("ganttproject",attrs, handler);
        textElement("title", attrs, "GanttProject - " + filenameWithoutExtension, handler);
        //
View Full Code Here

import net.sourceforge.ganttproject.GanttPreviousStateTask;

class HistorySaver extends SaverBase {

    void save(List/*<GanttPreviousState*/ history, TransformerHandler handler) throws SAXException, ParserConfigurationException, IOException {
        AttributesImpl attrs = new AttributesImpl();
        startElement("previous", handler);
        for (int i=0; i<history.size(); i++) {
            final GanttPreviousState nextState = (GanttPreviousState) history.get(i);
            final List/*<GanttPreviousStateTask>*/ stateTasks = nextState.load();
            addAttribute("name", nextState.getName(), attrs);
View Full Code Here

        if (inDocHandler != null && inRepresentation != SINGLE_XML) {
            inDocHandler.startDocument();
            inDocHandler.startElement("",
                    "classes",
                    "classes",
                    new AttributesImpl());
        }

        int i = 0;
        ZipEntry ze;
        while ((ze = zis.getNextEntry()) != null) {
View Full Code Here

        final int parameter)
    {
        super(h);
        this.elementName = elementName;

        AttributesImpl att = new AttributesImpl();
        if (name != null) {
            att.addAttribute("", "name", "name", "", name);
        }
        if (visible != 0) {
            att.addAttribute("", "visible", "visible", "", visible > 0
                    ? "true"
                    : "false");
        }
        if (parameter != -1) {
            att.addAttribute("",
                    "parameter",
                    "parameter",
                    "",
                    Integer.toString(parameter));
        }
        if (desc != null) {
            att.addAttribute("", "desc", "desc", "", desc);
        }

        addStart(elementName, att);
    }
View Full Code Here

        final String element,
        final String name,
        final String desc,
        final String value)
    {
        AttributesImpl att = new AttributesImpl();
        if (name != null) {
            att.addAttribute("", "name", "name", "", name);
        }
        if (desc != null) {
            att.addAttribute("", "desc", "desc", "", desc);
        }
        if (value != null) {
            att.addAttribute("",
                    "value",
                    "value",
                    "",
                    SAXClassAdapter.encode(value));
        }
View Full Code Here

            addDocumentStart();
        }
    }

    public void visitSource(final String source, final String debug) {
        AttributesImpl att = new AttributesImpl();
        if (source != null) {
            att.addAttribute("", "file", "file", "", encode(source));
        }
        if (debug != null) {
            att.addAttribute("", "debug", "debug", "", encode(debug));
        }

        addElement("source", att);
    }
View Full Code Here

    public void visitOuterClass(
        final String owner,
        final String name,
        final String desc)
    {
        AttributesImpl att = new AttributesImpl();
        att.addAttribute("", "owner", "owner", "", owner);
        if (name != null) {
            att.addAttribute("", "name", "name", "", name);
        }
        if (desc != null) {
            att.addAttribute("", "desc", "desc", "", desc);
        }

        addElement("outerclass", att);
    }
View Full Code Here

        final String[] interfaces)
    {
        StringBuffer sb = new StringBuffer();
        appendAccess(access | ACCESS_CLASS, sb);

        AttributesImpl att = new AttributesImpl();
        att.addAttribute("", "access", "access", "", sb.toString());
        if (name != null) {
            att.addAttribute("", "name", "name", "", name);
        }
        if (signature != null) {
            att.addAttribute("",
                    "signature",
                    "signature",
                    "",
                    encode(signature));
        }
        if (superName != null) {
            att.addAttribute("", "parent", "parent", "", superName);
        }
        att.addAttribute("",
                "major",
                "major",
                "",
                Integer.toString(version & 0xFFFF));
        att.addAttribute("",
                "minor",
                "minor",
                "",
                Integer.toString(version >>> 16));
        addStart("class", att);

        addStart("interfaces", new AttributesImpl());
        if (interfaces != null && interfaces.length > 0) {
            for (int i = 0; i < interfaces.length; i++) {
                AttributesImpl att2 = new AttributesImpl();
                att2.addAttribute("", "name", "name", "", interfaces[i]);
                addElement("interface", att2);
            }
        }
        addEnd("interfaces");
    }
View Full Code Here

        final Object value)
    {
        StringBuffer sb = new StringBuffer();
        appendAccess(access | ACCESS_FIELD, sb);

        AttributesImpl att = new AttributesImpl();
        att.addAttribute("", "access", "access", "", sb.toString());
        att.addAttribute("", "name", "name", "", name);
        att.addAttribute("", "desc", "desc", "", desc);
        if (signature != null) {
            att.addAttribute("",
                    "signature",
                    "signature",
                    "",
                    encode(signature));
        }
        if (value != null) {
            att.addAttribute("", "value", "value", "", encode(value.toString()));
        }

        return new SAXFieldAdapter(getContentHandler(), att);
    }
View Full Code Here

TOP

Related Classes of org.xml.sax.helpers.AttributesImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.