KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > schema > model > Choice


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8
9  * 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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.schema.model;
21
22 import java.util.Collection JavaDoc;
23
24 /**
25  * This interface represents a choice outside a definition of a group.
26  * @author Chris Webster
27  */

28 public interface Choice extends ComplexExtensionDefinition,
29 ComplexTypeDefinition, SequenceDefinition, LocalGroupDefinition, SchemaComponent {
30         public static final String JavaDoc MAX_OCCURS_PROPERTY = "maxOccurs"; // NOI18N
31
public static final String JavaDoc MIN_OCCURS_PROPERTY = "minOccurs"; // NOI18N
32
public static final String JavaDoc CHOICE_PROPERTY = "choice"; // NOI18N
33
public static final String JavaDoc GROUP_REF_PROPERTY = "groupReference"; // NOI18N
34
public static final String JavaDoc SEQUENCE_PROPERTY = "sequence"; // NOI18N
35
public static final String JavaDoc ANY_PROPERTY = "any"; // NOI18N
36
public static final String JavaDoc LOCAL_ELEMENT_PROPERTY = "localElememnt"; // NOI18N
37
public static final String JavaDoc ELEMENT_REFERENCE_PROPERTY = "elementReference"; // NOI18N
38

39     Collection JavaDoc<Choice> getChoices();
40     void addChoice(Choice choice);
41     void removeChoice(Choice choice);
42     
43     Collection JavaDoc<GroupReference> getGroupReferences();
44     void addGroupReference(GroupReference ref);
45     void removeGroupReference(GroupReference ref);
46     
47     Collection JavaDoc<Sequence> getSequences();
48     void addSequence(Sequence seq);
49     void removeSequence(Sequence seq);
50     
51     Collection JavaDoc<AnyElement> getAnys();
52     void addAny(AnyElement any);
53     void removeAny(AnyElement any);
54     
55     Collection JavaDoc<LocalElement> getLocalElements();
56     void addLocalElement(LocalElement element);
57     void removeLocalElement(LocalElement element);
58     
59     Collection JavaDoc<ElementReference> getElementReferences();
60     void addElementReference(ElementReference element);
61     void removeElementReference(ElementReference element);
62     
63     /**
64      * return ability to set min and max occurs if appropriate, null
65      * otherwise. This method
66      * should only be used after insertion into the model.
67      */

68     public Cardinality getCardinality();
69     
70 }
71
Popular Tags