KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ischema > ISchemaCompositor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.ischema;
12
13 /**
14  * Compositor is a container that can contain other compositors or
15  * references to element defined at the global scope. Compositors
16  * are used to recursively define content model for the type.
17  * Compositor kind (all, choice, sequence or group) defines
18  * how to interpret its children.
19  */

20 public interface ISchemaCompositor extends ISchemaObject, ISchemaRepeatable {
21     /**
22      * Indicates the root parent of the compositor.
23      */

24     public static final int ROOT = -1;
25     /**
26      * Indicates that the children can be in any order and cardinality.
27      */

28     public static final int ALL = 0;
29     /**
30      * Indicates that an only one of the compositor's children can
31      * appear at this location (DTD eq: "|")
32      */

33     public static final int CHOICE = 1;
34     /**
35      * Indicates that the children must appear in sequence in the schema documents (DTD eq: "," )
36      */

37     public static final int SEQUENCE = 2;
38     /**
39      * Indicates that this compositor simply serves as a group (DTD eq: "()" )
40      */

41     public static final int GROUP = 3;
42     /**
43      * Keyword table for compositors.
44      */

45     public static final String JavaDoc[] kindTable =
46         { "all", "choice", "sequence", "group" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
47
/**
48  * Returns the number of children of this compositor.
49  * @return number of compositor children
50  */

51 public int getChildCount();
52 /**
53  * Returns children of this compositor.
54  * @return compositor children
55  */

56 public ISchemaObject[] getChildren();
57 /**
58  * Returns a flag that defines how the children of this compositors should be
59  * treated when computing type grammar (one of ALL, CHOICE, GROUP, SEQUENCE).
60  * @return compositor kind value
61  */

62 public int getKind();
63 }
64
Popular Tags