Method that initializes the default namespaces for namespace registries.

@param namespaceRegistry the namespace registry
490883
protected void initializeDefaultNamespaces( NamespaceRegistry namespaceRegistry ) {
        if (namespaceRegistry == null) return;
        namespaceRegistry.register(JcrLexicon.Namespace.PREFIX, JcrLexicon.Namespace.URI);
        namespaceRegistry.register(JcrMixLexicon.Namespace.PREFIX, JcrMixLexicon.Namespace.URI);
        namespaceRegistry.register(JcrNtLexicon.Namespace.PREFIX, JcrNtLexicon.Namespace.URI);
        namespaceRegistry.register(ModeShapeLexicon.Namespace.PREFIX, ModeShapeLexicon.Namespace.URI);
    }
783185
@SuppressWarnings({ "rawtypes", "unchecked" })
	protected void setNameSpaces(NodeConfig nodeConfig, Object targetObject) throws UnmarshalException {
		Class targetClass = targetObject.getClass();

		List namespaces = nodeConfig.getNamespace();

		if (namespaces != null && namespaces.size() > 0) {
			for (int i = 0; i < namespaces.size(); i++) {
				Method method;
				try {
					method = targetClass.getMethod(Constant.SET_NAMESPACE, Namespace.class);
					if (method != null)
						setMethod(method, targetObject, namespaces.get(i));
				} catch (NoSuchMethodException e) {
					// ignore exception
				}

			}
		}
	}
375820
protected void lifecycle(BindRegistry registry, BeanDefinitionRegistry definitionRegistry) {
    for (String name : registry.getBeanNames()) {
      Class<?> clazz = registry.getBeanType(name);

      String springName = name;
      if (springName.startsWith("&")) springName = springName.substring(1);
      if (!definitionRegistry.containsBeanDefinition(springName)) continue;

      AbstractBeanDefinition def = (AbstractBeanDefinition) definitionRegistry.getBeanDefinition(springName);
      if (Initializing.class.isAssignableFrom(clazz) && null == def.getInitMethodName()
          && !def.getPropertyValues().contains("init-method")) {
        def.setInitMethodName("init");
      }
      if (Disposable.class.isAssignableFrom(clazz) && null == def.getDestroyMethodName()
          && !def.getPropertyValues().contains("destroy-method")) {
        def.setDestroyMethodName("destroy");
      }
    }
  }
634847
private void initRegisteredBindings() {
        
        Enumeration<URL> bindingsConfiguration;
        try {
            bindingsConfiguration = ClassLoaderUtils.getClassLoader().getResources("META-INF/bindings.xml");
        } catch (IOException e) {
            throw new IllegalStateException("Error registering bindings: " + e.getMessage(), e);
        }

        registerConfigurations(bindingsConfiguration);
    }
1350531
protected function registerNamespaces()
    {
        $this->mergeConfigFrom(__DIR__.'/src/config/config.php', 'menus');
        $this->loadViewsFrom(__DIR__.'/src/views', 'menus');

        $this->publishes([
            __DIR__.'/src/config/config.php' => config_path('menus.php'),
        ], 'config');

        $this->publishes([
            __DIR__.'/src/views' => base_path('resources/views/vendor/pingpong/menus'),
        ], 'views');
    }
191842
public void registerExtension(ExtensionNamespaceSupport extNsSpt)
  {
    String namespace = extNsSpt.getNamespace();
    if (namespaceIndex(namespace, m_extensions) == -1)
    {
      m_extensions.add(extNsSpt);
      if (m_unregisteredExtensions.contains(namespace))
        m_unregisteredExtensions.remove(namespace);
    }
    
  }
23469
public void addNamespaces(Map<String, String> namespaceMap) throws RepositoryException
   {
      if (!started)
      {
         log.warn("Unable save namespaces in to the storage. Storage not initialized");
         return;
      }

      PlainChangesLog changesLog = new PlainChangesLogImpl();
      for (Map.Entry<String, String> entry : namespaceMap.entrySet())
      {
         String prefix = entry.getKey();
         String uri = entry.getValue();

         if (prefix != null)
         {
            if (log.isDebugEnabled())
               log.debug("Namespace " + uri + ":" + prefix);
            internallAdd(changesLog, prefix, uri);
         }
      }
      dataManager.save(new TransactionChangesLog(changesLog));

   }
315632
public void setNamespaceContext(NamespaceContext nsContext) {
        if ( nsContext == null ) {
            String fmsg = XSLMessages.createXPATHMessage( 
                    XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
                    new Object[] {"NamespaceContext"} );
            throw new NullPointerException( fmsg ); 
        }
        this.namespaceContext = nsContext;
        this.prefixResolver = new JAXPPrefixResolver ( nsContext );
    }
130215
public void useNamespace(SerializerContext serializerContext, ElementDescriptor<?> elementDescriptor)
	{
		useNamespace(serializerContext, elementDescriptor.qualifiedName.namespace);
	}
1174923
public void addNameSpace(Set<String> names) {
		for (String name : names) {
			this.nameSpace.add(name.replace('.', '/'));
		}
	}
859404
private void initNamespaces(){
		Map<Integer, String> namespaceMap = new HashMap<Integer,String>();
		try{
			int b = read();

			this.keywords.reset();
			StringBuilder buffer = null;

			while (b != -1) {
//				System.out.print((char)b);

				if (buffer != null) {
					buffer.append((char) b);
				}

				if (this.keywords.check((char) b)) {
					switch (this.keywords.getValue()) {

						case KEY_START_NAMESPACES:
							buffer = new StringBuilder(WikipediaXMLKeys.KEY_START_NAMESPACES.getKeyword());
							break;

						case KEY_END_NAMESPACES:
							DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
							factory.setIgnoringElementContentWhitespace(true);
							Document namespaces = factory.newDocumentBuilder().parse(new InputSource(new StringReader(buffer.toString())));


							NodeList nsList = namespaces.getChildNodes().item(0).getChildNodes();

							for (int i = 0; i < nsList.getLength(); i++) {
								Node curNamespace = nsList.item(i);

								//get the prefix for the current namespace
								String prefix = curNamespace.getTextContent().trim();
								if(!prefix.isEmpty()){
									NamedNodeMap nsAttributes = curNamespace.getAttributes();
									String namespace = nsAttributes.getNamedItem("key").getTextContent();
									namespaceMap.put(Integer.parseInt(namespace), prefix);
								}
							}

					    buffer = null;
						articleFilter.initializeNamespaces(namespaceMap);
						return; //init done

					}

					this.keywords.reset();
				}

				b=read();
			}
		}catch(IOException e){
			System.err.println("Error reading namespaces from xml dump.");
		}catch(ParserConfigurationException e){
			System.err.println("Error parsing namespace data.");
		}catch(SAXException e){
			System.err.println("Error parsing namespace data.");
		}
	}
812723
protected function registerNamespaces()
    {
        $configPath = __DIR__ . '/../config/config.php';
        $viewsPath = __DIR__ . '/../views';
        $this->mergeConfigFrom($configPath, 'menus');
        $this->loadViewsFrom($viewsPath, 'menus');

        $this->publishes([
            $configPath => config_path('menus.php'),
        ], 'config');

        $this->publishes([
            $viewsPath => base_path('resources/views/vendor/nwidart/menus'),
        ], 'views');
    }
223232
def ensure_default_namespace(self) -> Namespace:
        """"""
        namespace = self.get_namespace_by_keyword_version(BEL_DEFAULT_NAMESPACE, BEL_DEFAULT_NAMESPACE_VERSION)

        if namespace is None:
            namespace = Namespace(
                name='BEL Default Namespace',
                contact='charles.hoyt@scai.fraunhofer.de',
                keyword=BEL_DEFAULT_NAMESPACE,
                version=BEL_DEFAULT_NAMESPACE_VERSION,
                url=BEL_DEFAULT_NAMESPACE_URL,
            )

            for name in set(chain(pmod_mappings, gmod_mappings, activity_mapping, compartment_mapping)):
                entry = NamespaceEntry(name=name, namespace=namespace)
                self.session.add(entry)

            self.session.add(namespace)
            self.session.commit()

        return namespace
578732
public void deleteNamespace(String namespaceId) {

        DeleteNamespaceRequest deleteNamespaceRequest = new DeleteNamespaceRequest().withId(namespaceId);
        getDiscoveryClient().deleteNamespace(deleteNamespaceRequest);

    }
724691
void nameSpaceChanged()
    {
        if ( nameSourceListeners == null )
            return;

        for(int i=0; i<nameSourceListeners.size(); i++)
            ((NameSource.Listener)(nameSourceListeners.get(i)))
                .nameSourceChanged( this );
    }
1223671
public MgcpEndpoint registerEndpoint(String namespace) throws UnrecognizedMgcpNamespaceException {
        // Get correct endpoint provider
        MgcpEndpointProvider<?> provider = this.providers.get(namespace);
        if (provider == null) {
            throw new UnrecognizedMgcpNamespaceException("Namespace " + namespace + " is unrecognized");
        }

        // Create the endpoint and register it
        MgcpEndpoint endpoint = provider.provide();
        endpoint.observe((MgcpEndpointObserver) this);
        endpoint.observe((MgcpMessageObserver) this);
        this.endpoints.put(endpoint.getEndpointId().toString(), endpoint);
        
        if (log.isDebugEnabled()) {
            log.debug("Registered endpoint " + endpoint.getEndpointId().toString() + ". Count: " + this.endpoints.size());
        }
        
        return endpoint;
    }
136480
def _register_namespace_and_command(self, namespace):
        """"""
        self._add_namespace(namespace)
        # Add the namespace for commands on this database
        cmd_name = namespace.source_name.split(".", 1)[0] + ".$cmd"
        dest_cmd_name = namespace.dest_name.split(".", 1)[0] + ".$cmd"
        self._add_namespace(Namespace(dest_name=dest_cmd_name, source_name=cmd_name))