Deletes a namespace fromt the triplestore

        args:
            namespace: the name of the namespace
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)
1338734
def delete_pod(name, namespace='default', **kwargs):
    '''
    
    '''
    cfg = _setup_conn(**kwargs)
    body = kubernetes.client.V1DeleteOptions(orphan_dependents=True)

    try:
        api_instance = kubernetes.client.CoreV1Api()
        api_response = api_instance.delete_namespaced_pod(
            name=name,
            namespace=namespace,
            body=body)

        return api_response.to_dict()
    except (ApiException, HTTPError) as exc:
        if isinstance(exc, ApiException) and exc.status == 404:
            return None
        else:
            log.exception(
                'Exception when calling '
                'CoreV1Api->delete_namespaced_pod'
            )
            raise CommandExecutionError(exc)
    finally:
        _cleanup(**cfg)
1142170
public final void nameSpace (String namespace) {
    if (namespace == null || namespace.equals("")) {
      _namespace = "";
    } else {
      _namespace = namespace + ":";
    }
  }
391439
public function clearNamespace($namespace)
    {
        $paths = $this->getNamespaceDefaultPaths($namespace);
        foreach ($paths as $path) {
            if ($this->files->isDirectory($path)) {
                $this->files->deleteDirectory($path);
            }
        }
    }
600772
def namespace(self):
        
        self._ns = {
            'db': self.store,
            'store': store,
            'autocommit': False,
            }
        return self._ns
408266
def ensure_namespace(self, name):
        # type: (str) -> ApiNamespace
        
        if name not in self.namespaces:
            self.namespaces[name] = ApiNamespace(name)
        return self.namespaces[name]
578732
public void deleteNamespace(String namespaceId) {

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

    }
281460
def _fixNS(self, namespace):
        
        if isinstance(namespace, bytes):
            namespace = str(namespace, encoding="utf-8")

        if namespace == OPENID_NS:
            if self._openid_ns_uri is None:
                raise UndefinedOpenIDNamespace('OpenID namespace not set')
            else:
                namespace = self._openid_ns_uri

        if namespace != BARE_NS and not isinstance(namespace, str):
            raise TypeError(
                "Namespace must be BARE_NS, OPENID_NS or a string. got %r" %
                (namespace, ))

        if namespace != BARE_NS and ':' not in namespace:
            fmt = 'OpenID 2.0 namespace identifiers SHOULD be URIs. Got %r'
            warnings.warn(fmt % (namespace, ), DeprecationWarning)

            if namespace == 'sreg':
                fmt = 'Using %r instead of "sreg" as namespace'
                warnings.warn(
                    fmt % (SREG_URI, ),
                    DeprecationWarning, )
                return SREG_URI

        return namespace
1127530
def filter_alias_create_namespace(namespace):
    
    def filter_string(s):
        return ' '.join(s.strip().split())

    namespace.alias_name = filter_string(namespace.alias_name)
    namespace.alias_command = filter_string(namespace.alias_command)
    return namespace
1242739
def do_delete(self, args):
        ''''''
        namespace = self.config['namespace']
        if not args.assume_yes:
            response = raw_input('Delete everything in {0!r}?  Enter namespace: '
                                 .format(namespace))
            if response != namespace:
                self.stdout.write('not deleting anything\n')
                return
        self.stdout.write('deleting namespace {0!r}\n'.format(namespace))
        self.task_master.clear()
310026
def build_namespace(namespace)
      raise(TriplestoreAdapter::TriplestoreException, "build_namespace received blank namespace") if namespace.empty?
      request = Net::HTTP::Post.new("#{build_url}/blazegraph/namespace")
      request['Content-Type'] = 'text/plain'
      request.body = "com.bigdata.rdf.sail.namespace=#{namespace}"
      @http.request(@uri, request)
      "#{build_url}/blazegraph/namespace/#{namespace}/sparql"
    end
1027903
def p_namespace(p):
    
    global NAMESPACE

    NAMESPACE = normalize_namespace(p[2])
    __DEBUG__('Setting namespace to ' + (NAMESPACE.rstrip(DOT) or DOT), level=1)
62971
def map_namespace(self, plain_src_ns):
        
        namespace = self.lookup(plain_src_ns)
        if namespace:
            return namespace.dest_name
        return None
747020
def delete_namespace(self):
        '''

        '''
        conn = redis.Redis(connection_pool=self.pool)
        keys = conn.keys("%s*" % self._namespace_str)
        for i in xrange(0, len(keys), 10000):
            conn.delete(*keys[i:i+10000])
        logger.debug('tearing down %r', self._namespace_str)
121470
public static function delete(string $name, string $namespace = '*'): void
    {
        self::initialize();
        if (isset($_SESSION[$namespace][$name])) {
            unset($_SESSION[$namespace][$name]);
            if (count($_SESSION[$namespace]) === 0) {
                unset($_SESSION[$namespace]);
            }
        }
    }
411960
public function clear($namespace='default')
    {
        $cleared = false;

        if (isset($this->addedData[$namespace])) {
            $this->addedData[$namespace] = [];
            $cleared = true;
        }

        if (isset($this->cachedData[$namespace])) {
            $this->cachedData[$namespace] = [];
            $cleared = true;
        }

        if ($cleared) {
            $this->queryHits = [];
        }
    }
756193
protected static function _namespaceUnset($namespace, $name = null)
    {
        if (self::$_writable === false) {
            /**
             * @see Zend_Session_Exception
             */
            require_once 'Zend/Session/Exception.php';
            throw new Zend_Session_Exception(self::_THROW_NOT_WRITABLE_MSG);
        }

        $name = (string) $name;

        // check to see if the api wanted to remove a var from a namespace or a namespace
        if ($name === '') {
            unset($_SESSION[$namespace]);
            unset(self::$_expiringData[$namespace]);
        } else {
            unset($_SESSION[$namespace][$name]);
            unset(self::$_expiringData[$namespace]);
        }

        // if we remove the last value, remove namespace.
        if (empty($_SESSION[$namespace])) {
            unset($_SESSION[$namespace]);
        }
    }