0N/A/*
2362N/A * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/Apackage javax.print.attribute.standard;
0N/A
0N/Aimport javax.print.attribute.Attribute;
0N/Aimport javax.print.attribute.EnumSyntax;
0N/Aimport javax.print.attribute.PrintJobAttribute;
0N/Aimport javax.print.attribute.PrintRequestAttribute;
0N/A
0N/A/**
0N/A * Class Fidelity is a printing attribute class, an enumeration,
0N/A * that indicates whether total fidelity to client supplied print request
0N/A * attributes is required.
0N/A * If FIDELITY_TRUE is specified and a service cannot print the job exactly
0N/A * as specified it must reject the job.
0N/A * If FIDELITY_FALSE is specified a reasonable attempt to print the job is
0N/A * acceptable. If not supplied the default is FIDELITY_FALSE.
0N/A *
0N/A * <P>
0N/A * <B>IPP Compatibility:</B> The IPP boolean value is "true" for FIDELITY_TRUE
0N/A * and "false" for FIDELITY_FALSE. The category name returned by
0N/A * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
0N/A * integer value is the IPP enum value. The <code>toString()</code> method
0N/A * returns the IPP string representation of the attribute value.
0N/A * See <a href="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a> Section 15.1 for
0N/A * a fuller description of the IPP fidelity attribute.
0N/A * <P>
0N/A *
0N/A */
0N/Apublic final class Fidelity extends EnumSyntax
0N/A implements PrintJobAttribute, PrintRequestAttribute {
0N/A
0N/A private static final long serialVersionUID = 6320827847329172308L;
0N/A
0N/A /**
0N/A * The job must be printed exactly as specified. or else rejected.
0N/A */
0N/A public static final Fidelity
0N/A FIDELITY_TRUE = new Fidelity(0);
0N/A
0N/A /**
0N/A * The printer should make reasonable attempts to print the job,
0N/A * even if it cannot print it exactly as specified.
0N/A */
0N/A public static final Fidelity
0N/A FIDELITY_FALSE = new Fidelity(1);
0N/A
0N/A /**
0N/A * Construct a new fidelity enumeration value with the
0N/A * given integer value.
0N/A *
0N/A * @param value Integer value.
0N/A */
0N/A protected Fidelity(int value) {
0N/A super (value);
0N/A }
0N/A
0N/A private static final String[] myStringTable = {
0N/A "true",
0N/A "false"
0N/A };
0N/A
0N/A
0N/A private static final Fidelity[] myEnumValueTable = {
0N/A FIDELITY_TRUE,
0N/A FIDELITY_FALSE
0N/A };
0N/A
0N/A /**
0N/A * Returns the string table for class Fidelity.
0N/A */
0N/A protected String[] getStringTable() {
0N/A return myStringTable;
0N/A }
0N/A
0N/A /**
0N/A * Returns the enumeration value table for class Fidelity.
0N/A */
0N/A protected EnumSyntax[] getEnumValueTable() {
0N/A return myEnumValueTable;
0N/A } /**
0N/A * Get the printing attribute class which is to be used as the "category"
0N/A * for this printing attribute value.
0N/A * <P>
0N/A * For class Fidelity the category is class Fidelity itself.
0N/A *
0N/A * @return Printing attribute class (category), an instance of class
0N/A * {@link java.lang.Class java.lang.Class}.
0N/A */
0N/A public final Class<? extends Attribute> getCategory() {
0N/A return Fidelity.class;
0N/A }
0N/A
0N/A /**
0N/A * Get the name of the category of which this attribute value is an
0N/A * instance.
0N/A * <P>
0N/A * For class Fidelity the category name is
0N/A * <CODE>"ipp-attribute-fidelity"</CODE>.
0N/A *
0N/A * @return Attribute category name.
0N/A */
0N/A public final String getName() {
0N/A return "ipp-attribute-fidelity";
0N/A }
0N/A
0N/A}