nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
amywu | 923ee60 | 2007-04-10 18:32:07 +0000 | [diff] [blame] | 2 | * Copyright (c) 2004, 2005 IBM Corporation and others. |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 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 |
amywu | 923ee60 | 2007-04-10 18:32:07 +0000 | [diff] [blame] | 7 | * |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | *******************************************************************************/ |
david_williams | 5677702 | 2005-04-11 06:21:55 +0000 | [diff] [blame] | 11 | package org.eclipse.wst.html.core.internal.contentmodel.chtml; |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 12 | |
| 13 | |
| 14 | |
david_williams | c06c86f | 2005-03-18 18:23:41 +0000 | [diff] [blame] | 15 | import org.eclipse.wst.xml.core.internal.contentmodel.CMContent; |
| 16 | import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration; |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * Base class for EMPTY type element declarations. |
| 20 | */ |
| 21 | abstract class HedEmpty extends HTMLElemDeclImpl { |
| 22 | |
| 23 | /** |
| 24 | */ |
| 25 | public HedEmpty(String elementName, ElementCollection collection) { |
| 26 | super(elementName, collection); |
| 27 | typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMPTY; |
| 28 | // EMPTY type has no end tag. |
| 29 | omitType = OMIT_END_MUST; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Content.<br> |
| 34 | * EMPTY type always returns <code>null</code>. |
| 35 | * <br> |
david_williams | c06c86f | 2005-03-18 18:23:41 +0000 | [diff] [blame] | 36 | * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 37 | */ |
| 38 | public CMContent getContent() { |
| 39 | return null; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Content type.<br> |
david_williams | c06c86f | 2005-03-18 18:23:41 +0000 | [diff] [blame] | 44 | * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 45 | */ |
| 46 | public int getContentType() { |
| 47 | return CMElementDeclaration.EMPTY; |
| 48 | } |
amywu | 923ee60 | 2007-04-10 18:32:07 +0000 | [diff] [blame] | 49 | } |