nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2004 IBM Corporation and others. |
| 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 |
| 7 | * |
| 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; |
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.CMElementDeclaration; |
| 16 | import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup; |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * Complex type definition for containers of <code>%flow;</code>. |
| 20 | */ |
| 21 | final class CtdFlowContainer extends ComplexTypeDefinition { |
| 22 | |
| 23 | /** |
| 24 | */ |
| 25 | public CtdFlowContainer(ElementCollection elementCollection) { |
| 26 | super(elementCollection); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * (%flow;)* |
| 31 | */ |
| 32 | protected void createContent() { |
| 33 | if (content != null) |
| 34 | return; // already created. |
| 35 | if (collection == null) |
| 36 | return; |
| 37 | |
| 38 | content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED); |
| 39 | collection.getFlow(content); |
| 40 | } |
| 41 | |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 42 | public int getContentType() { |
| 43 | return CMElementDeclaration.MIXED; |
| 44 | } |
| 45 | |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 46 | public String getTypeName() { |
| 47 | return ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER; |
| 48 | } |
| 49 | } |