|
22 | 22 | package org.jboss.metadata.sip.spec;
|
23 | 23 |
|
24 | 24 | import javax.xml.bind.annotation.XmlElement;
|
| 25 | +import javax.xml.bind.annotation.XmlElementWrapper; |
| 26 | +import javax.xml.bind.annotation.XmlElements; |
| 27 | +import javax.xml.bind.annotation.XmlType; |
25 | 28 |
|
26 | 29 | import org.jboss.metadata.javaee.support.IdMetaDataImpl;
|
27 | 30 |
|
|
31 | 34 |
|
32 | 35 | * @version $Revision$
|
33 | 36 | */
|
| 37 | +@XmlType(name = "patternType") |
34 | 38 | public class PatternMetaData extends IdMetaDataImpl {
|
35 |
| - |
| 39 | + |
36 | 40 | private static final long serialVersionUID = 1;
|
37 | 41 | private ConditionMetaData condition;
|
38 |
| - |
| 42 | + |
39 | 43 | /**
|
40 |
| - * @param condition the condition to set |
| 44 | + * @param condition |
| 45 | + * the condition to set |
41 | 46 | */
|
| 47 | + @XmlElementWrapper(name = "condition") |
| 48 | + @XmlElements( { |
| 49 | + @XmlElement(name = "and", type = AndMetaData.class), |
| 50 | + @XmlElement(name = "contains", type = ContainsMetaData.class), |
| 51 | + @XmlElement(name = "equal", type = EqualMetaData.class), |
| 52 | + @XmlElement(name = "exists", type = ExistsMetaData.class), |
| 53 | + @XmlElement(name = "not", type = NotMetaData.class), |
| 54 | + @XmlElement(name = "or", type = OrMetaData.class), |
| 55 | + @XmlElement(name = "subdomain-of", type = SubdomainOfMetaData.class)}) |
42 | 56 | public void setCondition(ConditionMetaData condition) {
|
43 | 57 | this.condition = condition;
|
44 | 58 | }
|
| 59 | + |
45 | 60 | /**
|
46 | 61 | * @return the condition
|
47 | 62 | */
|
48 |
| - @XmlElement(name="condition") |
49 | 63 | public ConditionMetaData getCondition() {
|
50 | 64 | return condition;
|
51 | 65 | }
|
52 |
| - |
| 66 | + |
53 | 67 | }
|
0 commit comments