/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * 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:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.model.core.namespace;

import org.eclipse.birt.report.model.core.Module;

/**
 * Represents the factory to produce module name space according to different
 * name space ID.
 */

public class ModuleNameScopeFactory
{

	private ModuleNameScopeFactory( )
	{
		// Doesn't allow instantiation.
	}

	/**
	 * Returns the module name space with the attached module and name space ID.
	 * 
	 * @param module
	 *            the attached module
	 * @param nameSpaceID
	 *            the name space ID. The different module name space for
	 *            different name space ID.
	 * @return the produced element name space
	 */

	public static IModuleNameScope createElementNameSpace( Module module,
			int nameSpaceID )
	{
		if ( nameSpaceID == Module.STYLE_NAME_SPACE )
			return new StyleNameScope( module );
		
		return new SimpleNameScope( module, nameSpaceID );
	}
}
