Format the local storage with the given namespace.
350284
private void formatJournal(NamespaceInfo nsInfo) throws IOException {
    Preconditions.checkState(nsInfo.getNamespaceID() != 0,
        "can't format with uninitialized namespace info: %s",
        nsInfo.toColonSeparatedString());
    LOG.info("Formatting journal" + this.getJournalId()
        + " with namespace info: (" + nsInfo.toColonSeparatedString() + ")");
    journalStorage.backupDirs();
    journalStorage.format(nsInfo);
    refreshCachedData();
  }
763369
def remove_namespace(self, namespace):
        """"""
        params = (namespace, )
        execute = self.cursor.execute
        execute('DELETE FROM gauged_data WHERE namespace = %s', params)
        execute('DELETE FROM gauged_statistics WHERE namespace = %s', params)
        execute('DELETE FROM gauged_keys WHERE namespace = %s', params)
        self.remove_cache(namespace)
666928
def parse_localnamespacepath(parser, event, node):
    #pylint: disable=unused-argument
    

    (next_event, next_node) = six.next(parser)

    namespaces = []

    if not _is_start(next_event, next_node, 'NAMESPACE'):
        print(next_event, next_node)
        raise ParseError('Expecting NAMESPACE')

    namespaces.append(parse_namespace(parser, next_event, next_node))

    while 1:

        (next_event, next_node) = six.next(parser)

        if _is_end(next_event, next_node, 'LOCALNAMESPACEPATH'):
            break

        if _is_start(next_event, next_node, 'NAMESPACE'):
            namespaces.append(parse_namespace(parser, next_event, next_node))
        else:
            raise ParseError('Expecting NAMESPACE')

    return '/'.join(namespaces)
842896
def reset_namespace(self):
        """"""
        self.shellwidget.reset_namespace(warning=self.reset_warning,
                                         message=True)
943251
def _format_local_file(self):
        

        if self.type != 'file':
            return

        if not self.entity:
            return

        if not is_win:
            return

        if self._file_exists():
            return

        self.args.local_file = self._to_unc_path(self.entity)
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));

   }
886833
def write(name, keyword, domain, citation, author, description, species, version, contact, licenses, values,
          functions, output, value_prefix):
    """"""
    write_namespace(
        name, keyword, domain, author, citation, values,
        namespace_description=description,
        namespace_species=species,
        namespace_version=version,
        author_contact=contact,
        author_copyright=licenses,
        functions=functions,
        file=output,
        value_prefix=value_prefix
    )
523532
function save(namespaces) {
	try {
		if (namespaces) {
			exports.storage.setItem('debug', namespaces);
		} else {
			exports.storage.removeItem('debug');
		}
	} catch (error) {
		// Swallow
		// XXX (@Qix-) should we be logging these?
	}
}
116876
public function setNamespace(string $namespace): void
	{
		$storage = $this->getStorage();
		if ($storage instanceof UserStorage) {
			$storage->setNamespace($namespace);
		}
		$this->initIdentity();
	}
1113568
private void formatImage(NamespaceInfo nsInfo) throws IOException {
    Preconditions.checkState(nsInfo.getNamespaceID() != 0,
        "can't format with uninitialized namespace info: %s",
        nsInfo.toColonSeparatedString());
    LOG.info("Formatting image " + this.getJournalId() + " with namespace info: (" +
        nsInfo.toColonSeparatedString() + ")");
    imageStorage.backupDirs();
    imageStorage.format(nsInfo);
    // clear obsolete image digests
    checkpointImageDigests.clear();
  }
679442
protected void redefine(int nodetype, String namespace, String localName)
    {
      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = nodetype + namespace.hashCode() + localName.hashCode();
    }
801001
private static Path pathForMetadata(Path root, String namespace, String name) {
    return new Path(
        FileSystemDatasetRepository.pathForDataset(root, namespace, name),
        METADATA_DIRECTORY);
  }
832073
static public function formatNamespace($namespace)
	{
	    if (is_array($namespace)) {
	        foreach ($namespace as $k => $v) {
	            $namespace[$k] =  static::formatNamespace($v);
	        }
	    } else {
	        $namespace = trim(str_replace('/', '\\', $namespace), '\\') . '\\';
	    }
	    
	    return $namespace;
	}
600772
def namespace(self):
        
        self._ns = {
            'db': self.store,
            'store': store,
            'autocommit': False,
            }
        return self._ns
109675
function(callback) {
		var self = this
		this.storage.each(function(val, namespacedKey) {
			callback.call(self, self._deserialize(val), (namespacedKey || '').replace(self._namespaceRegexp, ''))
		})
	}
447429
def format(self, parts):
        
        text = self.storage.state_separator.join(parts)
        return self.formatter(text)
960712
protected void ensureNamespacesCapacity() { // int size) {
		// int namespaceSize = namespacePrefix != null ? namespacePrefix.length
		// : 0;
		// assert (namespaceEnd >= namespacePrefix.length);

		// if(size >= namespaceSize) {
		// int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25
		final int newSize = namespaceEnd > 7 ? 2 * namespaceEnd : 8;
		if (TRACE_SIZING) {
			System.err.println(getClass().getName() + " namespaceSize " + namespacePrefix.length + " ==> " + newSize);
		}
		final String[] newNamespacePrefix = new String[newSize];
		final String[] newNamespaceUri = new String[newSize];
		if (namespacePrefix != null) {
			System.arraycopy(namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd);
			System.arraycopy(namespaceUri, 0, newNamespaceUri, 0, namespaceEnd);
		}
		namespacePrefix = newNamespacePrefix;
		namespaceUri = newNamespaceUri;

		// TODO use hashes for quick namespace->prefix lookups
		// if( ! allStringsInterned ) {
		// int[] newNamespacePrefixHash = new int[newSize];
		// if(namespacePrefixHash != null) {
		// System.arraycopy(
		// namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd);
		// }
		// namespacePrefixHash = newNamespacePrefixHash;
		// }
		// prefixesSize = newSize;
		// ////assert nsPrefixes.length > size && nsPrefixes.length == newSize
		// }
	}