blob: 9b69510a8823a888f9f18998b2b195e785a83076 (
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
|
/*
* Created on Saturday, May 15 2010 17:07
*/
package com.jogamp.hungryharry;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* Hungry Harrie's configuration.
* @author Michael Bien
*/
@XmlType(name = "")
@XmlRootElement(name = "config")
public class Config {
@XmlElement(required = true)
public final List<Feed> feed;
@XmlElement(required = true)
public final List<Template> template;
@XmlElement(required = true)
public final Planet planet;
public Config() {
feed = null;
template = null;
planet = null;
}
@XmlType
public static class Feed {
@XmlAttribute
public final String name;
@XmlAttribute
public final String url;
public Feed() {
name = null;
url = null;
}
}
@XmlType
public static class Template {
@XmlAttribute
public final String keyword;
@XmlAttribute(name="idpattern")
public final String idpattern;
@XmlValue
public final String text;
public Template() {
keyword = null;
text = null;
idpattern = null;
}
}
@XmlType
public static class Planet {
@XmlAttribute
public final String title;
@XmlAttribute
public final String description;
@XmlAttribute
public final String author;
@XmlAttribute
public final String link;
@XmlElement(name="feed")
public final List<String> feeds;
@XmlElement(name="template")
public final String templatePath;
public Planet() {
title = null;
description = null;
author = null;
link = null;
feeds = null;
templatePath = null;
}
}
}
|