Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java')
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java76
1 files changed, 76 insertions, 0 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java
new file mode 100644
index 0000000000..3ec7fdb7dc
--- /dev/null
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+package org.eclipse.wst.html.core.contentmodel;
+
+import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.html.core.HTMLCMProperties;
+
+
+
+/**
+ */
+class HTMLEntityDeclImpl extends CMNodeImpl implements HTMLEntityDeclaration {
+
+ private java.lang.String value = null;
+
+ /**
+ * CMEntityDeclImpl constructor comment.
+ * @param entityName java.lang.String; Entity name.
+ * @param entityValue java.lang.String; Value string.
+ */
+ public HTMLEntityDeclImpl(String entityName, String entityValue) {
+ super(entityName);
+ value = entityValue;
+ }
+
+ /**
+ * getName method
+ * @return java.lang.String
+ */
+ public String getName() {
+ return getNodeName();
+ }
+
+ /**
+ * Get CMNode type.<br>
+ * @return int; Always return ENTITY_DECLARATION.
+ */
+ public int getNodeType() {
+ return CMNode.ENTITY_DECLARATION;
+ }
+
+ /**
+ * getValue method
+ * @return java.lang.String
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ */
+ public boolean supports(String propertyName) {
+ if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
+ return true;
+ return super.supports(propertyName);
+ }
+
+ /**
+ * Entities in HTML documents are always treated with ignoring cases.
+ * Because no special entities are defined in JSP 1.0, this method
+ * can always return <code>true</code>.<br>
+ */
+ public Object getProperty(String propertyName) {
+ if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
+ return new Boolean(true);
+ return super.getProperty(propertyName);
+ }
+} \ No newline at end of file

Back to the top