Package org.apache.fop.util

Examples of org.apache.fop.util.QName


                String ns = atts.getURI(i);
                if (ns.length() > 0) {
                    if ("http://www.w3.org/2000/xmlns/".equals(ns)) {
                        continue;
                    }
                    QName qname = new QName(ns, atts.getQName(i));
                    ato.setForeignAttribute(qname, atts.getValue(i));
                }
            }
        }
View Full Code Here


    public void renderPage(PageViewport page) throws IOException, FOPException {
        saveGraphicsState();
       
        //Paper source
        String paperSource = page.getForeignAttributeValue(
                new QName(PCLElementMapping.NAMESPACE, null, "paper-source"));
        if (paperSource != null) {
            gen.selectPaperSource(Integer.parseInt(paperSource));
        }
       
        //Page size
View Full Code Here

    private void transferForeignObjects(AreaTreeObject ato) {
        Map prefixes = new java.util.HashMap();
        Iterator iter = ato.getForeignAttributes().entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry entry = (Map.Entry)iter.next();
            QName qname = (QName)entry.getKey();
            prefixes.put(qname.getPrefix(), qname.getNamespaceURI());
            addAttribute(qname, (String)entry.getValue());
        }
        //Namespace declarations
        iter = prefixes.entrySet().iterator();
        while (iter.hasNext()) {
View Full Code Here

    public void renderPage(PageViewport page) throws IOException, FOPException {
        saveGraphicsState();
       
        //Paper source
        String paperSource = page.getForeignAttributeValue(
                new QName(PCLElementMapping.NAMESPACE, null, "paper-source"));
        if (paperSource != null) {
            gen.selectPaperSource(Integer.parseInt(paperSource));
        }
       
        //Page size
View Full Code Here

    private void transferForeignObjects(AreaTreeObject ato) {
        Map prefixes = new java.util.HashMap();
        Iterator iter = ato.getForeignAttributes().entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry entry = (Map.Entry)iter.next();
            QName qname = (QName)entry.getKey();
            prefixes.put(qname.getPrefix(), qname.getNamespaceURI());
            addAttribute(qname, (String)entry.getValue());
        }
        //Namespace declarations
        iter = prefixes.entrySet().iterator();
        while (iter.hasNext()) {
View Full Code Here

                String ns = atts.getURI(i);
                if (ns.length() > 0) {
                    if ("http://www.w3.org/2000/xmlns/".equals(ns)) {
                        continue;
                    }
                    QName qname = new QName(ns, atts.getQName(i));
                    ato.setForeignAttribute(qname, atts.getValue(i));
                }
            }
        }
View Full Code Here

        if (atts.size() == 0) {
            return;
        }
        Iterator iter = atts.keySet().iterator();
        while (iter.hasNext()) {
            QName qName = (QName)iter.next();
            String value = (String)atts.get(qName);
            //The casting is only to ensure type safety (too bad we can't use generics, yet)
            setForeignAttribute(qName, value);
        }
    }
View Full Code Here

        pdfi.currentFontSize = ((Integer)context.getProperty(PDF_FONT_SIZE)).intValue();
        pdfi.currentXPosition = ((Integer)context.getProperty(XPOS)).intValue();
        pdfi.currentYPosition = ((Integer)context.getProperty(YPOS)).intValue();
        pdfi.cfg = (Configuration)context.getProperty(HANDLER_CONFIGURATION);
        Map foreign = (Map)context.getProperty(RendererContextConstants.FOREIGN_ATTRIBUTES);
        QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode");
        if (foreign != null
                && "bitmap".equalsIgnoreCase((String)foreign.get(qName))) {
            pdfi.paintAsBitmap = true;
        }
        return pdfi;
View Full Code Here

    public void renderPage(PageViewport page) throws IOException, FOPException {
        saveGraphicsState();
       
        //Paper source
        String paperSource = page.getForeignAttributeValue(
                new QName(PCLElementMapping.NAMESPACE, null, "paper-source"));
        if (paperSource != null) {
            gen.selectPaperSource(Integer.parseInt(paperSource));
        }
       
        //Page size
View Full Code Here

        super(context);
    }
   
    /** @return true if the SVG image should be rendered as a bitmap */
    public boolean paintAsBitmap() {
        QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode");
        return getForeignAttributes() != null
             && "bitmap".equalsIgnoreCase((String)getForeignAttributes().get(qName));
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.util.QName

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.