< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java

Print this page




  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 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.EnumSyntax;
  28 import javax.print.attribute.Attribute;
  29 
  30 /**
  31  * Class ReferenceUriSchemesSupported is a printing attribute class
  32  * an enumeration, that indicates a "URI scheme," such as "http:" or "ftp:",
  33  * that a printer can use to retrieve print data stored at a URI location.
  34  * If a printer supports doc flavors with a print data representation class of
  35  * <CODE>"java.net.URL"</CODE>, the printer uses instances of class
  36  * ReferenceUriSchemesSupported to advertise the URI schemes it can accept.
  37  * The acceptable URI schemes are included as service attributes in the
  38  * lookup service; this lets clients search the
  39  * for printers that can get print data using a certain URI scheme. The
  40  * acceptable URI schemes can also be queried using the capability methods in
  41  * interface <code>PrintService</code>. However,
  42  * ReferenceUriSchemesSupported attributes are used solely for determining
  43  * acceptable URI schemes, they are never included in a doc's,
  44  * print request's, print job's, or print service's attribute set.
  45  * <P>
  46  * The Internet Assigned Numbers Authority maintains the
  47  * <A HREF="http://www.iana.org/assignments/uri-schemes.html">official
  48  * list of URI schemes</A>.
  49  * <p>
  50  * Class ReferenceUriSchemesSupported defines enumeration values for widely
  51  * used URI schemes. A printer that supports additional URI schemes
  52  * can define them in a subclass of class ReferenceUriSchemesSupported.
  53  * <P>
  54  * <B>IPP Compatibility:</B>  The category name returned by
  55  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  56  * integer value is the IPP enum value.  The <code>toString()</code> method
  57  * returns the IPP string representation of the attribute value.
  58  *
  59  * @author  Alan Kaminsky
  60  */
  61 public class ReferenceUriSchemesSupported
  62     extends EnumSyntax implements Attribute {
  63 
  64     private static final long serialVersionUID = -8989076942813442805L;
  65 
  66     /**
  67      * File Transfer Protocol (FTP).
  68      */
  69     public static final ReferenceUriSchemesSupported FTP =
  70         new ReferenceUriSchemesSupported(0);
  71 
  72     /**
  73      * HyperText Transfer Protocol (HTTP).
  74      */
  75     public static final ReferenceUriSchemesSupported HTTP = new ReferenceUriSchemesSupported(1);
  76 


 154     /**
 155      * Get the printing attribute class which is to be used as the "category"
 156      * for this printing attribute value.
 157      * <P>
 158      * For class ReferenceUriSchemesSupported and any vendor-defined
 159      * subclasses, the category is class ReferenceUriSchemesSupported itself.
 160      *
 161      * @return  Printing attribute class (category), an instance of class
 162      *          {@link java.lang.Class java.lang.Class}.
 163      */
 164     public final Class<? extends Attribute> getCategory() {
 165         return ReferenceUriSchemesSupported.class;
 166     }
 167 
 168     /**
 169      * Get the name of the category of which this attribute value is an
 170      * instance.
 171      * <P>
 172      * For class ReferenceUriSchemesSupported and any vendor-defined
 173      * subclasses, the category name is
 174      * <CODE>"reference-uri-schemes-supported"</CODE>.
 175      *
 176      * @return  Attribute category name.
 177      */
 178     public final String getName() {
 179         return "reference-uri-schemes-supported";
 180     }
 181 
 182 }


  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 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.EnumSyntax;
  28 import javax.print.attribute.Attribute;
  29 
  30 /**
  31  * Class ReferenceUriSchemesSupported is a printing attribute class
  32  * an enumeration, that indicates a "URI scheme," such as "http:" or "ftp:",
  33  * that a printer can use to retrieve print data stored at a URI location.
  34  * If a printer supports doc flavors with a print data representation class of
  35  * {@code "java.net.URL"}, the printer uses instances of class
  36  * ReferenceUriSchemesSupported to advertise the URI schemes it can accept.
  37  * The acceptable URI schemes are included as service attributes in the
  38  * lookup service; this lets clients search the
  39  * for printers that can get print data using a certain URI scheme. The
  40  * acceptable URI schemes can also be queried using the capability methods in
  41  * interface {@code PrintService}. However,
  42  * ReferenceUriSchemesSupported attributes are used solely for determining
  43  * acceptable URI schemes, they are never included in a doc's,
  44  * print request's, print job's, or print service's attribute set.
  45  * <P>
  46  * The Internet Assigned Numbers Authority maintains the
  47  * <A HREF="http://www.iana.org/assignments/uri-schemes.html">official
  48  * list of URI schemes</A>.
  49  * <p>
  50  * Class ReferenceUriSchemesSupported defines enumeration values for widely
  51  * used URI schemes. A printer that supports additional URI schemes
  52  * can define them in a subclass of class ReferenceUriSchemesSupported.
  53  * <P>
  54  * <B>IPP Compatibility:</B>  The category name returned by
  55  * {@code getName()} is the IPP attribute name.  The enumeration's
  56  * integer value is the IPP enum value.  The {@code toString()} method
  57  * returns the IPP string representation of the attribute value.
  58  *
  59  * @author  Alan Kaminsky
  60  */
  61 public class ReferenceUriSchemesSupported
  62     extends EnumSyntax implements Attribute {
  63 
  64     private static final long serialVersionUID = -8989076942813442805L;
  65 
  66     /**
  67      * File Transfer Protocol (FTP).
  68      */
  69     public static final ReferenceUriSchemesSupported FTP =
  70         new ReferenceUriSchemesSupported(0);
  71 
  72     /**
  73      * HyperText Transfer Protocol (HTTP).
  74      */
  75     public static final ReferenceUriSchemesSupported HTTP = new ReferenceUriSchemesSupported(1);
  76 


 154     /**
 155      * Get the printing attribute class which is to be used as the "category"
 156      * for this printing attribute value.
 157      * <P>
 158      * For class ReferenceUriSchemesSupported and any vendor-defined
 159      * subclasses, the category is class ReferenceUriSchemesSupported itself.
 160      *
 161      * @return  Printing attribute class (category), an instance of class
 162      *          {@link java.lang.Class java.lang.Class}.
 163      */
 164     public final Class<? extends Attribute> getCategory() {
 165         return ReferenceUriSchemesSupported.class;
 166     }
 167 
 168     /**
 169      * Get the name of the category of which this attribute value is an
 170      * instance.
 171      * <P>
 172      * For class ReferenceUriSchemesSupported and any vendor-defined
 173      * subclasses, the category name is
 174      * {@code "reference-uri-schemes-supported"}.
 175      *
 176      * @return  Attribute category name.
 177      */
 178     public final String getName() {
 179         return "reference-uri-schemes-supported";
 180     }
 181 
 182 }
< prev index next >