From ffe182b338e90ecd3f702c7142c4e43996e37d3c Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Fri, 26 Aug 2011 16:43:40 +0200 Subject: Implement comments (talkback) link. --- org/madore/damlengine/Context.java | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'org/madore/damlengine/Context.java') 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 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); + } + } + } -- cgit v1.2.3