summaryrefslogtreecommitdiff
path: root/sources/ch/epfl/lamp/util/HTMLRepresentation.java
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2003-08-21 13:58:24 +0000
committermichelou <michelou@epfl.ch>2003-08-21 13:58:24 +0000
commit062981ee6a5b2dd8ee449cc41a6a24c6cbefb644 (patch)
tree1a6844ba681ff4360490cce4593451858712d742 /sources/ch/epfl/lamp/util/HTMLRepresentation.java
parent31e4cd7266114d749dcbb51d9387427d46c7b236 (diff)
downloadscala-062981ee6a5b2dd8ee449cc41a6a24c6cbefb644.tar.gz
scala-062981ee6a5b2dd8ee449cc41a6a24c6cbefb644.tar.bz2
scala-062981ee6a5b2dd8ee449cc41a6a24c6cbefb644.zip
*** empty log message ***
Diffstat (limited to 'sources/ch/epfl/lamp/util/HTMLRepresentation.java')
-rw-r--r--sources/ch/epfl/lamp/util/HTMLRepresentation.java71
1 files changed, 71 insertions, 0 deletions
diff --git a/sources/ch/epfl/lamp/util/HTMLRepresentation.java b/sources/ch/epfl/lamp/util/HTMLRepresentation.java
new file mode 100644
index 0000000000..5894c9df07
--- /dev/null
+++ b/sources/ch/epfl/lamp/util/HTMLRepresentation.java
@@ -0,0 +1,71 @@
+/* ____ ____ ____ ____ ______ *\
+** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
+** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
+** /_____/\____/\___/\____/____/ **
+\* */
+
+// $Id$
+
+package ch.epfl.lamp.util;
+
+/** This class contains properties of HTML document representation
+ * (see http://www.w3.org/TR/REC-html40/charset.html).
+ */
+public class HTMLRepresentation {
+
+ //########################################################################
+ // Private Fields
+
+ /** The document type */
+ private final String type;
+
+ /** The document character encoding */
+ private final String encoding;
+
+ /** The document language */
+ private final String language;
+
+ //########################################################################
+ // Public Constructors
+
+ /** Creates a new instance */
+ public HTMLRepresentation(String type, String encoding, String language) {
+ this.type = type;
+ this.encoding = encoding;
+ this.language = language;
+ }
+
+ /** Creates a new instance */
+ public HTMLRepresentation(String type, String encoding) {
+ this(type, encoding, "EN");
+ }
+
+ /** Creates a new instance */
+ public HTMLRepresentation(String type) {
+ this(type, "iso-8859-1", "EN");
+ }
+
+ /** Creates a new instance */
+ public HTMLRepresentation() {
+ this("HTML 4.01 Transitional", "iso-8859-1", "EN");
+ }
+
+ //########################################################################
+ // Public Methods - Getting & Setting
+
+ /** Returns the underlying document type. */
+ public String getType() {
+ return type;
+ }
+
+ /** Returns the underlying character encoding. */
+ public String getEncoding() {
+ return encoding;
+ }
+
+ /** Returns the underlying character encoding. */
+ public String getLanguage() {
+ return language;
+ }
+
+} \ No newline at end of file