blob: b131398627a3803d81c91a46261a77657237e397 [file] [log] [blame]
nitind958d79a2004-11-23 19:23:00 +00001/*******************************************************************************
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_williams56777022005-04-11 06:21:55 +000011package org.eclipse.wst.html.core.internal.contentmodel;
nitind958d79a2004-11-23 19:23:00 +000012
13
14
david_williamsc06c86f2005-03-18 18:23:41 +000015import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
16import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
nitind958d79a2004-11-23 19:23:00 +000017
18/**
19 * Complex type definition for containers of <code>%flow;</code>.
20 */
21final 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
nitind958d79a2004-11-23 19:23:00 +000042 public int getContentType() {
43 return CMElementDeclaration.MIXED;
44 }
45
nitind958d79a2004-11-23 19:23:00 +000046 public String getTypeName() {
47 return ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER;
48 }
49}