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