KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > print > attribute > standard > PrinterMoreInfoManufacturer


1 /*
2  * @(#)PrinterMoreInfoManufacturer.java 1.8 04/05/05
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.print.attribute.standard;
8
9 import java.net.URI JavaDoc;
10
11 import javax.print.attribute.Attribute JavaDoc;
12 import javax.print.attribute.URISyntax JavaDoc;
13 import javax.print.attribute.PrintServiceAttribute JavaDoc;
14
15 /**
16  * Class PrinterMoreInfoManufacturer is a printing attribute class, a URI,
17  * that is used to obtain more information about this type of device.
18  * The information obtained from this URI is intended for end user
19  * consumption. Features outside the scope of the Print Service API
20  * can be accessed from this URI (e.g.,
21  * latest firmware, upgrades, service proxies, optional features available,
22  * details on color support). The information is intended to be germane to
23  * this kind of printer without regard to site specific modifications or
24  * services.
25  * <P
26  * In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used
27  * to find out more information about this specific printer rather than this
28  * general kind of printer.
29  * <P>
30  * <P>
31  * <B>IPP Compatibility:</B> The string form returned by
32  * <CODE>toString()</CODE> gives the IPP uri value.
33  * The category name returned by <CODE>getName()</CODE>
34  * gives the IPP attribute name.
35  * <P>
36  *
37  * @author Alan Kaminsky
38  */

39 public final class PrinterMoreInfoManufacturer extends URISyntax JavaDoc
40     implements PrintServiceAttribute JavaDoc {
41
42     private static final long serialVersionUID = 3323271346485076608L;
43
44     /**
45      * Constructs a new printer more info manufacturer attribute with the
46      * specified URI.
47      *
48      * @param uri URI.
49      *
50      * @exception NullPointerException
51      * (unchecked exception) Thrown if <CODE>uri</CODE> is null.
52      */

53     public PrinterMoreInfoManufacturer(URI JavaDoc uri) {
54     super (uri);
55     }
56
57     /**
58      * Returns whether this printer more info manufacturer attribute is
59      * equivalent to the passed in object. To be equivalent, all of the
60      * following conditions must be true:
61      * <OL TYPE=1>
62      * <LI>
63      * <CODE>object</CODE> is not null.
64      * <LI>
65      * <CODE>object</CODE> is an instance of class
66      * PrinterMoreInfoManufacturer.
67      * <LI>
68      * This printer more info manufacturer attribute's URI and
69      * <CODE>object</CODE>'s URI are equal.
70      * </OL>
71      *
72      * @param object Object to compare to.
73      *
74      * @return True if <CODE>object</CODE> is equivalent to this printer
75      * more info manufacturer attribute, false otherwise.
76      */

77     public boolean equals(Object JavaDoc object) {
78     return (super.equals(object) &&
79         object instanceof PrinterMoreInfoManufacturer JavaDoc);
80     }
81
82     /**
83      * Get the printing attribute class which is to be used as the "category"
84      * for this printing attribute value.
85      * <P>
86      * For class PrinterMoreInfoManufacturer, the category is
87      * class PrinterMoreInfoManufacturer itself.
88      *
89      * @return Printing attribute class (category), an instance of class
90      * {@link java.lang.Class java.lang.Class}.
91      */

92     public final Class JavaDoc<? extends Attribute JavaDoc> getCategory() {
93     return PrinterMoreInfoManufacturer JavaDoc.class;
94     }
95
96     /**
97      * Get the name of the category of which this attribute value is an
98      * instance.
99      * <P>
100      * For class PrinterMoreInfoManufacturer, the category name is
101      * <CODE>"printer-more-info-manufacturer"</CODE>.
102      *
103      * @return Attribute category name.
104      */

105     public final String JavaDoc getName() {
106     return "printer-more-info-manufacturer";
107     }
108
109 }
110
Popular Tags