diff options
author | nitind | 2005-10-13 14:48:24 +0000 |
---|---|---|
committer | nitind | 2005-10-13 14:48:24 +0000 |
commit | b38802dd01b6463e7a292314a1c0a0e1819583d2 (patch) | |
tree | fc98aa759878062c589d8d5a8b5982b775d84745 /bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java | |
parent | 8b68c47583cece9b40d2ec114527ec2a7beda1b2 (diff) | |
download | webtools.sourceediting-20051113.tar.gz webtools.sourceediting-20051113.tar.xz webtools.sourceediting-20051113.zip |
This commit was manufactured by cvs2svn to create tag 'v20051113'.v20051113
Diffstat (limited to 'bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java')
-rw-r--r-- | bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java | 222 |
1 files changed, 0 insertions, 222 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java deleted file mode 100644 index c92f25f90c..0000000000 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************* - * 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.document; - - - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocumentType; -import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext; -import org.w3c.dom.DOMException; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - - -/** - * DocumentType class - */ -public class DocumentTypeImpl extends NodeImpl implements IDOMDocumentType { - private String internalSubset = null; - - private String name = null; - private String publicId = null; - private String systemId = null; - - /** - * DocumentTypeImpl constructor - */ - protected DocumentTypeImpl() { - super(); - } - - /** - * DocumentTypeImpl constructor - * - * @param that - * DocumentTypeImpl - */ - protected DocumentTypeImpl(DocumentTypeImpl that) { - super(that); - - if (that != null) { - this.name = that.name; - } - } - - /** - * cloneNode method - * - * @return org.w3c.dom.Node - * @param deep - * boolean - */ - public Node cloneNode(boolean deep) { - DocumentTypeImpl cloned = new DocumentTypeImpl(this); - return cloned; - } - - /** - * getEntities method - * - * @return org.w3c.dom.NamedNodeMap - */ - public NamedNodeMap getEntities() { - return null; - } - - /** - */ - public String getInternalSubset() { - return this.internalSubset; - } - - /** - * getName method - * - * @return java.lang.String - */ - public String getName() { - if (this.name == null) - return new String(); - return this.name; - } - - /** - * getNodeName - * - * @return java.lang.String - */ - public String getNodeName() { - return getName(); - } - - /** - * getNodeType method - * - * @return short - */ - public short getNodeType() { - return DOCUMENT_TYPE_NODE; - } - - /** - * getNotations method - * - * @return org.w3c.dom.NamedNodeMap - */ - public NamedNodeMap getNotations() { - return null; - } - - /** - * getPublicId method - * - * @return java.lang.String - */ - public String getPublicId() { - return this.publicId; - } - - /** - * getSystemId method - * - * @return java.lang.String - */ - public String getSystemId() { - return this.systemId; - } - - /** - */ - public boolean isClosed() { - IStructuredDocumentRegion flatNode = getStructuredDocumentRegion(); - if (flatNode == null) - return true; // will be generated - String regionType = StructuredDocumentRegionUtil.getLastRegionType(flatNode); - return (regionType == DOMRegionContext.XML_DOCTYPE_DECLARATION_CLOSE || regionType == DOMRegionContext.XML_DECLARATION_CLOSE); - } - - /** - */ - public void setInternalSubset(String internalSubset) { - if (!isDataEditable()) { - throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String()); - } - - this.internalSubset = internalSubset; - } - - /** - * setName method - * - * @param name - * java.lang.String - */ - protected void setName(String name) { - this.name = name; - } - - /** - * setPublicId method - * - * @param publicId - * java.lang.String - */ - public void setPublicId(String publicId) { - if (!isDataEditable()) { - throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String()); - } - - this.publicId = publicId; - - notifyValueChanged(); - } - - /** - * setSystemId method - * - * @param systemId - * java.lang.String - */ - public void setSystemId(String systemId) { - if (!isDataEditable()) { - throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, new String()); - } - - this.systemId = systemId; - - notifyValueChanged(); - } - - /** - * toString method - * - * @return java.lang.String - */ - public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append(getName()); - buffer.append('('); - buffer.append(getPublicId()); - buffer.append(')'); - buffer.append('('); - buffer.append(getSystemId()); - buffer.append(')'); - IStructuredDocumentRegion flatNode = getStructuredDocumentRegion(); - if (flatNode != null) { - buffer.append('@'); - buffer.append(flatNode.toString()); - } - return buffer.toString(); - } -} |