diff options
author | David A. Madore <david+git@madore.org> | 2011-08-26 16:43:40 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2011-08-26 16:43:40 +0200 |
commit | ffe182b338e90ecd3f702c7142c4e43996e37d3c (patch) | |
tree | 8efae0d5e96ed00e0adec6f8ad505ab537f84923 /org/madore/damlengine/Context.java | |
parent | e3ac578e74c3197d7e4bb03e10cd5756b9405e76 (diff) | |
download | damlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.tar.gz damlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.tar.bz2 damlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.zip |
Implement comments (talkback) link.
Diffstat (limited to 'org/madore/damlengine/Context.java')
-rw-r--r-- | org/madore/damlengine/Context.java | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/org/madore/damlengine/Context.java b/org/madore/damlengine/Context.java index 6321ca2..22912a7 100644 --- a/org/madore/damlengine/Context.java +++ b/org/madore/damlengine/Context.java @@ -3,9 +3,9 @@ package org.madore.damlengine; import java.util.ArrayList; import org.w3c.dom.*; -public class Context { +public class Context implements Cloneable { - public Document doc; + public final Document doc; public Element htmlNode; public Element headNode; public String uriToTop; @@ -20,8 +20,35 @@ public class Context { public String subtitleLang; public ArrayList<String> translations; + public static class EntryContext { + public String year; + public String month; + public String day; + public String yandm; + public String date; + public String number; + public String dow; + public EntryContext(String year, String month, String day, + String number, String dow) { + this.year = year; this.month = month; this.day = day; + this.yandm = year+"-"+month; + this.date = yandm+"-"+day; + this.number = number; this.dow = dow; + } + } + + public EntryContext entryCtx; + public Context(Document doc) { this.doc = doc; } + public Context clone() { + try { + return (Context) super.clone(); + } catch (CloneNotSupportedException e) { + throw new RuntimeException(e); + } + } + } |