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. import java.net.URI;
  9. import javax.print.attribute.Attribute;
  10. import javax.print.attribute.URISyntax;
  11. import javax.print.attribute.PrintServiceAttribute;
  12. /**
  13. * Class PrinterMoreInfoManufacturer is a printing attribute class, a URI,
  14. * that is used to obtain more information about this type of device.
  15. * The information obtained from this URI is intended for end user
  16. * consumption. Features outside the scope of the Print Service API
  17. * can be accessed from this URI (e.g.,
  18. * latest firmware, upgrades, service proxies, optional features available,
  19. * details on color support). The information is intended to be germane to
  20. * this kind of printer without regard to site specific modifications or
  21. * services.
  22. * <P
  23. * In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used
  24. * to find out more information about this specific printer rather than this
  25. * general kind of printer.
  26. * <P>
  27. * <P>
  28. * <B>IPP Compatibility:</B> The string form returned by
  29. * <CODE>toString()</CODE> gives the IPP uri value.
  30. * The category name returned by <CODE>getName()</CODE>
  31. * gives the IPP attribute name.
  32. * <P>
  33. *
  34. * @author Alan Kaminsky
  35. */
  36. public final class PrinterMoreInfoManufacturer extends URISyntax
  37. implements PrintServiceAttribute {
  38. private static final long serialVersionUID = 3323271346485076608L;
  39. /**
  40. * Constructs a new printer more info manufacturer attribute with the
  41. * specified URI.
  42. *
  43. * @param uri URI.
  44. *
  45. * @exception NullPointerException
  46. * (unchecked exception) Thrown if <CODE>uri</CODE> is null.
  47. */
  48. public PrinterMoreInfoManufacturer(URI uri) {
  49. super (uri);
  50. }
  51. /**
  52. * Returns whether this printer more info manufacturer attribute is
  53. * equivalent to the passed in object. To be equivalent, all of the
  54. * following conditions must be true:
  55. * <OL TYPE=1>
  56. * <LI>
  57. * <CODE>object</CODE> is not null.
  58. * <LI>
  59. * <CODE>object</CODE> is an instance of class
  60. * PrinterMoreInfoManufacturer.
  61. * <LI>
  62. * This printer more info manufacturer attribute's URI and
  63. * <CODE>object</CODE>'s URI are equal.
  64. * </OL>
  65. *
  66. * @param object Object to compare to.
  67. *
  68. * @return True if <CODE>object</CODE> is equivalent to this printer
  69. * more info manufacturer attribute, false otherwise.
  70. */
  71. public boolean equals(Object object) {
  72. return (super.equals(object) &&
  73. object instanceof PrinterMoreInfoManufacturer);
  74. }
  75. /**
  76. * Get the printing attribute class which is to be used as the "category"
  77. * for this printing attribute value.
  78. * <P>
  79. * For class PrinterMoreInfoManufacturer, the category is
  80. * class PrinterMoreInfoManufacturer itself.
  81. *
  82. * @return Printing attribute class (category), an instance of class
  83. * {@link java.lang.Class java.lang.Class}.
  84. */
  85. public final Class<? extends Attribute> getCategory() {
  86. return PrinterMoreInfoManufacturer.class;
  87. }
  88. /**
  89. * Get the name of the category of which this attribute value is an
  90. * instance.
  91. * <P>
  92. * For class PrinterMoreInfoManufacturer, the category name is
  93. * <CODE>"printer-more-info-manufacturer"</CODE>.
  94. *
  95. * @return Attribute category name.
  96. */
  97. public final String getName() {
  98. return "printer-more-info-manufacturer";
  99. }
  100. }