Commit 038b264fa6a643fe50271472685b80e7afb89333
1 parent
ccf82b5b
Added section type
Showing
11 changed files
with
206 additions
and
41 deletions
pom.xml
... | ... | @@ -47,11 +47,11 @@ |
47 | 47 | |
48 | 48 | <distributionManagement> |
49 | 49 | <repository> |
50 | - <id>deployment</id> | |
50 | + <id>zil-releases</id> | |
51 | 51 | <url>http://maven.nlp.ipipan.waw.pl/content/repositories/releases/</url> |
52 | 52 | </repository> |
53 | 53 | <snapshotRepository> |
54 | - <id>deployment</id> | |
54 | + <id>zil-snapshots</id> | |
55 | 55 | <url>http://maven.nlp.ipipan.waw.pl/content/repositories/snapshots/</url> |
56 | 56 | </snapshotRepository> |
57 | 57 | </distributionManagement> |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Adapter1.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Adapter2.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/ObjectFactory.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... | @@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlRegistry; |
14 | 14 | /** |
15 | 15 | * This object contains factory methods for each |
16 | 16 | * Java content interface and Java element interface |
17 | - * generated in the mkopec.summ.pscapi.xml package. | |
17 | + * generated in the pl.waw.ipipan.zil.summ.pscapi.xml package. | |
18 | 18 | * <p>An ObjectFactory allows you to programatically |
19 | 19 | * construct new instances of the Java representation |
20 | 20 | * for XML content. The Java representation of XML |
... | ... | @@ -30,7 +30,7 @@ public class ObjectFactory { |
30 | 30 | |
31 | 31 | |
32 | 32 | /** |
33 | - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mkopec.summ.pscapi.xml | |
33 | + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: pl.waw.ipipan.zil.summ.pscapi.xml | |
34 | 34 | * |
35 | 35 | */ |
36 | 36 | public ObjectFactory() { |
... | ... | @@ -45,6 +45,14 @@ public class ObjectFactory { |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | + * Create an instance of {@link Text.Section } | |
49 | + * | |
50 | + */ | |
51 | + public Text.Section createTextSection() { | |
52 | + return new Text.Section(); | |
53 | + } | |
54 | + | |
55 | + /** | |
48 | 56 | * Create an instance of {@link Summaries } |
49 | 57 | * |
50 | 58 | */ |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/SectionString.java
0 → 100644
1 | +// | |
2 | +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 | |
3 | +// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | |
4 | +// Any modifications to this file will be lost upon recompilation of the source schema. | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | +// | |
7 | + | |
8 | + | |
9 | +package pl.waw.ipipan.zil.summ.pscapi.xml; | |
10 | + | |
11 | +import javax.xml.bind.annotation.XmlEnum; | |
12 | +import javax.xml.bind.annotation.XmlEnumValue; | |
13 | +import javax.xml.bind.annotation.XmlType; | |
14 | + | |
15 | + | |
16 | +/** | |
17 | + * <p>Java class for SectionString. | |
18 | + * | |
19 | + * <p>The following schema fragment specifies the expected content contained within this class. | |
20 | + * <p> | |
21 | + * <pre> | |
22 | + * <simpleType name="SectionString"> | |
23 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> | |
24 | + * <enumeration value="Ekonomia"/> | |
25 | + * <enumeration value="Kraj"/> | |
26 | + * <enumeration value="Kultura"/> | |
27 | + * <enumeration value="Nauka i Technika"/> | |
28 | + * <enumeration value="Prawo"/> | |
29 | + * <enumeration value="Publicystyka, Opinie"/> | |
30 | + * <enumeration value="Sport"/> | |
31 | + * </restriction> | |
32 | + * </simpleType> | |
33 | + * </pre> | |
34 | + * | |
35 | + */ | |
36 | +@XmlType(name = "SectionString") | |
37 | +@XmlEnum | |
38 | +public enum SectionString { | |
39 | + | |
40 | + @XmlEnumValue("Ekonomia") | |
41 | + EKONOMIA("Ekonomia"), | |
42 | + @XmlEnumValue("Kraj") | |
43 | + KRAJ("Kraj"), | |
44 | + @XmlEnumValue("Kultura") | |
45 | + KULTURA("Kultura"), | |
46 | + @XmlEnumValue("Nauka i Technika") | |
47 | + NAUKA_I_TECHNIKA("Nauka i Technika"), | |
48 | + @XmlEnumValue("Prawo") | |
49 | + PRAWO("Prawo"), | |
50 | + @XmlEnumValue("Publicystyka, Opinie") | |
51 | + PUBLICYSTYKA_OPINIE("Publicystyka, Opinie"), | |
52 | + @XmlEnumValue("Sport") | |
53 | + SPORT("Sport"); | |
54 | + private final String value; | |
55 | + | |
56 | + SectionString(String v) { | |
57 | + value = v; | |
58 | + } | |
59 | + | |
60 | + public String value() { | |
61 | + return value; | |
62 | + } | |
63 | + | |
64 | + public static SectionString fromValue(String v) { | |
65 | + for (SectionString c: SectionString.values()) { | |
66 | + if (c.value.equals(v)) { | |
67 | + return c; | |
68 | + } | |
69 | + } | |
70 | + throw new IllegalArgumentException(v); | |
71 | + } | |
72 | + | |
73 | +} | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Span.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Spans.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Summaries.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Summary.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... |
src/main/java/pl/waw/ipipan/zil/summ/pscapi/xml/Text.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 |
3 | 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | -// Generated on: 2015.07.22 at 12:56:02 PM CEST | |
5 | +// Generated on: 2015.09.26 at 07:48:06 PM CEST | |
6 | 6 | // |
7 | 7 | |
8 | 8 | |
... | ... | @@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlElement; |
15 | 15 | import javax.xml.bind.annotation.XmlRootElement; |
16 | 16 | import javax.xml.bind.annotation.XmlSchemaType; |
17 | 17 | import javax.xml.bind.annotation.XmlType; |
18 | +import javax.xml.bind.annotation.XmlValue; | |
18 | 19 | import javax.xml.datatype.XMLGregorianCalendar; |
19 | 20 | |
20 | 21 | |
... | ... | @@ -31,17 +32,13 @@ import javax.xml.datatype.XMLGregorianCalendar; |
31 | 32 | * <element name="date" type="{http://www.w3.org/2001/XMLSchema}date"/> |
32 | 33 | * <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/> |
33 | 34 | * <element name="section"> |
34 | - * <simpleType> | |
35 | - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> | |
36 | - * <enumeration value="Ekonomia"/> | |
37 | - * <enumeration value="Kraj"/> | |
38 | - * <enumeration value="Kultura"/> | |
39 | - * <enumeration value="Nauka i Technika"/> | |
40 | - * <enumeration value="Prawo"/> | |
41 | - * <enumeration value="Publicystyka, Opinie"/> | |
42 | - * <enumeration value="Sport"/> | |
43 | - * </restriction> | |
44 | - * </simpleType> | |
35 | + * <complexType> | |
36 | + * <simpleContent> | |
37 | + * <extension base="<>SectionString"> | |
38 | + * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /> | |
39 | + * </extension> | |
40 | + * </simpleContent> | |
41 | + * </complexType> | |
45 | 42 | * </element> |
46 | 43 | * <element name="authors" type="{http://www.w3.org/2001/XMLSchema}string"/> |
47 | 44 | * <element name="body" type="{http://www.w3.org/2001/XMLSchema}string"/> |
... | ... | @@ -73,7 +70,7 @@ public class Text { |
73 | 70 | @XmlElement(required = true) |
74 | 71 | protected String title; |
75 | 72 | @XmlElement(required = true) |
76 | - protected String section; | |
73 | + protected Text.Section section; | |
77 | 74 | @XmlElement(required = true) |
78 | 75 | protected String authors; |
79 | 76 | @XmlElement(required = true) |
... | ... | @@ -135,10 +132,10 @@ public class Text { |
135 | 132 | * |
136 | 133 | * @return |
137 | 134 | * possible object is |
138 | - * {@link String } | |
135 | + * {@link Text.Section } | |
139 | 136 | * |
140 | 137 | */ |
141 | - public String getSection() { | |
138 | + public Text.Section getSection() { | |
142 | 139 | return section; |
143 | 140 | } |
144 | 141 | |
... | ... | @@ -147,10 +144,10 @@ public class Text { |
147 | 144 | * |
148 | 145 | * @param value |
149 | 146 | * allowed object is |
150 | - * {@link String } | |
147 | + * {@link Text.Section } | |
151 | 148 | * |
152 | 149 | */ |
153 | - public void setSection(String value) { | |
150 | + public void setSection(Text.Section value) { | |
154 | 151 | this.section = value; |
155 | 152 | } |
156 | 153 | |
... | ... | @@ -250,4 +247,83 @@ public class Text { |
250 | 247 | this.id = value; |
251 | 248 | } |
252 | 249 | |
250 | + | |
251 | + /** | |
252 | + * <p>Java class for anonymous complex type. | |
253 | + * | |
254 | + * <p>The following schema fragment specifies the expected content contained within this class. | |
255 | + * | |
256 | + * <pre> | |
257 | + * <complexType> | |
258 | + * <simpleContent> | |
259 | + * <extension base="<>SectionString"> | |
260 | + * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /> | |
261 | + * </extension> | |
262 | + * </simpleContent> | |
263 | + * </complexType> | |
264 | + * </pre> | |
265 | + * | |
266 | + * | |
267 | + */ | |
268 | + @XmlAccessorType(XmlAccessType.FIELD) | |
269 | + @XmlType(name = "", propOrder = { | |
270 | + "value" | |
271 | + }) | |
272 | + public static class Section { | |
273 | + | |
274 | + @XmlValue | |
275 | + protected SectionString value; | |
276 | + @XmlAttribute(name = "type") | |
277 | + protected String type; | |
278 | + | |
279 | + /** | |
280 | + * Gets the value of the value property. | |
281 | + * | |
282 | + * @return | |
283 | + * possible object is | |
284 | + * {@link SectionString } | |
285 | + * | |
286 | + */ | |
287 | + public SectionString getValue() { | |
288 | + return value; | |
289 | + } | |
290 | + | |
291 | + /** | |
292 | + * Sets the value of the value property. | |
293 | + * | |
294 | + * @param value | |
295 | + * allowed object is | |
296 | + * {@link SectionString } | |
297 | + * | |
298 | + */ | |
299 | + public void setValue(SectionString value) { | |
300 | + this.value = value; | |
301 | + } | |
302 | + | |
303 | + /** | |
304 | + * Gets the value of the type property. | |
305 | + * | |
306 | + * @return | |
307 | + * possible object is | |
308 | + * {@link String } | |
309 | + * | |
310 | + */ | |
311 | + public String getType() { | |
312 | + return type; | |
313 | + } | |
314 | + | |
315 | + /** | |
316 | + * Sets the value of the type property. | |
317 | + * | |
318 | + * @param value | |
319 | + * allowed object is | |
320 | + * {@link String } | |
321 | + * | |
322 | + */ | |
323 | + public void setType(String value) { | |
324 | + this.type = value; | |
325 | + } | |
326 | + | |
327 | + } | |
328 | + | |
253 | 329 | } |
... | ... |
src/main/resources/schema/schema.xsd
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
3 | + <xs:simpleType name="SectionString"> | |
4 | + <xs:restriction base="xs:string"> | |
5 | + <xs:enumeration value="Ekonomia" /> | |
6 | + <xs:enumeration value="Kraj" /> | |
7 | + <xs:enumeration value="Kultura" /> | |
8 | + <xs:enumeration value="Nauka i Technika" /> | |
9 | + <xs:enumeration value="Prawo" /> | |
10 | + <xs:enumeration value="Publicystyka, Opinie" /> | |
11 | + <xs:enumeration value="Sport" /> | |
12 | + </xs:restriction> | |
13 | + </xs:simpleType> | |
14 | + | |
3 | 15 | <xs:element name='text'> |
4 | 16 | <xs:complexType> |
5 | 17 | <xs:sequence> |
... | ... | @@ -8,24 +20,20 @@ |
8 | 20 | <xs:element name='title' type='xs:string' minOccurs='1' |
9 | 21 | maxOccurs='1' /> |
10 | 22 | <xs:element name='section' minOccurs='1' maxOccurs='1'> |
11 | - <xs:simpleType> | |
12 | - <xs:restriction base="xs:string"> | |
13 | - <xs:enumeration value="Ekonomia" /> | |
14 | - <xs:enumeration value="Kraj" /> | |
15 | - <xs:enumeration value="Kultura" /> | |
16 | - <xs:enumeration value="Nauka i Technika" /> | |
17 | - <xs:enumeration value="Prawo" /> | |
18 | - <xs:enumeration value="Publicystyka, Opinie" /> | |
19 | - <xs:enumeration value="Sport" /> | |
20 | - </xs:restriction> | |
21 | - </xs:simpleType> | |
23 | + <xs:complexType> | |
24 | + <xs:simpleContent> | |
25 | + <xs:extension base="SectionString"> | |
26 | + <xs:attribute name='type' type='xs:string' /> | |
27 | + </xs:extension> | |
28 | + </xs:simpleContent> | |
29 | + </xs:complexType> | |
22 | 30 | </xs:element> |
23 | 31 | <xs:element name='authors' type='xs:string' minOccurs='1' |
24 | 32 | maxOccurs='1' /> |
25 | 33 | <xs:element name='body' type='xs:string' minOccurs='1' |
26 | 34 | maxOccurs='1' /> |
27 | - <xs:element name='summaries' type='Summaries' | |
28 | - minOccurs='0' maxOccurs='1' /> | |
35 | + <xs:element name='summaries' type='Summaries' minOccurs='0' | |
36 | + maxOccurs='1' /> | |
29 | 37 | </xs:sequence> |
30 | 38 | <xs:attribute name='id' type='xs:string' /> |
31 | 39 | </xs:complexType> |
... | ... |