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/**
27 * Package {@code javax.print.attribute.standard} contains classes for specific
28 * printing attributes. The parent package, <a href="../package-summary.html">
29 * javax.print.attribute</a>, provides classes and interfaces that describe the
30 * types of Java Print Service attributes and how they can be collected into
31 * attribute sets.
32 * <p>
33 * An attribute represents a printing feature that a print service can provide.
34 * For each attribute, a print service either does or does not support the
35 * attribute. For each possible value of a supported attribute, a print service
36 * either does or does not support the value.
37 * <p>
38 * The API requires every print service to support certain attributes; other
39 * attributes are optional and the service can choose whether or not to support
40 * them. Each attribute has a set of values that it accepts. The API requires
41 * every print service to support certain values for certain attributes; other
42 * attribute values are optional and the service can choose whether or not to
43 * support them. These support requirements are recorded in the documentation
44 * for each attribute class.
45 * <p>
46 * Package {@code javax.print.attribute.standard} contains standard printing
47 * attributes and standard printing attribute values that are widely used in the
48 * printing domain. A print service vendor can provide new vendor-specific
49 * printing attributes in addition to the standard ones. A vendor can also
50 * provide vendor-specific extensions (subclasses) of the standard printing
51 * attributes -- for example, to provide additional vendor-specific values for
52 * an existing standard attribute. Of course, if a vendor wants clients to be
53 * able to use any added or extended attributes, the vendor must publish the new
54 * attribute classes.
55 * <p>
56 * Many of the standard attribute classes extend one of the abstract syntax
57 * classes of the {@code javax.print.attribute} package. These abstract syntax
58 * classes each represent a different type. The <a href="../EnumSyntax.html">
59 * EnumSyntax</a> class, for example, represents a type-safe enumeration. The
60 * abstract syntax class provides a wrapper for the attribute value.
61 * <p>
62 * If an attribute class extends {@code EnumSyntax}, and the value of the
63 * attribute is an IPP-compatible value, the attribute's {@code toString} method
64 * returns the IPP string representation of the attribute value, such as
65 * "processing-stopped" for the <a href="JobState.html">JobState</a> attribute.
66 * However, because the {@code EnumSyntax} class is extensible, vendors can
67 * define their own attribute values. If an attribute uses the
68 * {@code EnumSyntax} class and is set to one of these vendor-defined values
69 * then the {@code toString} method will not return the IPP string
70 * representation of the value.
71 * <p>
72 * A printing client application will typically not need to use all the printing
73 * attribute classes in package javax.print.attribute.standard, just the ones
74 * that pertain to the application.
75 * <p>
76 * The attribute classes in package {@code javax.print.attribute.standard} are
77 * based on the Internet Printing Protocol (IPP) attributes as defined in the
78 * Internet RFC document, <i>RFC 2911 Internet Printing Protocol/1.1: Model and
79 * Semantics</i> dated September 2000. See
80 * <a href="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a> for more
81 * information. The descriptive text for each attribute class was taken largely
82 * from the above documents. The above authors' contribution to the API is
83 * gratefully acknowledged.
84 *
85 * <h3>Attribute Organization</h3>
86 * There are five kinds of printing attributes: doc attributes, print request
87 * attributes, print job attributes, print service attributes, and
88 * supported-values attributes.
89 *
90 * <h4>Doc Attributes</h4>
91 * Doc attributes specify the characteristics of an individual doc and the print
92 * job settings to be applied to an individual doc. A doc attribute class
93 * implements interface <a href="../DocAttribute.html">DocAttribute</a>. A doc
94 * attribute can appear in a <a href="../DocAttributeSet.html">
95 * DocAttributeSet</a>.
96 *
97 * <h4>Print Request Attributes</h4>
98 * Print request attributes specify the settings to be applied to a whole print
99 * job and to all the docs in the print job. A print request attribute class
100 * implements interface <a href="../PrintRequestAttribute.html">
101 * PrintRequestAttribute</a>. A print request attribute can appear in a
102 * <a href="../PrintRequestAttributeSet.html">PrintRequestAttributeSet</a>.
103 * <p>
104 * Some attributes are doc attributes but not print request attributes and may
105 * only be specified at the doc level. Some attributes are print request
106 * attributes but not doc attributes and may only be specified at the Print
107 * Request level. Some attributes are both doc attributes and print request
108 * attributes and may be specified either at the doc level or at the Print
109 * Request level.
110 * <p>
111 * When specified at the doc level, an attribute applies just to that one doc.
112 * When specified at the Print Request level, an attribute applies to the whole
113 * job, including all the docs in the job. However, an attribute specified at
114 * the doc level overrides an attribute in the same category specified at the
115 * Print Request level.
116 *
117 * <h4>Print Job Attributes</h4>
118 * Print job attributes report the status of a Print Job. A print job attribute
119 * class implements interface <a href="../PrintJobAttribute.html">
120 * PrintJobAttribute</a>. A print job attribute can appear in a
121 * <a href="../PrintJobAttributeSet.html">PrintJobAttributeSet</a>.
122 * <p>
123 * Some attributes are both print request attributes and print job attributes; a
124 * client may include such attributes in a Print Request to specify
125 * characteristics for the ensuing Print Job, and those attributes then also
126 * appear in the Print Job's attribute set. Some attributes are print job
127 * attributes but not print request attributes; the print service itself adds
128 * these attributes to the Print Job's attribute set.
129 *
130 * <h4>Print Service Attributes</h4>
131 * Print service attributes report the status of a print service. A print
132 * service attribute class implements interface
133 * <a href="../PrintServiceAttribute.html">PrintServiceAttribute</a>. A print
134 * service attribute can appear in a <a href="../PrintServiceAttributeSet.html">
135 * PrintServiceAttributeSet</a>.
136 *
137 * <h4>Supported-Values Attributes</h4>
138 * A supported-value attribute indicates the legal values for another attribute
139 * that a print service supports. A supported-values attribute class implements
140 * interface <a href="../SupportedValuesAttribute.html">
141 * SupportedValuesAttribute</a>. However, supported-values attributes never
142 * appear in attribute sets, so there is no restricted
143 * <a href="../AttributeSet.html">AttributeSet</a> subinterface for them.
144 *
145 * <h4>Attribute Table</h4>
146 * The table below lists all the printing attributes. The table shows the
147 * tagging interfaces each attribute class implements in addition to interface
148 * <a href="../Attribute.html"> Attribute</a>, thus indicating how each
149 * attribute is used in the API. For each doc attribute and print request
150 * attribute, the column marked "SupportedValuesAttribute" lists the
151 * supported-values attribute class, if any, with which a print service
152 * indicates the supported values for that attribute category.
153 * <table border=1 cellpadding=2 cellspacing=1 summary="Lists all printing
154 * attributes as described in above text">
155 *   <tr style="background-color:#E5E5E5">
156 *     <th valign="bottom">Attribute Class
157 *     <th valign="bottom">Doc<br>Attribute
158 *     <th valign="bottom">Print<br>Request<br>Attribute
159 *     <th valign="bottom">Print<br>Job<br>Attribute
160 *     <th valign="bottom">Print<br>Service<br>Attribute
161 *     <th valign="bottom">SupportedValuesAttribute
162 *   <tr>
163 *     <td><a href="Compression.html">Compression</a>
164 *     <td align="center">X
165 *     <td>&nbsp;
166 *     <td>&nbsp;
167 *     <td>&nbsp;
168 *     <td>&nbsp;
169 *   <tr>
170 *     <td><a href="DocumentName.html">DocumentName</a>
171 *     <td align="center">X
172 *     <td>&nbsp;
173 *     <td>&nbsp;
174 *     <td>&nbsp;
175 *     <td>&nbsp;
176 *   <tr>
177 *     <td><a href="Chromaticity.html">Chromaticity</a>
178 *     <td align="center">X
179 *     <td align="center">X
180 *     <td align="center">X
181 *     <td>&nbsp;
182 *     <td>&nbsp;
183 *   <tr>
184 *     <td><a href="Copies.html">Copies</a>
185 *     <td>&nbsp;
186 *     <td align="center">X
187 *     <td align="center">X
188 *     <td>&nbsp;
189 *     <td><a href="CopiesSupported.html">CopiesSupported</a>
190 *   <tr>
191 *     <td><a href="Finishings.html">Finishings</a>
192 *     <td align="center">X
193 *     <td align="center">X
194 *     <td align="center">X
195 *     <td>&nbsp;
196 *     <td>&nbsp;
197 *   <tr>
198 *     <td><a href="JobHoldUntil.html">JobHoldUntil</a>
199 *     <td>&nbsp;
200 *     <td align="center">X
201 *     <td align="center">X
202 *     <td>&nbsp;
203 *     <td>&nbsp;
204 *   <tr>
205 *     <td><a href="JobImpressions.html">JobImpressions</a>
206 *     <td>&nbsp;
207 *     <td align="center">X
208 *     <td align="center">X
209 *     <td>&nbsp;
210 *     <td><a href="JobImpressionsSupported.html">JobImpressionsSupported</a>
211 *   <tr>
212 *     <td><a href="JobKOctets.html">JobKOctets</a>
213 *     <td>&nbsp;
214 *     <td align="center">X
215 *     <td align="center">X
216 *     <td>&nbsp;
217 *     <td><a href="JobKOctetsSupported.html">JobKOctetsSupported</a>
218 *   <tr>
219 *     <td><a href="JobMediaSheets.html">JobMediaSheets</a>
220 *     <td>&nbsp;
221 *     <td align="center">X
222 *     <td align="center">X
223 *     <td>&nbsp;
224 *     <td><a href="JobMediaSheetsSupported.html">JobMediaSheetsSupported</a>
225 *   <tr>
226 *     <td><a href="JobName.html">JobName</a>
227 *     <td>&nbsp;
228 *     <td align="center">X
229 *     <td align="center">X
230 *     <td>&nbsp;
231 *     <td>&nbsp;
232 *   <tr>
233 *     <td><a href="JobPriority.html">JobPriority</a>
234 *     <td>&nbsp;
235 *     <td align="center">X
236 *     <td align="center">X
237 *     <td>&nbsp;
238 *     <td><a href="JobPrioritySupported.html">JobPrioritySupported</a>
239 *   <tr>
240 *     <td><a href="JobSheets.html">JobSheets</a>
241 *     <td>&nbsp;
242 *     <td align="center">X
243 *     <td align="center">X
244 *     <td>&nbsp;
245 *     <td>&nbsp;
246 *   <tr>
247 *     <td><a href="Media.html">Media</a>
248 *     <td align="center">X
249 *     <td align="center">X
250 *     <td align="center">X
251 *     <td>&nbsp;
252 *     <td>&nbsp;
253 *   <tr>
254 *     <td><a href="MediaSize.html">MediaSize</a>
255 *     <td>&nbsp;
256 *     <td>&nbsp;
257 *     <td>&nbsp;
258 *     <td>&nbsp;
259 *     <td>&nbsp;
260 *   <tr>
261 *     <td><a href="MultipleDocumentHandling.html">MultipleDocumentHandling</a>
262 *     <td>&nbsp;
263 *     <td align="center">X
264 *     <td align="center">X
265 *     <td>&nbsp;
266 *     <td>&nbsp;
267 *   <tr>
268 *     <td><a href="NumberUp.html">NumberUp</a>
269 *     <td align="center">X
270 *     <td align="center">X
271 *     <td align="center">X
272 *     <td>&nbsp;
273 *     <td><a href="NumberUpSupported.html">NumberUpSupported</a>
274 *   <tr>
275 *     <td><a href="OrientationRequested.html">OrientationRequested</a>
276 *     <td align="center">X
277 *     <td align="center">X
278 *     <td align="center">X
279 *     <td>&nbsp;
280 *     <td>&nbsp;
281 *   <tr>
282 *     <td><a href="PageRanges.html">PageRanges</a>
283 *     <td align="center">X
284 *     <td align="center">X
285 *     <td align="center">X
286 *     <td>&nbsp;
287 *     <td>&nbsp;
288 *   <tr>
289 *     <td><a href="PresentationDirection.html">PresentationDirection</a>
290 *     <td align="center">X
291 *     <td align="center">X
292 *     <td align="center">X
293 *     <td>&nbsp;
294 *     <td>&nbsp;
295 *   <tr>
296 *     <td><a href="PrinterResolution.html">PrinterResolution</a>
297 *     <td align="center">X
298 *     <td align="center">X
299 *     <td align="center">X
300 *     <td>&nbsp;
301 *     <td>&nbsp;
302 *   <tr>
303 *     <td><a href="PrintQuality.html">PrintQuality</a>
304 *     <td align="center">X
305 *     <td align="center">X
306 *     <td align="center">X
307 *     <td>&nbsp;
308 *     <td>&nbsp;
309 *   <tr>
310 *     <td><a href="RequestingUserName.html">RequestingUserName</a>
311 *     <td>&nbsp;
312 *     <td align="center">X
313 *     <td align="center">X
314 *     <td>&nbsp;
315 *     <td>&nbsp;
316 *   <tr>
317 *     <td><a href="SheetCollate.html">SheetCollate</a>
318 *     <td align="center">X
319 *     <td align="center">X
320 *     <td align="center">X
321 *     <td>&nbsp;
322 *     <td>&nbsp;
323 *   <tr>
324 *     <td><a href="Sides.html">Sides</a>
325 *     <td align="center">X
326 *     <td align="center">X
327 *     <td align="center">X
328 *     <td>&nbsp;
329 *     <td>&nbsp;
330 *   <tr>
331 *     <td><a href="DateTimeAtCompleted.html">DateTimeAtCompleted</a>
332 *     <td>&nbsp;
333 *     <td>&nbsp;
334 *     <td align="center">X
335 *     <td>&nbsp;
336 *     <td>&nbsp;
337 *   <tr>
338 *     <td><a href="DateTimeAtCreation.html">DateTimeAtCreation</a>
339 *     <td>&nbsp;
340 *     <td>&nbsp;
341 *     <td align="center">X
342 *     <td>&nbsp;
343 *     <td>&nbsp;
344 *   <tr>
345 *     <td><a href="DateTimeAtProcessing.html">DateTimeAtProcessing</a>
346 *     <td>&nbsp;
347 *     <td>&nbsp;
348 *     <td align="center">X
349 *     <td>&nbsp;
350 *     <td>&nbsp;
351 *   <tr>
352 *     <td><a href="JobImpressionsCompleted.html">JobImpressionsCompleted</a>
353 *     <td>&nbsp;
354 *     <td>&nbsp;
355 *     <td align="center">X
356 *     <td>&nbsp;
357 *     <td>&nbsp;
358 *   <tr>
359 *     <td><a href="JobKOctetsProcessed.html">JobKOctetsProcessed</a>
360 *     <td>&nbsp;
361 *     <td>&nbsp;
362 *     <td align="center">X
363 *     <td>&nbsp;
364 *     <td>&nbsp;
365 *   <tr>
366 *     <td><a href="JobMediaSheetsCompleted.html">JobMediaSheetsCompleted</a>
367 *     <td>&nbsp;
368 *     <td>&nbsp;
369 *     <td align="center">X
370 *     <td>&nbsp;
371 *     <td>&nbsp;
372 *   <tr>
373 *     <td><a href="JobMessageFromOperator.html">JobMessageFromOperator</a>
374 *     <td>&nbsp;
375 *     <td>&nbsp;
376 *     <td align="center">X
377 *     <td>&nbsp;
378 *     <td>&nbsp;
379 *   <tr>
380 *     <td><a href="JobOriginatingUserName.html">JobOriginatingUserName</a>
381 *     <td>&nbsp;
382 *     <td>&nbsp;
383 *     <td align="center">X
384 *     <td>&nbsp;
385 *     <td>&nbsp;
386 *   <tr>
387 *     <td><a href="JobState.html">JobState</a>
388 *     <td>&nbsp;
389 *     <td>&nbsp;
390 *     <td align="center">X
391 *     <td>&nbsp;
392 *     <td>&nbsp;
393 *   <tr>
394 *     <td><a href="JobStateReasons.html">JobStateReasons</a><br>
395 *             Contains zero or more --
396 *     <td>&nbsp;
397 *     <td>&nbsp;
398 *     <td align="center">X
399 *     <td>&nbsp;
400 *     <td>&nbsp;
401 *   <tr>
402 *     <td>-- <a href="JobStateReason.html">JobStateReason</a>
403 *     <td>&nbsp;
404 *     <td>&nbsp;
405 *     <td>&nbsp;
406 *     <td>&nbsp;
407 *     <td>&nbsp;
408 *   <tr>
409 *     <td><a href="NumberOfDocuments.html">NumberOfDocuments</a>
410 *     <td>&nbsp;
411 *     <td>&nbsp;
412 *     <td align="center">X
413 *     <td>&nbsp;
414 *     <td>&nbsp;
415 *   <tr>
416 *     <td><a href="NumberOfInterveningJobs.html">NumberOfInterveningJobs</a>
417 *     <td>&nbsp;
418 *     <td>&nbsp;
419 *     <td align="center">X
420 *     <td>&nbsp;
421 *     <td>&nbsp;
422 *   <tr>
423 *     <td><a href="OutputDeviceAssigned.html">OutputDeviceAssigned</a>
424 *     <td>&nbsp;
425 *     <td>&nbsp;
426 *     <td align="center">X
427 *     <td>&nbsp;
428 *     <td>&nbsp;
429 *   <tr>
430 *     <td><a href="ColorSupported.html">ColorSupported</a>
431 *     <td>&nbsp;
432 *     <td>&nbsp;
433 *     <td>&nbsp;
434 *     <td align="center">X
435 *     <td>&nbsp;
436 *   <tr>
437 *     <td><a href="PagesPerMinute.html">PagesPerMinute</a>
438 *     <td>&nbsp;
439 *     <td>&nbsp;
440 *     <td>&nbsp;
441 *     <td align="center">X
442 *     <td>&nbsp;
443 *   <tr>
444 *     <td><a href="PagesPerMinuteColor.html">PagesPerMinuteColor</a>
445 *     <td>&nbsp;
446 *     <td>&nbsp;
447 *     <td>&nbsp;
448 *     <td align="center">X
449 *     <td>&nbsp;
450 *   <tr>
451 *     <td><a href="PDLOverrideSupported.html">PDLOverrideSupported</a>
452 *     <td>&nbsp;
453 *     <td>&nbsp;
454 *     <td>&nbsp;
455 *     <td align="center">X
456 *     <td>&nbsp;
457 *   <tr>
458 *     <td><a href="PrinterIsAcceptingJobs.html">PrinterIsAcceptingJobs</a>
459 *     <td>&nbsp;
460 *     <td>&nbsp;
461 *     <td>&nbsp;
462 *     <td align="center">X
463 *     <td>&nbsp;
464 *   <tr>
465 *     <td><a href="PrinterInfo.html">PrinterInfo</a>
466 *     <td>&nbsp;
467 *     <td>&nbsp;
468 *     <td>&nbsp;
469 *     <td align="center">X
470 *     <td>&nbsp;
471 *   <tr>
472 *     <td><a href="PrinterLocation.html">PrinterLocation</a>
473 *     <td>&nbsp;
474 *     <td>&nbsp;
475 *     <td>&nbsp;
476 *     <td align="center">X
477 *     <td>&nbsp;
478 *   <tr>
479 *     <td><a href="PrinterMessageFromOperator.html">
480 *             PrinterMessageFromOperator</a>
481 *     <td>&nbsp;
482 *     <td>&nbsp;
483 *     <td>&nbsp;
484 *     <td align="center">X
485 *     <td>&nbsp;
486 *   <tr>
487 *     <td><a href="PrinterMakeAndModel.html">PrinterMakeAndModel</a>
488 *     <td>&nbsp;
489 *     <td>&nbsp;
490 *     <td>&nbsp;
491 *     <td align="center">X
492 *     <td>&nbsp;
493 *   <tr>
494 *     <td><a href="PrinterMoreInfo.html">PrinterMoreInfo</a>
495 *     <td>&nbsp;
496 *     <td>&nbsp;
497 *     <td>&nbsp;
498 *     <td align="center">X
499 *     <td>&nbsp;
500 *   <tr>
501 *     <td><a href="PrinterMoreInfoManufacturer.html">
502 *             PrinterMoreInfoManufacturer</a>
503 *     <td>&nbsp;
504 *     <td>&nbsp;
505 *     <td>&nbsp;
506 *     <td align="center">X
507 *     <td>&nbsp;
508 *   <tr>
509 *     <td><a href="PrinterName.html">PrinterName</a>
510 *     <td>&nbsp;
511 *     <td>&nbsp;
512 *     <td>&nbsp;
513 *     <td align="center">X
514 *     <td>&nbsp;
515 *   <tr>
516 *     <td><a href="PrinterState.html">PrinterState</a>
517 *     <td>&nbsp;
518 *     <td>&nbsp;
519 *     <td>&nbsp;
520 *     <td align="center">X
521 *     <td>&nbsp;
522 *   <tr>
523 *     <td><a href="PrinterStateReasons.html">PrinterStateReasons</a><br>
524 *             Contains zero or more --
525 *     <td>&nbsp;
526 *     <td>&nbsp;
527 *     <td>&nbsp;
528 *     <td align="center">X
529 *     <td>&nbsp;
530 *   <tr>
531 *     <td>-- <a href="PrinterStateReason.html">PrinterStateReason</a>
532 *     <td>&nbsp;
533 *     <td>&nbsp;
534 *     <td>&nbsp;
535 *     <td>&nbsp;
536 *     <td>&nbsp;
537 *   <tr>
538 *     <td>-- <a href="Severity.html">Severity</a>
539 *     <td>&nbsp;
540 *     <td>&nbsp;
541 *     <td>&nbsp;
542 *     <td>&nbsp;
543 *     <td>&nbsp;
544 *   <tr>
545 *     <td><a href="QueuedJobCount.html">QueuedJobCount</a>
546 *     <td>&nbsp;
547 *     <td>&nbsp;
548 *     <td>&nbsp;
549 *     <td align="center">X
550 *     <td>&nbsp;
551 *   <tr>
552 *     <td><a href="ReferenceUriSchemesSupported.html">
553 *             ReferenceUriSchemesSupported</a>
554 *     <td>&nbsp;
555 *     <td>&nbsp;
556 *     <td>&nbsp;
557 *     <td>&nbsp;
558 *     <td>&nbsp;
559 * </table>
560 * <p>
561 * Please note: In the {@code javax.print} APIs, a {@code null} reference
562 * parameter to methods is incorrect unless explicitly documented on the method
563 * as having a meaningful interpretation. Usage to the contrary is incorrect
564 * coding and may result in a run time exception either immediately or at some
565 * later time. {@code IllegalArgumentException} and {@code NullPointerException}
566 * are examples of typical and acceptable run time exceptions for such cases.
567 *
568 * @since 1.4
569 */
570package javax.print.attribute.standard;
571