summaryrefslogtreecommitdiff
path: root/sources/ch/epfl/lamp/util/HTMLRepresentation.java
diff options
context:
space:
mode:
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