KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ant > internal > ui > dtd > IElement


1 /*******************************************************************************
2  * Copyright (c) 2002, 2005 Object Factory Inc.
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  * Object Factory Inc. - Initial implementation
10  * IBM Corporation - fix for Bug 40951
11  *******************************************************************************/

12 package org.eclipse.ant.internal.ui.dtd;
13
14 import java.util.Map JavaDoc;
15
16 /**
17  * IElement interface.
18  * @author Bob Foster
19  */

20 public interface IElement extends IAtom {
21
22     /**
23      * @return true if the element has been referenced in a schema but is not
24      * yet defined.
25      */

26     public boolean isUndefined();
27     
28     /**
29      * @return true if element model is <code>"(#PCDATA)"</code>.
30      */

31     public boolean isText();
32     
33     /**
34      * @return true if element model is EMPTY.
35      */

36     public boolean isEmpty();
37     
38     /**
39      * @return true if element model is ANY.
40      */

41     public boolean isAny();
42     
43     /**
44      * @return the element's content model. The content model will be empty
45      * if <code>isText()</code>, <code>isAny()</code> or <code>isEmpty()</code>.
46      * Note that the content model deals with child elements only; use
47      * <code>isMixed()</code> to see if text is also allowed.
48      */

49     public IModel getContentModel();
50     
51     /**
52      * @return the DFM corresponding to the content model. Every element
53      * has a DFM.
54      */

55     public IDfm getDfm();
56     
57     /**
58      * @return Map with attribute qname keys and IAttr values.
59      * If element has no attributes, the map is empty.
60      * Map must not be modified by caller; for performance reasons,
61      * it is not a copy.
62      */

63     public Map JavaDoc getAttributes();
64 }
65
Popular Tags