01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.xslt.model;
21:
22: import java.util.List;
23:
24: /**
25: * <pre>
26: * <xs:element name="choose" substitutionGroup="xsl:instruction">
27: * <xs:complexType>
28: * <xs:complexContent>
29: * <xs:extension base="xsl:element-only-versioned-element-type">
30: * <xs:sequence>
31: * <xs:element ref="xsl:when" maxOccurs="unbounded"/>
32: * <xs:element ref="xsl:otherwise" minOccurs="0"/>
33: * </xs:sequence>
34: * </xs:extension>
35: * </xs:complexContent>
36: * </xs:complexType>
37: * </xs:element>
38: *
39: * </pre>
40: * @author ads
41: *
42: */
43: public interface Choose extends Instruction {
44:
45: String WHEN_PROPERTY = "when"; // NOI18N
46:
47: String OTHERWISE_PROPERTY = "otherwise"; // NOI18N
48:
49: /**
50: * @return when children for this template.
51: */
52: List<When> getWhens();
53:
54: /**
55: * Add new <code>when</code> element at <code>position</code>.
56: * @param when new when element.
57: * @param position position for new element.
58: */
59: void addWhen(When when, int position);
60:
61: /**
62: * Append new when element.
63: * @param when new when child element for appending.
64: */
65: void appendWhen(When when);
66:
67: /**
68: * Removes existing <code>when</code> child element.
69: * @param when when child element.
70: */
71: void removeWhen(When when);
72:
73: /**
74: * @return otherwise child element if any.
75: */
76: Otherwise getOtherwise();
77:
78: /**
79: * Sets new otherwise child element.
80: * @param otherwise new Otherwise element.
81: */
82: void setOtherwise(Otherwise otherwise);
83: }
|