Formats a string containing the fully-qualified path to represent a annotated_dataset resource.

@deprecated Use the {@link AnnotatedDatasetName} class instead.
552456
@Deprecated
  public static final String formatAnnotatedDatasetName(
      String project, String dataset, String annotatedDataset) {
    return ANNOTATED_DATASET_PATH_TEMPLATE.instantiate(
        "project", project,
        "dataset", dataset,
        "annotated_dataset", annotatedDataset);
  }
183387
private Path getDatasetDirForKey(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException {
    String datasetFromConfigKey = getDatasetFromConfigKey(configKey);

    if (StringUtils.isBlank(datasetFromConfigKey)) {
      return getVersionRoot(version);
    }

    return new Path(getVersionRoot(version), datasetFromConfigKey);
  }
698839
@Deprecated
  public DatanodeDescriptor getDatanodeByName(String name) {
    if (name == null) {
      return null;
    }
    int colon = name.indexOf(":");
    String host;
    if (colon < 0) {
      host = name;
    } else {
      host = name.substring(0, colon);
    }
    hostmapLock.readLock().lock();
    try {
      DatanodeDescriptor[] nodes = map.get(host);
      // no entry
      if (nodes == null) {
        return null;
      }
      for (DatanodeDescriptor containedNode : nodes) {
        if (name.equals(containedNode.getName())) {
          return containedNode;
        }
      }
      return null;
    } finally {
      hostmapLock.readLock().unlock();
    }
  }
1340728
public function formatParams(Dataset $dataset)
    {
        $paramDefinition = $this->getParamDefinition();
        foreach ($dataset as $key => $value) {
            $value = trim($value);
            is_numeric($value) && settype($value, 'string');

            if (isset($paramDefinition[$key])) {
                if ($this->getParamValueLength($value) > $paramDefinition[$key]['length']) {
                    $value = substr($value, 0, $paramDefinition[$key]['length']);
                }
            }

            if (isset($paramDefinition[$key]['mb_str_pad'])) {
                $value = StringHelper::mbStringPad(
                    $value,
                    $paramDefinition[$key]['length'],
                    isset($paramDefinition[$key]['padChar']) ? $paramDefinition[$key]['padChar'] : ' ',
                    $paramDefinition[$key]['pad'],
                    $this->getCharset()
                );
            } elseif (isset($paramDefinition[$key]['format'])) {
                $value = sprintf($paramDefinition[$key]['format'], $value);
            }

            if ($this->getCharset() !== self::DEFAULT_CHARSET) {
                $value = iconv(self::DEFAULT_CHARSET, $this->getCharset() . '//TRANSLIT', $value);
            }

            $dataset->offsetSet($key, $value);

            // remove empty values
            if (!isset($value)) {
                $dataset->offsetUnset($key);
            }
        }
    }
1149565
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getMetadata() {
    return getMetadataMap();
  }
336889
def __remote_path_rewrite(self, dataset_path, dataset_path_type, name=None):
        
        path = str(dataset_path)  # Use false_path if needed.
        action = self.action_mapper.action(path, dataset_path_type)
        if action.staging_needed:
            if name is None:
                name = os.path.basename(path)
            remote_directory = self.__remote_directory(dataset_path_type)
            remote_path_rewrite = self.path_helper.remote_join(remote_directory, name)
        else:
            # Actions which don't require staging MUST define a path_rewrite
            # method.
            remote_path_rewrite = action.path_rewrite(self.path_helper)

        return remote_path_rewrite
800095
def annotated_dataset_path(cls, project, dataset, annotated_dataset):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}",
            project=project,
            dataset=dataset,
            annotated_dataset=annotated_dataset,
        )
40739
@Override
    public T setResourceAdapterXML(String resourceName) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName must be specified");
        return setResourceAdapterXML(new ClassLoaderAsset(resourceName));

    }
1228401
protected String convertToFullFilename(String relpath_or_package, String filename, String domain) throws Exception {

        if (relpath_or_package != null && ".".equals(relpath_or_package.trim())) {
            log.warn("******** BUG IN FilenameUtils ==============> " + normalize(relpath_or_package.replace('.', separatorChar) + separatorChar + filename));

            throw new Exception("not a good practice, please clean up your template relative path, you may set it to empty string... :" + relpath_or_package
                    + ", " + filename);
        }

        String ret;

        if (hasLength(relpath_or_package)) {
            ret = normalize(relpath_or_package.replace('.', separatorChar) + separatorChar + filename);
        } else {
            ret = filename;
        }

        if (hasLength(domain)) {
            return normalize(domain + File.separator + ret);
        } else {
            return ret;
        }
    }
884103
public static final String formatPath(String path) {
		if (path == null) {
			return "";
		}
		path = path.trim();
		if (path.isEmpty()) {
			return path;
		}
		if (!path.startsWith("/")) {
			path = '/' + path;
		}
		while (path.endsWith("/")) {
			path = path.substring(0, path.length() - 1);
		}
		return path;
	}
777200
public String findDatasetsName(String name) {
        if (datasetsSom.getName2Node().containsKey(name))
            return name;
        return datasetsSom.inverseSearchGlobal(Xml2Som.splitParts(name));
    }
141302
public JsonNode getDataAttr(String dPath) {
        Lock lock = lockForRead();
        try {
            return DPathUtils.getValue(dataJson, dPath);
        } finally {
            lock.unlock();
        }
    }
1362407
@Pure
	public String format(String sarlCode, ResourceSet resourceSet) {
		try {
			final URI createURI = URI.createURI("synthetic://to-be-formatted." + this.fileExtension); //$NON-NLS-1$
			final Resource res = this.resourceFactory.createResource(createURI);
			if (res instanceof XtextResource) {
				final XtextResource resource = (XtextResource) res;
				final EList<Resource> resources = resourceSet.getResources();
				resources.add(resource);
				try (StringInputStream stringInputStream = new StringInputStream(sarlCode)) {
					resource.load(stringInputStream, Collections.emptyMap());
					return formatResource(resource);
				} finally {
					resources.remove(resource);
				}
			}
			return sarlCode;
		} catch (Exception exception) {
			throw Exceptions.sneakyThrow(exception);
		}
	}
800242
def _set_annotation_to_str(annotation_data: Mapping[str, Mapping[str, bool]], key: str) -> str:
    """"""
    value = annotation_data[key]

    if len(value) == 1:
        return 'SET {} = "{}"'.format(key, list(value)[0])

    x = ('"{}"'.format(v) for v in sorted(value))

    return 'SET {} = {{{}}}'.format(key, ', '.join(x))
950334
public static String convertResourcePathToClassName(String resourcePath) {
        Assert.notNull(resourcePath, "Resource path must not be null");
        return resourcePath.replace(PATH_SEPARATOR, PACKAGE_SEPARATOR);
    }
1014226
public static JavaRDD<LabeledPoint> fromDataSet(JavaRDD<DataSet> data, boolean preCache) {
        if (preCache && !data.getStorageLevel().useMemory()) {
            data.cache();
        }
        return data.map(new Function<DataSet, LabeledPoint>() {
            @Override
            public LabeledPoint call(DataSet dataSet) {
                return toLabeledPoint(dataSet);
            }
        });
    }
28175
@Deprecated
  public static final String formatReferenceImageName(
      String project, String location, String product, String referenceImage) {
    return REFERENCE_IMAGE_PATH_TEMPLATE.instantiate(
        "project", project,
        "location", location,
        "product", product,
        "reference_image", referenceImage);
  }