package org.madore.damlengine; import java.util.ArrayList; import java.util.Set; import org.w3c.dom.*; public class Context implements Cloneable { public final Document doc; public static class GeneralContext { public Element htmlNode; public Element headNode; public String uriToTop; public String fileName; public StringBuffer styleContent; public StringBuffer scriptContent; public DocumentFragment title; public String titleStr; public String titleLang; public DocumentFragment subtitle; public String subtitleStr; public String subtitleLang; public ArrayList translations; } public GeneralContext gc; public static abstract class WeblogSelectionContext { public Set sel; public ArrayList xmlData; } public static class WeblogMonthSelectionContext extends WeblogSelectionContext { public String year; public String month; public WeblogMonthSelectionContext(String year, String month) { this.year = year; this.month = month; } } public static class WeblogCategorySelectionContext extends WeblogSelectionContext { public String code; public WeblogCategorySelectionContext(String code) { this.code = code; } } public WeblogSelectionContext wsc; 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 Element headerNode; 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 ent; public Context(Document doc) { this.doc = doc; this.gc = new GeneralContext(); } public Context clone() { try { return (Context) super.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } }