Return a PartitionName based on this name.
427624
def as_partition(self, **kwargs):
        """"""

        return PartitionName(**dict(list(self.dict.items()) + list(kwargs.items())))
175659
def with_name(self, name):
        """"""
        if not self.name:
            raise ValueError("%r has an empty name" % (self,))
        return self._from_parsed_parts(self._drv, self._root,
                                       self._parts[:-1] + [name])
1156566
def _name_value(self, s):
        """"""
        parts = s.split(b' ', 2)
        name = parts[0]
        if len(parts) == 1:
            value = None
        else:
            size = int(parts[1])
            value = parts[2]
            still_to_read = size - len(value)
            if still_to_read > 0:
                read_bytes = self.read_bytes(still_to_read)
                value += b'\n' + read_bytes[:still_to_read - 1]
        return (name, value)
998512
private String getFileName(String name) {
        //check if the environment is linux or windows
        if (name.contains(Constants.FORWARD_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.FORWARD_SLASH) + 1, name.length());
        } else if (name.contains(Constants.BACK_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.BACK_SLASH) + 1, name.length());
        }
        return name;
    }
274671
def name_parts(self):
        """"""

        default = PartialMixin.ANY

        return ([(k, default, True)
                for k, _, _ in PartitionName._name_parts]
                +
                [(k, default, True)
                 for k, _, _ in Name._generated_names]
                )
1324593
def name(self):
    """"""
    if self._name is None:
      location = getattr(self.path_spec, 'location', None)
      if location is not None:
        self._name = self._file_system.BasenamePath(location)
      else:
        volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(
            self.path_spec)
        if volume_index is not None:
          self._name = 'apfs{0:d}'.format(volume_index + 1)
        else:
          self._name = ''
    return self._name
741704
def full_name(self):
        """"""
        if self.requested_version is not None:
            return '%s-%s' % (self.name, self.requested_version)
        return self.name
1072116
def _filename(self_or_cls, filename):
        ""
        if not filename.endswith(self_or_cls.file_ext):
            return '%s.%s' % (filename, self_or_cls.file_ext)
        else:
            return filename
1331241
def get_dirname(self, index):
        """"""
        fname = self.get_filename(index)
        if fname:
            if osp.isdir(fname):
                return fname
            else:
                return osp.dirname(fname)
1077290
def build_input_partitions(cls, name='inputTablePartitions', input_name='input'):
        
        obj = cls(name)
        obj.exporter = 'get_input_partitions'
        obj.input_name = input_name
        return obj
757400
def as_partition(self, partition=0, **kwargs):
        

        assert isinstance(self._name, Name), "Wrong type: {}".format(type(self._name))
        assert isinstance(self._on, DatasetNumber), "Wrong type: {}".format(type(self._on))

        name = self._name.as_partition(**kwargs)
        on = self._on.as_partition(partition)

        return PartitionIdentity(name, on)
611352
def filename(self):
        """"""
        if self.value and 'value' in self._json_data and self._json_data['value']:
            return self._json_data['value'].split('/')[-1]
        return None
369857
def get(self, name):
        ""
        for bucket in self:
            for k,v in self[bucket].items():
                if k == name:
                    return v
34639
def name(self):
        """"""
        return str(conf.lib.clang_getCString(conf.lib.clang_getFileName(self)))
288668
def _get_store_by_name(self, name):
        """"""
        for cls in self.storage_type_map.values():
            filename = os.path.join(self.storage_path,
                                    '{name}.{ending}'.format(
                                        name=name,
                                        ending=cls.file_ending))
            if os.path.exists(filename):
                try:
                    return cls(self.storage_path)
                except:
                    continue
        raise ClusterNotFound(
            "No state file for cluster `{name}` was found in directory `{path}`"
            .format(name=name, path=self.storage_path))
380226
def defaultname(name=None):
    """"""

    if name is None:
        name = _RESOLVER_REGISTRY.default

    else:
        _RESOLVER_REGISTRY.default = name

    return name
47902
@Override
    public Optional<List<String>> getPartitionNamesByParts(String databaseName, String tableName, List<String> parts)
    {
        Table table = getTableOrElseThrow(databaseName, tableName);
        String expression = buildGlueExpression(table.getPartitionColumns(), parts);
        List<Partition> partitions = getPartitions(databaseName, tableName, expression);
        return Optional.of(buildPartitionNames(table.getPartitionColumns(), partitions));
    }