summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/Context.java
blob: 70c684a91ac67fd5ef2a9de82b7cea1a0283c91c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package org.madore.damlengine;

import java.util.ArrayList;
import java.util.TreeSet;
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<String> translations;
	public StringBuffer commentsJSParam;
    }

    public GeneralContext gc;

    public static abstract class WeblogSelectionContext {
	public TreeSet<Integer> sel;
	public ArrayList<String> 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 static class WeblogRecentSelectionContext
	extends WeblogSelectionContext {
	public int count;
	public WeblogRecentSelectionContext(int count) {
	    this.count = count;
	}
    }

    public static class WeblogSingleSelectionContext
	extends WeblogSelectionContext {
	public int number;
	public WeblogSingleSelectionContext(int number) {
	    this.number = number;
	}
    }

    public WeblogSelectionContext wsc;

    public static class DynamicContext {
	public long modTime;
    }

    public DynamicContext dc;

    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 String specialName;
	public ArrayList<String> catList;
	public Element headerNode;
	public Element headlinkNode;
	public Element mainDivNode;
	public EntryContext(String year, String month, String day,
			    String number, String dow, String specialName,
			    ArrayList<String> catList) {
	    this.year = year;  this.month = month;  this.day = day;
	    this.yandm = year+"-"+month;
	    this.date = yandm+"-"+day;
	    this.number = number;  this.dow = dow;
	    this.specialName = specialName;
	    this.catList = catList;
	}
    }

    public EntryContext ent;

    public boolean killA;

    public Context(Document doc) {
	this.doc = doc;
	this.gc = new GeneralContext();
	this.killA = false;
    }

    public Context clone() {
	try {
	    return (Context) super.clone();
	} catch (CloneNotSupportedException e) {
	    throw new RuntimeException(e);
	}
    }

}