Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: c1a6feb7ba20c23b5562ec37a57f557614ec5553 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*******************************************************************************
 * Copyright (c) 2001, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Jens Lukowski/Innoopract - initial renaming/restructuring
 *     
 *******************************************************************************/
package org.eclipse.wst.xml.core.internal.provisional.document;



import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;

/**
 * This interface provides extensions to corresponding DOM interface to enable
 * functions for source editing and incremental parsing.
 * 
 * @plannedfor 1.0
 * 
 */
public interface IDOMElement extends IDOMNode, Element {

	/**
	 * Retuns the start offset of the end tag.
	 * 
	 * ISSUE: need to sort out need for this
	 * 
	 * @return int - the start offset of the end tag.
	 */
	int getEndStartOffset();

	/**
	 * Returns the end offset of the
	 * 
	 * ISSUE: need to sort out need for this
	 * 
	 * @return int - the end offset of the start tag.
	 */
	int getStartEndOffset();

	/**
	 * Returns true if has an end tag.
	 * 
	 * In our source-oriented DOM, sometimes Elements are "ended", even
	 * without an explicit end tag in the source.
	 * 
	 * @return true if has an end tag.
	 */
	boolean hasEndTag();

	/**
	 * returns true if has a start tag.
	 * 
	 * In our source-oriented DOM, a lone end tag will cause a node to be
	 * created in the tree, unlike well-formed-only DOMs.
	 * 
	 * @return true if has a start tag.
	 */
	boolean hasStartTag();

	/**
	 * returns true if this element is a comment element
	 * 
	 * @return true if this element is a comment element
	 */
	boolean isCommentTag();

	/**
	 * isEmptyTag method
	 * 
	 * @return boolean - true if is empty tag, false otherwise
	 */
	boolean isEmptyTag();

	/**
	 * Returns true if floating end tag.
	 * 
	 * @return true if floating end tag.
	 */
	boolean isEndTag();

	/**
	 * Returns true for "global tag" (basically, without prefix)
	 * 
	 * @return true for "global tag" (basically, without prefix)
	 */
	boolean isGlobalTag();

	/**
	 * Returns true for no start and the end tags in source.
	 * 
	 * Provided for some very special cases when, for example, and HTML tag is
	 * assumed in an HTML document that does not have a literal HTML tag.
	 * 
	 * ISSUE: check with clients to see if still needed
	 * 
	 * @return true or no start and the end tags in source.
	 */
	boolean isImplicitTag();

	/**
	 * isJSPTag method
	 * 
	 * @return boolean
	 * 
	 * ISSUE: change to isContainerLanguageTag(String type);
	 */
	boolean isJSPTag();

	/**
	 * Returns true if start tag is closed.
	 * 
	 * @return true if start tag is closed.
	 */
	boolean isStartTagClosed();

	/**
	 * returns true if is xml tag
	 * 
	 * ISSUE: need to spec this better.
	 * 
	 * @return true if is xml tag
	 */
	boolean isXMLTag();

	/**
	 * NOT CLIENT API
	 * 
	 * notifyEndTagChanged
	 * 
	 */
	void notifyEndTagChanged();

	/**
	 * NOT CLIENT API
	 * 
	 * notifyStartTagChanged
	 * 
	 */
	void notifyStartTagChanged();

	/**
	 * NOT CLIENT API
	 * 
	 * Signify that this tag is a comment
	 * 
	 * For use only by parsers.
	 * 
	 */
	void setCommentTag(boolean isCommentTag);

	/**
	 * NOT CLIENT API
	 * 
	 * Signify that this tag is an empty tag
	 * 
	 * For use only by parsers
	 */
	void setEmptyTag(boolean isEmptyTag);

	/**
	 * NOT CLIENT API
	 * 
	 * Signify that this tag is a JSP tag
	 * 
	 * For use only by parsers
	 * 
	 * ISSUE: I have had one non-parsing client who has had to use this ...
	 * need to check
	 * 
	 */
	void setJSPTag(boolean isJSPTag);

	/**
	 * NOT IMPLEMENTED. Is defined here in preparation for DOM 3.
	 */
	public void setIdAttribute(String name, boolean isId);

	/**
	 * NOT IMPLEMENTED. Is defined here in preparation for DOM 3.
	 */
	public void setIdAttributeNS(String namespaceURI, String localName, boolean isId);

	/**
	 * NOT IMPLEMENTED. Is defined here in preparation for DOM 3.
	 */
	public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException;

}

Back to the top