GetNamespace Method.
171113
public String getNamespace()
    {
        String strTargetVersion = this.getProperty("version");
        if (strTargetVersion == null)
            strTargetVersion = this.getDefaultVersion();
        return this.getMessageControl().getNamespaceFromVersion(strTargetVersion);
    }
110352
def GetVersionNamespace(version):
   
   ns = nsMap[version]
   if not ns:
      ns = serviceNsMap[version]
   versionId = versionIdMap[version]
   if not versionId:
      namespace = ns
   else:
      namespace = '%s/%s' % (ns, versionId)
   return namespace
351565
function _gpfWebGetNamespaceAndName (name) {
    var EXPECTED_PARTS_COUNT = 2,
        NAMESPACE_PREFIX = 0,
        NAME = 1,
        parts = name.split(":");
    if (parts.length === EXPECTED_PARTS_COUNT) {
        return {
            namespace: _gpfWebGetNamespace(parts[NAMESPACE_PREFIX]),
            name: parts[NAME]
        };
    }
}
576087
private String getCurrentSSpaceFileName() {
        // REMINDER: This instruction is expected to be rare, so rather than
        // save the name and require a lookup every time the current sspace
        // is needed, we use an O(n) call to find the name as necessary
        for (Map.Entry<String,SemanticSpace> e : fileNameToSSpace.entrySet()) {
            if (e.getValue() == current) {
                return e.getKey();
            }
        }
        return null;
    }
46870
def namespace(self, name=None, function=None, recursive=None):
        

        return (
            self._find_single(
                scopedef.scopedef_t._impl_matchers[namespace_t.namespace],
                name=name,
                function=function,
                recursive=recursive)
        )
608705
def get_namespace(name):
    
    if name not in configuration_namespaces:
        configuration_namespaces[name] = ConfigNamespace(name)
    return configuration_namespaces[name]
114387
final public function getNamespace(): string
    {
        if (null === $this->namespace) {
            $pos             = strrpos(static::class, '\\');
            $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos);
        }

        return $this->namespace;
    }
1150824
def get_namespace_from_name(name):
    
    if not re.match(NAMESPACE_PATTERN, name):
        sys.exit(("Argument '%s' doesn't match any recognized pattern:\n"
                  "\tfloyd [data] init <project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/<project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/[projects|dataset]/<project_or_dataset_name>\n"
                  "\n Note: Argument can only contain alphanumeric, hyphen-minus '-' , underscore '_' and dot '.' characters."
                  ) % name)

    name_parts = name.split("/", 2)
    if len(name_parts) > 1:
        return name_parts[0], name_parts[-1]
    else:
        return current_username(), name
690711
public String getNamespaceIdAsString()
    {
        if (mNamespaceIdAsString == null)
        {
            mNamespaceIdAsString = Bytes.toHexString(getNamespaceId(), true);
        }

        return mNamespaceIdAsString;
    }
1214039
def _namespace_from_uri(self, uri):
        """"""
        # TODO - this could be helped a bunch with proper use of the graph API
        # it seems a bit fragile to treat these as simple string-splits
        uri = str(uri)
        parts = uri.split('#')
        if len(parts) == 1:
            return "%s/" % '/'.join(uri.split('/')[:-1])
        return "%s#" % '#'.join(parts[:-1])
85542
public String getNameSpace() {
        if (nameSpace == null) {
            nameSpace = new StringBuilder().append(catalog).append(".").append(table).toString();
        }
        return nameSpace;

    }
132518
public String lookupNamespace(final String prefix) {
        return this.namespaceTagHints.isEmpty() ? prefix : this.namespaceTagHints.get(prefix);
    }
1255665
function () {
        var namespaces = [
            this._initialDefinition.$namespace,
            this._extractRelativeNamespaceFromName()
        ].filter(function (namespacePart) {
            return namespacePart;
        });
        if (namespaces.length) {
            this._namespace = namespaces.join(".");
        }
    }
964218
public function getNamespace(): string
    {
        return ($this->getBundleNamespace() ? $this->getBundleNamespace() : static::NO_BUNDLE_NAMESPACE) . '\\Entity'.
            ($this->getSubDir() ? '\\'. $this->getSubDir() : '')
        ;
    }
569703
function getPrefixFromNamespace($ns)
    {
        foreach ($this->namespaces as $p => $n) {
            if ($ns == $n || $ns == $p) {
                $this->usedNamespaces[$p] = $n;

                return $p;
            }
        }

        return FALSE;
    }
517516
public String lookupNamespace(final String prefix) {
        Object namespace = namespaceMap.get(prefix);
        if (namespace != null) {
            return namespace.toString();
        }
        return this.namespaceTagHints.isEmpty() ? prefix : this.namespaceTagHints.get(prefix);
    }
560969
protected function getNamespaceFromClassname($class_name)
    {
        $parts = collect(explode('\\', trim($class_name, '\\')));
        $parts->pop();
        return '\\' . $parts->implode('\\');
    }