Examples of IppAttributeGroupSet


Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

        boolean supported = false;
        try {
            IppDocument document;
            IppResponse response;
            IppAttributeGroup agroup;
            IppAttributeGroupSet agroupset;
            Attribute[] attrs;
            String mime = null;
            String aname;

            aname = Ipp2Java.getIppAttributeNameByClass(attribute.getClass(),
                    -1);
            if (aname == null) {
                return false;
            }
            if (flavor == null) {
                mime = "application/octet-stream";
            } else {
                mime = java2ipp(flavor).getMimeType();
            }
            if (attributes == null || attributes.isEmpty()) {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                response = printer.requestValidateJob(aname, document,
                        agroupset);
                agroup = response
                        .getGroup(IppAttributeGroup.TAG_UNSUPPORTED_ATTRIBUTES);

                if (agroup == null) {
                    supported = true;
                } else if (agroup != null && agroup.findAttribute(aname) < 0) {
                    supported = true;
                }
            } else {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                attrs = attributes.toArray();
                for (int i = 0, ii = attrs.length; i < ii; i++) {
                    agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                            attrs[i].getClass(), -1), Ipp2Java
                            .getIppByJava(attrs[i]));
                }

                response = printer.requestValidateJob(aname, document,
View Full Code Here

Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

     */
    private void printsimple(Doc doc, HashAttributeSet as)
            throws PrintException {
        IppDocument document;
        IppResponse response;
        IppAttributeGroupSet agroupset;
        Attribute[] attrs;
        DocFlavor df = doc.getDocFlavor();
        String docname = doc.toString();

        try {
            document = new IppDocument(docname, java2ipp(df).getMimeType(), doc
                    .getPrintData());

            agroupset = new IppAttributeGroupSet();
            attrs = as.toArray();
            for (int i = 0, ii = attrs.length; i < ii; i++) {
                agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                        attrs[i].getClass(), -1), Ipp2Java
                        .getIppByJava(attrs[i]));
            }
            document.setAgroups(agroupset);

View Full Code Here

Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

        boolean supported = false;
        try {
            IppDocument document;
            IppResponse response;
            IppAttributeGroup agroup;
            IppAttributeGroupSet agroupset;
            Attribute[] attrs;
            String mime = null;
            String aname;

            aname = Ipp2Java.getIppAttributeNameByClass(attribute.getClass(),
                    -1);
            if (aname == null) {
                return false;
            }
            if (flavor == null) {
                mime = "application/octet-stream";
            } else {
                mime = java2ipp(flavor).getMimeType();
            }
            if (attributes == null || attributes.isEmpty()) {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                response = printer.requestValidateJob(aname, document,
                        agroupset);
                agroup = response
                        .getGroup(IppAttributeGroup.TAG_UNSUPPORTED_ATTRIBUTES);

                if (agroup == null) {
                    supported = true;
                } else if (agroup != null && agroup.findAttribute(aname) < 0) {
                    supported = true;
                }
            } else {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                attrs = attributes.toArray();
                for (int i = 0, ii = attrs.length; i < ii; i++) {
                    agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                            attrs[i].getClass(), -1), Ipp2Java
                            .getIppByJava(attrs[i]));
                }

                response = printer.requestValidateJob(aname, document,
View Full Code Here

Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

     */
    private void printsimple(Doc doc, HashAttributeSet as)
            throws PrintException {
        IppDocument document;
        IppResponse response;
        IppAttributeGroupSet agroupset;
        Attribute[] attrs;
        DocFlavor df = doc.getDocFlavor();
        String docname = doc.toString();

        try {
            document = new IppDocument(docname, java2ipp(df).getMimeType(), doc
                    .getPrintData());

            agroupset = new IppAttributeGroupSet();
            attrs = as.toArray();
            for (int i = 0, ii = attrs.length; i < ii; i++) {
                agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                        attrs[i].getClass(), -1), Ipp2Java
                        .getIppByJava(attrs[i]));
            }
            document.setAgroups(agroupset);

View Full Code Here

Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

        boolean supported = false;
        try {
            IppDocument document;
            IppResponse response;
            IppAttributeGroup agroup;
            IppAttributeGroupSet agroupset;
            Attribute[] attrs;
            String mime = null;
            String aname;

            aname = Ipp2Java.getIppAttributeNameByClass(attribute.getClass(),
                    -1);
            if (aname == null) {
                return false;
            }
            if (flavor == null) {
                mime = "application/octet-stream";
            } else {
                mime = java2ipp(flavor).getMimeType();
            }
            if (attributes == null || attributes.isEmpty()) {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                response = printer.requestValidateJob(aname, document,
                        agroupset);
                agroup = response
                        .getGroup(IppAttributeGroup.TAG_UNSUPPORTED_ATTRIBUTES);

                if (agroup == null) {
                    supported = true;
                } else if (agroup != null && agroup.findAttribute(aname) < 0) {
                    supported = true;
                }
            } else {
                document = new IppDocument("Qwerty", mime, "");
                agroupset = new IppAttributeGroupSet();
                agroupset.setAttribute(aname, Ipp2Java.getIppByJava(attribute));
                attrs = attributes.toArray();
                for (int i = 0, ii = attrs.length; i < ii; i++) {
                    agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                            attrs[i].getClass(), -1), Ipp2Java
                            .getIppByJava(attrs[i]));
                }

                response = printer.requestValidateJob(aname, document,
View Full Code Here

Examples of org.apache.harmony.x.print.ipp.IppAttributeGroupSet

     */
    private void printsimple(Doc doc, HashAttributeSet as)
            throws PrintException {
        IppDocument document;
        IppResponse response;
        IppAttributeGroupSet agroupset;
        Attribute[] attrs;
        DocFlavor df = doc.getDocFlavor();
        String docname = doc.toString();

        try {
            document = new IppDocument(docname, java2ipp(df).getMimeType(), doc
                    .getPrintData());

            agroupset = new IppAttributeGroupSet();
            attrs = as.toArray();
            for (int i = 0, ii = attrs.length; i < ii; i++) {
                agroupset.setAttribute(Ipp2Java.getIppAttributeNameByClass(
                        attrs[i].getClass(), -1), Ipp2Java
                        .getIppByJava(attrs[i]));
            }
            document.setAgroups(agroupset);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.