Initial import.
[clinton/mirror/jspi/.git] / jspi / src / main / java / de / lohndirekt / print / attribute / IppValueTag.java
diff --git a/jspi/src/main/java/de/lohndirekt/print/attribute/IppValueTag.java b/jspi/src/main/java/de/lohndirekt/print/attribute/IppValueTag.java
new file mode 100644 (file)
index 0000000..8f95b7d
--- /dev/null
@@ -0,0 +1,74 @@
+/**\r
+ * Copyright (C) 2003 <a href="http://www.lohndirekt.de/">lohndirekt.de</a>\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ * \r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ *  \r
+ */\r
+package de.lohndirekt.print.attribute;\r
+\r
+/**\r
+ *Bezeichnungen übernommen aus <link>www.ietf.org/rfc/rfc2910.txt</link>\r
+ *Tags ohne Bezeichnung sind dort nicht aufgeführt, werden aber in der Cups-API verwendet\r
+ */\r
+public class IppValueTag {\r
+       \r
+       private String description;\r
+       private int value = 0;\r
+\r
+       public static final IppValueTag UNSUPPORTED_VALUE = new IppValueTag(0x10, "unsupported");\r
+       public static final IppValueTag DEFAULT = new IppValueTag(0x11, "'default' ");\r
+       public static final IppValueTag UNKNOWN = new IppValueTag(0x12, "unknown");\r
+       public static final IppValueTag NOVALUE = new IppValueTag(0x13, "no-value");\r
+       public static final IppValueTag NOTSETTABLE = new IppValueTag(0x15, "");\r
+       public static final IppValueTag DELETEATTR = new IppValueTag(0x16, "");\r
+       public static final IppValueTag ADMINDEFINE = new IppValueTag(0x17, "");\r
+       public static final IppValueTag INTEGER = new IppValueTag(0x21, "integer");\r
+       public static final IppValueTag BOOLEAN = new IppValueTag(0x22, "boolean");\r
+       public static final IppValueTag ENUM = new IppValueTag(0x23, "enum");\r
+       public static final IppValueTag STRING = new IppValueTag(0x30, "octetString");\r
+       public static final IppValueTag DATE = new IppValueTag(0x31, "dateTime");\r
+       public static final IppValueTag RESOLUTION = new IppValueTag(0x32, "resolution");\r
+       public static final IppValueTag RANGE = new IppValueTag(0x33, "rangeOfInteger");\r
+       public static final IppValueTag BEGIN_COLLECTION = new IppValueTag(0x34, "");\r
+       public static final IppValueTag TEXTLANG = new IppValueTag(0x35, "resolution");\r
+       public static final IppValueTag NAMELANG = new IppValueTag(0x36, "nameWithLanguage");\r
+       public static final IppValueTag END_COLLECTION = new IppValueTag(0x37, "");\r
+       public static final IppValueTag TEXT = new IppValueTag(0x41, "textWithoutLanguage");\r
+       public static final IppValueTag NAME = new IppValueTag(0x42, "nameWithoutLanguage");\r
+       public static final IppValueTag KEYWORD = new IppValueTag(0x44, "keyword");\r
+       public static final IppValueTag URI = new IppValueTag(0x45, "uri");\r
+       public static final IppValueTag URISCHEME = new IppValueTag(0x46, "uriScheme");\r
+       public static final IppValueTag CHARSET = new IppValueTag(0x47, "charset");\r
+       public static final IppValueTag LANGUAGE = new IppValueTag(0x48, "naturalLanguage");\r
+       public static final IppValueTag MIMETYPE = new IppValueTag(0x49, "mimeMediaType");\r
+       public static final IppValueTag MEMBERNAME = new IppValueTag(0x4A, "");\r
+       public static final IppValueTag MASK = new IppValueTag(0x7FFFFFFF, "");\r
+       public static final IppValueTag COPY = new IppValueTag(0x80000001, "");\r
+\r
+       private IppValueTag(int value, String description) {\r
+               this.value = value;\r
+               this.description = description;\r
+       }\r
+\r
+       public int getValue() {\r
+               return this.value;\r
+       }\r
+       \r
+       \r
+       public String toString() {\r
+               return this.description;\r
+       }\r
+\r
+}\r