summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/Context.java
blob: 22912a74dfd51549deddf96f286ada8c459210ec (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
package org.madore.damlengine;

import java.util.ArrayList;
import org.w3c.dom.*;

public class Context implements Cloneable {

    public final Document doc;
    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 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);
	}
    }

}