Save `namespaces`.

@param {String} namespaces
@api private
436407
function save(namespaces) {
  try {
    if (null == namespaces) {
      exports.storage.removeItem('debug');
    } else {
      exports.storage.debug = namespaces;
    }
  } catch(e) {}
}
703766
function(namespace){
        //TODO - if intance...


        if ( typeof(namespace) == "undefined" || namespace == "") {
            //logger.error('gina', 'MODEL:ERR:1', 'EEMPTY: Model namespace', __stack);
            console.error(new Error('EEMPTY: Model namespace'));
        }
        var suffix = 'Entity';
        var namespace = namespace.split(/\//g);
        var bundle = namespace[0];
        namespace.shift();
        //Capitalize - Normalize
        if (namespace.length > 1) {
            for (var i; i<namespace.length; ++i)
                namespace[i] = namespace[i].substring(0, 1).toUpperCase() + namespace[i].substring(1);

            var model = namespace.join(".");
        } else {
            //Dir name.
            var modelDirName = namespace[0];
            namespace[0] = namespace[0].substring(0, 1).toUpperCase() + namespace[0].substring(1);
            var model = namespace[0];
        }

        //console.log("\nBundle", bundle);
        //console.log("Model", model);


        getContext(bundle, function(err, conf){

            if (!err) {
                configuration = conf.model;
                //console.log("CONF READY ", model, conf.path/** conf*/);
                //TODO - More tries & catches...
                //Getting Entities Manager.
                var entitiesManager = new require(conf.path)();
                //var Entities = entitiesManager[model];

                //For now, I just need the F..ing entity name.
                var modelPath = conf.path + '/' + modelDirName
                //console.log('modelPath: ', modelPath);
                fs.readdir(modelPath, function(err, files){

                    var entityName, exluded = ['index.js'];

                    //Will be in Utils.Dev.Factory soon.
                    var produce = function(entityName, i){
                        console.log("producing ", files[i]);

                        utils.config.get('gina', 'project.json', function(err, config){
                            //if (err) logger.error('gina', 'MODEL:ERR:2', 'EEMPTY: EntitySuper' + err, __stack);
                            if (err) console.error(err.stack||err.message);

                            var filename = config.paths.gina + '/model/entityFactory.js';

                            //TODO - Factory class
                            //var Factory = new Factory({source: , target: ).onComplete();
                            console.log("LOADING ", filename);
                            //Getting source.
                            loadFile(filename, entityName, function(err, source){
                                console.log("got source ", err, source);

                                try {
                                    if (entityName != "undefiend") {
                                        console.log("preparing entity ", entityName);
                                        //TODO - Would be great to implement in Utils.Dev.
                                        var EntityFactorySource = source
                                            .replace(/\{Entity\}/g, entityName)
                                            .replace(/\{Model\}/g, model);

                                        //var EntityFactory = new requireFromString(EntityFactorySource)( _this.getConfig() );
                                        var EntityFactoryClass = requireFromString(EntityFactorySource);
                                        var EntityFactory = new EntityFactoryClass( _this.getConfig() );
                                        console.log("Factory is ",  EntityFactory);

                                        //var Entity = new Entity();
                                        merge(Entity, EntityFactory, true);
                                        //console.log("\nEntity CONTENT ", Entity, " \nVS\n", EntityFactory);

                                    } else {
                                        throw new Error('Gina.Model.getContext(...): [entityName] is undefined.');
                                    }
                                } catch (err) {
                                    //logger.error('gina', 'MODEL:ERR:4', 'EEMPTY: EntitySuper\n' + err, __stack);
                                    console.error( 'EEMPTY: EntitySuper\n' + (err.stack||err.message))
                                }

                                //Entity = new entitiesManager[model]();
                                //utils.merge(_this, Entity, true);
                                console.log("EntityManager  \n",  entitiesManager,"\n VS \n",  EntityFactory);
                                if (i == files.length-1) {
                                    console.log("All done !");
                                    _this.emit('ready', false, entitiesManager);
                                    ++i;
                                }

                            })//EO loadFile

                        })//EO Utils.Config.get

                    };//EO produce

                    var i = 0;
                    while (i < files.length) {
                        //console.log("TEsting entity exclusion ",  i + ": ", exluded.indexOf(files[i]) != -1 && files[i].match(/.js/), files[i]);
                        if ( files[i].match(/.js/) && exluded.indexOf(files[i]) == -1 && !files[i].match(/.json/)) {
                            entityName = files[i].replace(/.js/, "") + suffix;
                            console.log("entityName  : ", entityName );
                            produce(entityName, i++);
                        } else if (i == files.length-1) {
                            console.log("All done !");
                            _this.emit('ready', false, entitiesManager);
                            ++i;
                        } else {
                            console.log("missed ", i, files[i]);
                            ++i;
                        }
                    }//EO while.

                });//EO fs.readdir.

            } else {
                _this.emit('ready', 'no configuration found for your model: ' + model);
                console.log("no configuration found...");
            }
        });


    }
1356504
def skip_storing_namespace(self, namespace: Optional[str]) -> bool:
        
        return (
            namespace is not None and
            namespace in self.namespace_url and
            self.namespace_url[namespace] in self.uncached_namespaces
        )
1136721
public function setTo($namespace, $key, $value = null)
    {
        $oldNamespace = $this->namespace;
        $this->setNamespace($namespace);
        $this->set($key, $value);
        $this->setNamespace($oldNamespace);
    }
826365
def register_namespace(self, namespace, module):
        
        if namespace in self._namespaces:
            raise AlreadyRegisteredError("Namespace '{0}' is already registered on loader.".format(namespace))

        self._namespaces[namespace] = module
195485
def delete_namespace(self, namespace):
        

        # if not self.has_namespace(namespace):
        #     return "Namespace does not exists"

        # log = logging.getLogger("%s.%s" % (self.log_name,
        #                                    inspect.stack()[0][3]))
        # log.setLevel(self.log_level)

        url = self._make_url(namespace).replace("/sparql", "")
        result = requests.delete(url=url)
        if result.status_code == 200:
            log.critical(result.text)
            return result.text
        raise RuntimeError(result.text)
1241041
def add_namespaces(metadata, namespaces):
    # type: (Mapping[Text, Any], MutableMapping[Text, Text]) -> None
    """"""
    for key, value in metadata.items():
        if key not in namespaces:
            namespaces[key] = value
        elif namespaces[key] != value:
            raise validate.ValidationException(
                "Namespace prefix '{}' has conflicting definitions '{}'"
                " and '{}'.".format(key, namespaces[key], value))
886953
def save_namespace(self, filename):
        """"""
        from spyder_kernels.utils.nsview import get_remote_data
        from spyder_kernels.utils.iofuncs import iofunctions

        ns = self._get_current_namespace()
        settings = self.namespace_view_settings
        data = get_remote_data(ns, settings, mode='picklable',
                               more_excluded_names=EXCLUDED_NAMES).copy()
        return iofunctions.save(data, filename)
1186265
function verifyNamespace(namespace) {
	if (namespace && typeof namespace !== 'string') {
		const msg = util.format('Namespace must be a non-empty string: %j', namespace);
		logger.error('verifyNamespace:', msg);
		throw new Error(msg);
	}
}
1252368
function disable(namespaces) {
  var split = (namespaces || '').split(/[\s,]+/);
  var len = split.length;

  function removeNamespaceFromNames(namespaces){
    _.remove(exports.names, function(name){
      return name.toString() === '/^' + namespaces + '$/';
    });
  }

  for (var i = 0; i < len; i++) {
    if (!split[i]) continue; // ignore empty strings
    namespaces = split[i].replace(/\*/g, '.*?');
    if (namespaces[0] === '-') {
      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
    } else {
      removeNamespaceFromNames(namespaces);
      exports.skips.push(new RegExp('^' + namespaces + '$'));
      loggerEventBus.emit('disable', split[i]);
    }
  }

  exports.save(namespaces);
}
656374
def exploded_namespace_declarations(ns)
      Hash[ns.map do |prefix, uri|
             if prefix==""
               ["xmlns", uri]
             else
               [[prefix, "xmlns"], uri]
             end
           end]
    end
1000441
public function registerNamespace($namespace, $paths)
    {
        if (false === isset($this->_namespaces[$namespace])) {
            $this->_namespaces[$namespace] = array();
        }

        $this->_namespaces[$namespace] = array_merge($this->_namespaces[$namespace], (array) $paths);

        return $this;
    }
1076196
def _add_namespace(self, namespace):
        """"""
        src_name = namespace.source_name
        if "*" in src_name:
            self._regex_map.append((namespace_to_regex(src_name), namespace))
        else:
            self._add_plain_namespace(namespace)
1171963
function preserveNamespace (models) {
    const prefixedModels = {}
    if (connector.config.skipModelNamespace) {
      // if namspace is not applied we do not need to preserve it
      return models
    } else {
      for (var model in models) {
        prefixedModels[models[model].name] = models[model]
      }
      return prefixedModels
    }
  }
51895
def reset_namespace(self, namespace=None, params=None):
        
        log = logging.getLogger("%s.%s" % (self.log_name,
                                           inspect.stack()[0][3]))
        log.setLevel(self.log_level)
        namespace = pick(namespace, self.namespace)
        params = pick(params, self.namespace_params)
        log.warning(" Reseting namespace '%s' at host: %s",
                 namespace,
                 self.url)
        try:
            self.delete_namespace(namespace)
        except RuntimeError:
            pass
        self.create_namespace(namespace, params)
109675
function(callback) {
		var self = this
		this.storage.each(function(val, namespacedKey) {
			callback.call(self, self._deserialize(val), (namespacedKey || '').replace(self._namespaceRegexp, ''))
		})
	}
372135
def drop_namespaces(self):
        """"""
        self.session.query(NamespaceEntry).delete()
        self.session.query(Namespace).delete()
        self.session.commit()