Save This Page
Home » openjdk-7 » javax » print » attribute » standard » [javadoc | source]
    1   /*
    2    * Copyright 2000-2004 Sun Microsystems, Inc.  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.  Sun designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   22    * CA 95054 USA or visit www.sun.com if you need additional information or
   23    * have any 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    * <P>
   49    * <B>IPP Compatibility:</B> The string form returned by
   50    * <CODE>toString()</CODE> gives the IPP uri value.
   51    * The category name returned by <CODE>getName()</CODE>
   52    * gives the IPP attribute name.
   53    * <P>
   54    *
   55    * @author  Alan Kaminsky
   56    */
   57   public final class PrinterMoreInfoManufacturer extends URISyntax
   58           implements PrintServiceAttribute {
   59   
   60       private static final long serialVersionUID = 3323271346485076608L;
   61   
   62       /**
   63        * Constructs a new printer more info manufacturer attribute with the
   64        * specified URI.
   65        *
   66        * @param  uri  URI.
   67        *
   68        * @exception  NullPointerException
   69        *     (unchecked exception) Thrown if <CODE>uri</CODE> is null.
   70        */
   71       public PrinterMoreInfoManufacturer(URI uri) {
   72           super (uri);
   73       }
   74   
   75       /**
   76        * Returns whether this printer more info manufacturer attribute is
   77        * equivalent to the passed in object. To be equivalent, all of the
   78        * following conditions must be true:
   79        * <OL TYPE=1>
   80        * <LI>
   81        * <CODE>object</CODE> is not null.
   82        * <LI>
   83        * <CODE>object</CODE> is an instance of class
   84        * PrinterMoreInfoManufacturer.
   85        * <LI>
   86        * This printer more info manufacturer attribute's URI and
   87        * <CODE>object</CODE>'s URI are equal.
   88        * </OL>
   89        *
   90        * @param  object  Object to compare to.
   91        *
   92        * @return  True if <CODE>object</CODE> is equivalent to this printer
   93        *          more info manufacturer attribute, false otherwise.
   94        */
   95       public boolean equals(Object object) {
   96           return (super.equals(object) &&
   97                   object instanceof PrinterMoreInfoManufacturer);
   98       }
   99   
  100       /**
  101        * Get the printing attribute class which is to be used as the "category"
  102        * for this printing attribute value.
  103        * <P>
  104        * For class PrinterMoreInfoManufacturer, the category is
  105        * class PrinterMoreInfoManufacturer itself.
  106        *
  107        * @return  Printing attribute class (category), an instance of class
  108        *          {@link java.lang.Class java.lang.Class}.
  109        */
  110       public final Class<? extends Attribute> getCategory() {
  111           return PrinterMoreInfoManufacturer.class;
  112       }
  113   
  114       /**
  115        * Get the name of the category of which this attribute value is an
  116        * instance.
  117        * <P>
  118        * For class PrinterMoreInfoManufacturer, the category name is
  119        * <CODE>"printer-more-info-manufacturer"</CODE>.
  120        *
  121        * @return  Attribute category name.
  122        */
  123       public final String getName() {
  124           return "printer-more-info-manufacturer";
  125       }
  126   
  127   }

Save This Page
Home » openjdk-7 » javax » print » attribute » standard » [javadoc | source]