code: function ContentTypeRegistry(dataSource) {
  		if (dataSource && dataSource.registerService) {
  			this.serviceRegistry = dataSource;
  			var tracker = new ServiceTracker(this.serviceRegistry, "orion.core.contenttype"); //$NON-NLS-0$
  			var _self = this;
  			tracker.onServiceAdded = function(serviceRef) {
  				var contentTypeDatas = [];
  				add2TypeData(serviceRef, contentTypeDatas);
  				add2Map(_self.map, contentTypeDatas);
  			};
  			tracker.removedService = function(serviceRef) {
  				var contentTypeDatas = [];
  				add2TypeData(serviceRef, contentTypeDatas);
  				deleteFromMap(_self.map, contentTypeDatas);
  			};
  			tracker.open(false);
  			this.map = buildMapFromServiceRegistry(dataSource);
  			dataSource.registerService(SERVICE_ID, this);
  		} else if (Array.isArray(dataSource)) {
  			this.serviceRegistry = null;
  			this.map = buildMap(dataSource);
  		} else {
  			throw new Error("Invalid parameter"); //$NON-NLS-0$
  		}
  	}
docs: @name orion.core.ContentTypeRegistry
  @class A service for querying {@link orion.core.ContentType}s.
  @description A registry that provides information about {@link orion.core.ContentType}s.
  
  <p>If a {@link orion.serviceregistry.ServiceRegistry} is available, clients should request the service with
  objectClass <code>"orion.core.contentTypeRegistry"</code> from the registry rather than instantiate this
  class directly. This constructor is intended for use only by page initialization code.</p>
  
  @param {orion.serviceregistry.ServiceRegistry|orion.core.ContentType[]} dataSource The service registry
  to use for looking up available content types and for registering this ContentTypeRegistry.
  
  <p>Alternatively, an array of ContentType data may be passed instead, which allows clients to use this
  ContentTypeRegistry without a service registry.</p>