< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */

  25 package javax.print.attribute.standard;
  26 
  27 import java.net.URI;
  28 
  29 import javax.print.attribute.Attribute;
  30 import javax.print.attribute.URISyntax;
  31 import javax.print.attribute.PrintServiceAttribute;

  32 
  33 /**
  34  * Class PrinterMoreInfoManufacturer is a printing attribute class, a URI,
  35  * that is used to obtain more information about this type of device.
  36  * The information obtained from this URI is intended for end user
  37  * consumption. Features outside the scope of the Print Service API
  38  * can be accessed from this URI (e.g.,
  39  * latest firmware, upgrades, service proxies, optional features available,
  40  * details on color support). The information is intended to be germane to
  41  * this kind of printer without regard to site specific modifications or
  42  * services.
  43  * <P>
  44  * In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used
  45  * to find out more information about this specific printer rather than this
  46  * general kind of printer.
  47  * <P>
  48  * <B>IPP Compatibility:</B> The string form returned by
  49  * {@code toString()} gives the IPP uri value.
  50  * The category name returned by {@code getName()}
  51  * gives the IPP attribute name.
  52  *
  53  * @author  Alan Kaminsky
  54  */
  55 public final class PrinterMoreInfoManufacturer extends URISyntax
  56         implements PrintServiceAttribute {
  57 



  58     private static final long serialVersionUID = 3323271346485076608L;
  59 
  60     /**
  61      * Constructs a new printer more info manufacturer attribute with the
  62      * specified URI.
  63      *
  64      * @param  uri  URI.
  65      *
  66      * @exception  NullPointerException
  67      *     (unchecked exception) Thrown if {@code uri} is null.
  68      */
  69     public PrinterMoreInfoManufacturer(URI uri) {
  70         super (uri);
  71     }
  72 
  73     /**
  74      * Returns whether this printer more info manufacturer attribute is
  75      * equivalent to the passed in object. To be equivalent, all of the
  76      * following conditions must be true:
  77      * <OL TYPE=1>
  78      * <LI>
  79      * {@code object} is not null.
  80      * <LI>
  81      * {@code object} is an instance of class
  82      * PrinterMoreInfoManufacturer.
  83      * <LI>
  84      * This printer more info manufacturer attribute's URI and
  85      * {@code object}'s URI are equal.
  86      * </OL>
  87      *
  88      * @param  object  Object to compare to.
  89      *
  90      * @return  True if {@code object} is equivalent to this printer
  91      *          more info manufacturer attribute, false otherwise.
  92      */
  93     public boolean equals(Object object) {
  94         return (super.equals(object) &&
  95                 object instanceof PrinterMoreInfoManufacturer);
  96     }
  97 
  98     /**
  99      * Get the printing attribute class which is to be used as the "category"
 100      * for this printing attribute value.
 101      * <P>
 102      * For class PrinterMoreInfoManufacturer, the category is
 103      * class PrinterMoreInfoManufacturer itself.
 104      *
 105      * @return  Printing attribute class (category), an instance of class
 106      *          {@link java.lang.Class java.lang.Class}.
 107      */
 108     public final Class<? extends Attribute> getCategory() {
 109         return PrinterMoreInfoManufacturer.class;
 110     }
 111 
 112     /**
 113      * Get the name of the category of which this attribute value is an
 114      * instance.
 115      * <P>
 116      * For class PrinterMoreInfoManufacturer, the category name is
 117      * {@code "printer-more-info-manufacturer"}.
 118      *
 119      * @return  Attribute category name.
 120      */
 121     public final String getName() {
 122         return "printer-more-info-manufacturer";
 123     }
 124 
 125 }
   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.print.attribute.standard;
  27 
  28 import java.net.URI;
  29 
  30 import javax.print.attribute.Attribute;

  31 import javax.print.attribute.PrintServiceAttribute;
  32 import javax.print.attribute.URISyntax;
  33 
  34 /**
  35  * Class {@code PrinterMoreInfoManufacturer} is a printing attribute class, a
  36  * {@code URI}, that is used to obtain more information about this type of
  37  * device. The information obtained from this {@code URI} is intended for end
  38  * user consumption. Features outside the scope of the Print Service API can be
  39  * accessed from this {@code URI} (e.g., latest firmware, upgrades, service
  40  * proxies, optional features available, details on color support). The
  41  * information is intended to be germane to this kind of printer without regard
  42  * to site specific modifications or services.
  43  * <p>
  44  * In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used to
  45  * find out more information about this specific printer rather than this

  46  * general kind of printer.
  47  * <p>
  48  * <b>IPP Compatibility:</b> The string form returned by {@code toString()}
  49  * gives the IPP uri value. The category name returned by {@code getName()}

  50  * gives the IPP attribute name.
  51  *
  52  * @author Alan Kaminsky
  53  */
  54 public final class PrinterMoreInfoManufacturer extends URISyntax
  55         implements PrintServiceAttribute {
  56 
  57     /**
  58      * Use serialVersionUID from JDK 1.4 for interoperability.
  59      */
  60     private static final long serialVersionUID = 3323271346485076608L;
  61 
  62     /**
  63      * Constructs a new printer more info manufacturer attribute with the
  64      * specified {@code URI}.
  65      *
  66      * @param  uri {@code URI}
  67      * @throws NullPointerException if {@code uri} is {@code null}


  68      */
  69     public PrinterMoreInfoManufacturer(URI uri) {
  70         super (uri);
  71     }
  72 
  73     /**
  74      * Returns whether this printer more info manufacturer attribute is
  75      * equivalent to the passed in object. To be equivalent, all of the
  76      * following conditions must be true:
  77      * <ol type=1>
  78      *   <li>{@code object} is not {@code null}.
  79      *   <li>{@code object} is an instance of class
  80      *   {@code PrinterMoreInfoManufacturer}.
  81      *   <li>This printer more info manufacturer attribute's {@code URI} and
  82      *   {@code object}'s {@code URI} are equal.
  83      * </ol>
  84      *
  85      * @param  object {@code Object} to compare to
  86      * @return {@code true} if {@code object} is equivalent to this printer more
  87      *         info manufacturer attribute, {@code false} otherwise




  88      */
  89     public boolean equals(Object object) {
  90         return (super.equals(object) &&
  91                 object instanceof PrinterMoreInfoManufacturer);
  92     }
  93 
  94     /**
  95      * Get the printing attribute class which is to be used as the "category"
  96      * for this printing attribute value.
  97      * <p>
  98      * For class {@code PrinterMoreInfoManufacturer}, the category is class
  99      * {@code PrinterMoreInfoManufacturer} itself.
 100      *
 101      * @return printing attribute class (category), an instance of class
 102      *         {@link Class java.lang.Class}
 103      */
 104     public final Class<? extends Attribute> getCategory() {
 105         return PrinterMoreInfoManufacturer.class;
 106     }
 107 
 108     /**
 109      * Get the name of the category of which this attribute value is an
 110      * instance.
 111      * <p>
 112      * For class {@code PrinterMoreInfoManufacturer}, the category name is
 113      * {@code "printer-more-info-manufacturer"}.
 114      *
 115      * @return attribute category name
 116      */
 117     public final String getName() {
 118         return "printer-more-info-manufacturer";
 119     }

 120 }
< prev index next >