diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document')
10 files changed, 0 insertions, 1209 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMAttr.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMAttr.java deleted file mode 100644 index ee16e15de8..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMAttr.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.w3c.dom.Attr; - - -/** - * This interface provides extensions to corresponding DOM interface to enable - * functions for source editing and incremental parsing. - * - * @plannedfor 1.0 - * - */ -public interface IDOMAttr extends IDOMNode, Attr { - - /** - * Get's the region in attribute representing the '=' sign. May or may not - * have whitespace surrounding it. - * - * @deprecated - - * ISSUE: need to change/remove to avoid exposing 'ITextRegion' - * change to offset pattern, as others. - * - * @return ITextRegion - the region representing the equals sign, or null - * if their is no equals sign. - */ - ITextRegion getEqualRegion(); - - /** - * Gets the source location of the end of the attribute name, including - * whitespace. - * - * @return int - the source location of the end of the attribute name, - * including whitespace. - */ - int getNameRegionEndOffset(); - - /** - * Gets the source location of the start of the attribute name. - * - * @return int - the source location of the start of the attribute name. - */ - int getNameRegionStartOffset(); - - - /** - * Gets the text associated with the attribute name. - * - * @return String - the text associated with the attribute name. - */ - String getNameRegionText(); - - /** - * Gets the source location of the end of the attribute name, excluding - * whitespace. - * - * @return int - returns the source location of the end of the attribute - * name, excluding whitespace. - */ - int getNameRegionTextEndOffset(); - - /** - * Gets the source location of the start of the attribute value. - * - * @return int - returns the source location of the start of the attribute - * value. - * - * ISSUE: need to better spec interaction with quote marks - */ - int getValueRegionStartOffset(); - - /** - * Gets the text associated with the attribute value. - * - * @return String - returns the text associated with the attribute value. - */ - String getValueRegionText(); - - /** - * Check if Attr has a nested value (such as a JSP expression). - * - * @return true if contains a nested value, false otherwise. - */ - boolean hasNestedValue(); - - /** - * Check if Attr has only name but not equal sign nor value. - * - * @return true if has only name but not equal sign nor value. - */ - boolean hasNameOnly(); - - /** - * Returns true if attribute is defined globally for document. Returns - * false if attribute is preceeded by a prefix (whether valid name space - * or not). Returns true if its owning element is a global element. - * - * @return true if attribute is defined globally for document. Returns - * false if attribute is preceeded by a prefix (whether valid name - * space or not). Returns true if its owning element is a global - * element. - */ - boolean isGlobalAttr(); - - /** - * Returns true if is xml attr - * - * ISSUE: need to figure out how to specify this one in a meaningful way. - * - * @return boolean - returns true if is xml attr - */ - boolean isXMLAttr(); - -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocument.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocument.java deleted file mode 100644 index 4d69e58301..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocument.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentType; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * This interface enables creation of DOCTYPE declaration and some DOM Level 2 - * interfaces. May be referenced but not implemented by clients. - * - * @plannedfor 1.0 - */ -public interface IDOMDocument extends Node, Document, IDOMNode { - - /** - * create comment element. tagName must be registered as comment element - * name in plugin.xml - * - * @param tagName - * the element name - * @param isJSPTag - * true if the element is JSP style comment (<%-- ... - * --%>) - * @return Element element instance - * @throws DOMException - * thrown if the element name is registered as comment element - */ - Element createCommentElement(String tagName, boolean isJSPTag) throws DOMException; - - /** - * Creates a DocumentType node - * - * ISSUE: I believe this 'name' is the one specific in doctype extension, - * need to verify. - * - * @param name - - * name of the doctype - * @return DocumentType - returns a document type node. - */ - DocumentType createDoctype(String name); - - /** - * Returns the DocumentType ID. Unlike the standard DOM approach of - * "getDocumentType().getPublicId()", this method returns the id even if - * implicit. - * - * @return the DocumentType ID - */ - String getDocumentTypeId(); - - /** - * NOT API ... needs to be removed/changed - * - * ISSUE: need to specify - * - * @deprecated - * - * @return true if is JSPDocument - * - */ - boolean isJSPDocument(); - - /** - * NOT API ... needs to be removed/changed - * - * ISSUE: need to specify - * - * @deprecated - * - */ - boolean isJSPType(); - - /** - * NOT API ... may removed/changed - * - * ISSUE: need to specify -- currently used to denote an HTML DOM document - * is XHTML - * - * @deprecated - * - */ - boolean isXMLType(); - -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocumentType.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocumentType.java deleted file mode 100644 index 602c65e07c..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocumentType.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.DocumentType; - -/** - * This interface enables setting of Public and System ID for DOCTYPE - * declaration. - * - * @plannedfor 1.0 - */ -public interface IDOMDocumentType extends IDOMNode, DocumentType { - - - /** - * Sets document type's public id, as source. - * - * @param String - - * the publicId - */ - void setPublicId(String publicId); - - /** - * Sets docment type's system id, as source. - * - * @param String - - * the systemId - */ - void setSystemId(String systemId); -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMElement.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMElement.java deleted file mode 100644 index fcd7763397..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMElement.java +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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; - -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMEntity.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMEntity.java deleted file mode 100644 index 3e22ec0587..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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 - * - *******************************************************************************/ - -package org.eclipse.wst.xml.core.internal.provisional.document; - -import org.w3c.dom.Entity; - -public interface IDOMEntity extends Entity { - - /** - * NOT IMPLEMENTED. Is defined here in preparation of DOM 3. - */ - public String getInputEncoding(); - - /** - * NOT IMPLEMENTED. Is defined here in preparation of DOM 3. - */ - public String getXmlEncoding(); - - /** - * NOT IMPLEMENTED. Is defined here in preparation of DOM 3. - */ - public String getXmlVersion(); -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMImplementation.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMImplementation.java deleted file mode 100644 index da73e24db4..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMImplementation.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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 - * - *******************************************************************************/ - -package org.eclipse.wst.xml.core.internal.provisional.document; - -public interface IDOMImplementation { - - /** - * NOT IMPLEMENTED. This is defined here in preparation of DOM 3. - * - * This method returns a specialized object which implements the - * specialized APIs of the specified feature and version, as specified in . - * The specialized object may also be obtained by using binding-specific - * casting methods but is not necessarily expected to, as discussed in . - * This method also allow the implementation to provide specialized - * objects which do not support the <code>DOMImplementation</code> - * interface. - * - * @param feature - * The name of the feature requested. Note that any plus sign - * "+" prepended to the name of the feature will be ignored - * since it is not significant in the context of this method. - * @param version - * This is the version number of the feature to test. - * @return Returns an object which implements the specialized APIs of the - * specified feature and version, if any, or <code>null</code> - * if there is no object which implements interfaces associated - * with that feature. If the <code>DOMObject</code> returned by - * this method implements the <code>DOMImplementation</code> - * interface, it must delegate to the primary core - * <code>DOMImplementation</code> and not return results - * inconsistent with the primary core - * <code>DOMImplementation</code> such as - * <code>hasFeature</code>, <code>getFeature</code>, etc. - * @see DOM Level 3 - */ - public Object getFeature(String feature, String version); - -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMModel.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMModel.java deleted file mode 100644 index 3effc7ef0f..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMModel.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.xml.core.internal.document.XMLModelNotifier; - -/** - * Provides means to get the XMLModel form of IStrucutredModel. Not to be - * implemented or extended by clients. - * - * @plannedfor 1.0 - */ -public interface IDOMModel extends IStructuredModel { - - /** - * Returns the DOM Document. - * - * @return the DOM Document. - */ - IDOMDocument getDocument(); - - /** - * - * Returns an source generator appropriate for this model. - * - * @return the source generator - */ - ISourceGenerator getGenerator(); - - /** - * NOT CLIENT API - * - * Returns an XMLModelNotifier. Clients should not use. - * - * ISSUE: should be "internalized". - * - */ - XMLModelNotifier getModelNotifier(); - - /** - * NOT CLIENT API - * - * Sets the model notifier Clients should not use. - * - * ISSUE: need to review with legacy clients. - */ - void setModelNotifier(XMLModelNotifier notifier); -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMNode.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMNode.java deleted file mode 100644 index ed8875f671..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMNode.java +++ /dev/null @@ -1,272 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.eclipse.wst.sse.core.internal.provisional.INodeNotifier; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException; -import org.w3c.dom.DOMException; -import org.w3c.dom.Node; - -/** - * This interface describes the extended functionality of our source-oriented - * DOM. First, our nodes extend the w3c Node interface, IndexedRegion, and - * INodeNotifier. Plus, has the extra methods called out here. - * - * ISSUE: the 'read-only' API should be broken out in their own interface - * - * @plannedfor 1.0 - * - */ -public interface IDOMNode extends IndexedRegion, INodeNotifier, Node { - - /** - * Gets the last structured document region of this node. - * - * ISSUE: need to resolve getEnd/getLast confusion. - * - * @return IStructuredDocumentRegion - returns the last structured - * document region associated with - */ - IStructuredDocumentRegion getEndStructuredDocumentRegion(); - - /** - * Gets the first structured document region of this node. - * - * ISSUE: need to resolve getFirst/getStart confusion - * - * @return the first structured document region of this node. - */ - IStructuredDocumentRegion getFirstStructuredDocumentRegion(); - - /** - * Gets the last structured document region of this node. - * - * ISSUE: need to resolve getEnd/getLast confusion. - * - * @return IStructuredDocumentRegion - returns the last structured - * document region associated with - */ - IStructuredDocumentRegion getLastStructuredDocumentRegion(); - - /** - * Returns the model associated with this node. Returns null if not part - * of an active model. - * - * @return IDOMModel - returns the IDOMModel this node is part of. - */ - IDOMModel getModel(); - - /** - * Get's the region representing the name of this node - * - * ISSUE: only implemented/used at attribute and DTDNodes -- should move. - * - * @return ITextRegion - returns the ITextRegion associated with this - * Node. - * - * @deprecated - */ - ITextRegion getNameRegion(); - - /** - * Returns the literal source representing this node in source document. - * - * ISSUE: need to fix implementation to match. - * - * @return the literal source representing this node in source document. - */ - String getSource(); - - /** - * Gets the first structured document region of this node. - * - * ISSUE: need to resolve getFirst/getStart confusion - * - * @return the first structured document region of this node. - */ - IStructuredDocumentRegion getStartStructuredDocumentRegion(); - - /** - * Returns the structured document that underlies this node's model. - * - * Returns null if this node is not actively part of a source document. In - * contrast, in the pure DOM world, "owning document" is not null even - * after a node is deleted from the DOM. - * - * ISSUE: we need to fix our implementation to match this spec. - * - * @return the structured document. - */ - IStructuredDocument getStructuredDocument(); - - /** - * Get's the region representing the value of this node if only one - * ITextRegion, null otherwise. - * - * ISSUE: only implemented/used at attribute level, move "down". - * - * @return ITextRegion - returns the ITextRegion associated with this - * Node. - * - * @deprecated - */ - ITextRegion getValueRegion(); - - /** - * Returns a string representing the source of this node, but with - * character enties converted (e.g. < is converted to '<'). - * - * ISSUE: need to better spec extent of this conversion, we may not know - * all character entities. - * - * ISSUE: need to fix implementation to match spec. - * - * @return String - get's the source of this Node. - */ - String getValueSource(); - - /** - * Used to know read-only state of children. - * - * @return boolean Whether children of the element can be appended or - * removed. - */ - boolean isChildEditable(); - - /** - * Returns true if tag is closed in source. - * - * In our source orient DOM we sometimes end a Node without it being - * explicitly closed in source. - * - * @return boolean - true if node is closed - */ - boolean isClosed(); - - /** - * Returns true if this node can contain children. - * - * @return boolean - true if this node can contain children. - */ - boolean isContainer(); - - /** - * Used to know read-only state of data. - * - */ - boolean isDataEditable(); - - /** - * Set's readonly state of children - * - */ - void setChildEditable(boolean editable); - - /** - * Set's readonly state of data - * - */ - void setDataEditable(boolean editable); - - /** - * Sets readonly state of data - * - * faster approach to set read-only state. - */ - void setEditable(boolean editable, boolean deep); - - /** - * Sets the specified raw source to the Text node. Throws - * InvalidCharacterException when the specified raw source includes - * invalid characters, such as, ' <', '>' and '&'. Valid character - * entities, such as, "&lt;", are accepted. - */ - void setSource(String source) throws InvalidCharacterException; - - /** - * Sets the specified raw source to the Text or Attr node's value. When - * the specified raw source includes invalid characters, such as, ' <', - * '>' and '&', converts them. Valid character entities, such as, - * "&lt;", are accepted. - */ - void setValueSource(String source); - - - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public short compareDocumentPosition(Node other) throws DOMException; - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public String getBaseURI(); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public Object getFeature(String feature, String version); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public String getTextContent() throws DOMException; - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public Object getUserData(String key); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public boolean isDefaultNamespace(String namespaceURI); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public boolean isEqualNode(Node arg); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public boolean isSameNode(Node other); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public String lookupNamespaceURI(String prefix); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public String lookupPrefix(String namespaceURI); - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public void setTextContent(String textContent) throws DOMException; - - - /** - * NOT IMPLEMENTED, is defined here in preparation of DOM Level 3 - */ - public boolean isId(); -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMText.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMText.java deleted file mode 100644 index efb3a5f0f4..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMText.java +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.DOMException; -import org.w3c.dom.Text; - -/** - * This interface provides extensions to corresponding DOM interface to enable - * functions for source editing and incremental parsing. - * - * @plannedfor 1.0 - * - */ -public interface IDOMText extends IDOMNode, Text { - - /** - * NOT API - can be eliminated or moved to ltk level - * - * Appends the content of the text node - * - * @param text - - * the Text to append. - */ - void appendText(Text text); - - /** - * NOT API - can be eliminated or moved to ltk level - * - * Returns true if is not valid. - */ - boolean isInvalid(); - - /** - * Returns true if is entirely white space. - * - * This is intened to be better performing that all clients getting the - * source, and checking themselves. - * - * ISSUE: need to clarify if implementation is pure to "white space" as - * per DOM spec? Here is the DOM spec: - * - * Returns whether this text node contains <a - * href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204#infoitem.character'> - * element content whitespace</a>, often abusively called "ignorable - * whitespace". The text node is determined to contain whitespace in - * element content during the load of the document or if validation occurs - * while using <code>Document.normalizeDocument()</code>. - * - * @see DOM Level 3 - * - * @return true if is entirely white space. - */ - - public boolean isElementContentWhitespace(); - - /** - * NOT YET IMPLEMTENTED but exists here interface in preparation for DOM3 - * - * Returns all text of <code>Text</code> nodes logically-adjacent text - * nodes to this node, concatenated in document order. <br> - * For instance, in the example below <code>wholeText</code> on the - * <code>Text</code> node that contains "bar" returns "barfoo", while on - * the <code>Text</code> node that contains "foo" it returns "barfoo". - * - * @see DOM Level 3 - * - */ - public String getWholeText(); - - /** - * NOT YET IMPLEMTENTED but exists here interface in preparation for DOM3 - * - * Replaces the text of the current node and all logically-adjacent text - * nodes with the specified text. All logically-adjacent text nodes are - * removed including the current node unless it was the recipient of the - * replacement text. <br> - * This method returns the node which received the replacement text. The - * returned node is: - * <ul> - * <li><code>null</code>, when the replacement text is the empty - * string; </li> - * <li>the current node, except when the current node is read-only; </li> - * <li> a new <code>Text</code> node of the same type ( - * <code>Text</code> or <code>CDATASection</code>) as the current - * node inserted at the location of the replacement. </li> - * </ul> - * <br> - * For instance, in the above example calling - * <code>replaceWholeText</code> on the <code>Text</code> node that - * contains "bar" with "yo" in argument results in the following: <br> - * Where the nodes to be removed are read-only descendants of an - * <code>EntityReference</code>, the <code>EntityReference</code> - * must be removed instead of the read-only nodes. If any - * <code>EntityReference</code> to be removed has descendants that are - * not <code>EntityReference</code>, <code>Text</code>, or - * <code>CDATASection</code> nodes, the <code>replaceWholeText</code> - * method must fail before performing any modification of the document, - * raising a <code>DOMException</code> with the code - * <code>NO_MODIFICATION_ALLOWED_ERR</code>. <br> - * For instance, in the example below calling - * <code>replaceWholeText</code> on the <code>Text</code> node that - * contains "bar" fails, because the <code>EntityReference</code> node - * "ent" contains an <code>Element</code> node which cannot be removed. - * - * @param content - * The content of the replacing <code>Text</code> node. - * @return The <code>Text</code> node created with the specified - * content. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if one of the - * <code>Text</code> nodes being replaced is readonly. - * @see DOM Level 3 - */ - public Text replaceWholeText(String content) throws DOMException; - -} diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/ISourceGenerator.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/ISourceGenerator.java deleted file mode 100644 index 473048cd52..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/ISourceGenerator.java +++ /dev/null @@ -1,201 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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.CDATASection; -import org.w3c.dom.Comment; -import org.w3c.dom.DocumentType; -import org.w3c.dom.Element; -import org.w3c.dom.EntityReference; -import org.w3c.dom.Node; -import org.w3c.dom.ProcessingInstruction; -import org.w3c.dom.Text; - -/** - * - * ISourceGenerator allows DOM models to generate source appropriate for their - * parameter, relative to the model that provides the source generator. - * - */ - -public interface ISourceGenerator { - - /** - * Generate attribute name. - * - * @param attr - - * the Attr - * @return String - the string generated - */ - String generateAttrName(Attr attr); - - /** - * generateAttrValue - * - * @param attr - - * the Attr - * @return String - the string generated - */ - String generateAttrValue(Attr attr); - - /** - * generateAttrValue - * - * @param attr - - * the Attr - * @param char - - * the type of quote desired (' or "). - * @return String - the string generated - */ - String generateAttrValue(Attr attr, char quote); - - /** - * generateAttrValue - * - * @param value - * the String value - * @param char - - * the type of quote desired (' or "). - * @return String - the string generated - */ - String generateAttrValue(String value, char quote); - - /** - * generateCDATASection method - * - * @param comment - * CDATASection - * @return String - the string generated - */ - String generateCDATASection(CDATASection cdata); - - /** - * generateChild method - * - * @return String - * @param Node - * @return String - the string generated - */ - String generateChild(Node parentNode); - - /** - * generateCloseTag - * - * @param node - - * the Node - * @return String - the string generated - */ - String generateCloseTag(Node node); - - /** - * generateComment method - * - * @param comment - * org.w3c.dom.Comment - * @return String - the string generated - */ - String generateComment(Comment comment); - - /** - * generateDoctype method - * - * @param docType - * DocumentType - * @return String - the string generated - */ - String generateDoctype(DocumentType docType); - - /** - * generateElement method - * - * @param element - - * Element - * @return String - the string generated - */ - String generateElement(Element element); - - /** - * generateEndTag method - * - * @param element - - * Element - * @return String - the string generated - */ - String generateEndTag(Element element); - - /** - * generateEntityRef method - * - * @param entityRef - * EntityReference - * @return String - the string generated - */ - String generateEntityRef(EntityReference entityRef); - - /** - * generatePI method - * - * @param pi - - * ProcessingInstruction - * @return String - the string generated - */ - String generatePI(ProcessingInstruction pi); - - /** - * generateSource method - * - * @param node - - * the Node - * @return String - the string generated - */ - String generateSource(Node node); - - /** - * generateStartTag method - * - * @param element - * Element - * @return String - the string generated - */ - String generateStartTag(Element element); - - /** - * Generate tag name. - * - * @param element - - * element - * @return String - the string generated - */ - String generateTagName(Element element); - - /** - * generateText method - * - * @param text - - * the Text - * @return String - the string generated - */ - String generateText(Text text); - - /** - * generate text data - * - * @param text - - * the Text - * @param data - - * the data - * @return String - the string generated - */ - String generateTextData(Text text, String data); -} |