Returns a {@link ProjectMetadata} whose name equals to the specified {@code projectName}.
430897
public CompletableFuture<ProjectMetadata> getProject(String projectName) {
        requireNonNull(projectName, "projectName");
        return fetchMetadata(projectName).thenApply(HolderWithRevision::object);
    }
165105
def get_new_project_name(self, project_name):
        
        timestamp_str = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M')
        return "{} {}".format(project_name, timestamp_str)
289409
protected String extractProjectName(final BuildEvent event) {
        final Project project = event.getProject();
        return (project != null) ? project.getName() : null;
    }
672257
protected String generateProjectName(CmsObject userCms) {

        String projectName = generateProjectName(userCms, true);
        if (existsProject(projectName)) {
            projectName = generateProjectName(userCms, false);
        }
        return projectName;
    }
687851
public ProjectFileHandler getProjectFile(final int projectId, final int version) {
    log.info(
        String.format("Fetching project file. project ID: %d version: %d", projectId, version));
    // TODO spyne: remove huge hack ! There should not be any special handling for Database Storage.
    if (this.storage instanceof DatabaseStorage) {
      return ((DatabaseStorage) this.storage).get(projectId, version);
    }

    /* Fetch meta data from db */
    final ProjectFileHandler pfh = this.projectLoader.fetchProjectMetaData(projectId, version);

    /* Fetch project file from storage and copy to local file */
    final String resourceId = requireNonNull(pfh.getResourceId(),
        String.format("URI is null. project ID: %d version: %d",
            pfh.getProjectId(), pfh.getVersion()));
    try (InputStream is = this.storage.get(resourceId)) {
      final File file = createTempOutputFile(pfh);

      /* Copy from storage to output stream */
      try (FileOutputStream fos = new FileOutputStream(file)) {
        IOUtils.copy(is, fos);
      }

      /* Validate checksum */
      validateChecksum(file, pfh);

      /* Attach file to handler */
      pfh.setLocalFile(file);

      return pfh;
    } catch (final IOException e) {
      throw new StorageException(e);
    }
  }
1119445
public static String wrapProjectName(CmsObject cms, String name) {

        return Messages.get().getBundle(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(
            Messages.GUI_NORMAL_PROJECT_1,
            name);
    }
1037229
@Override
  public String key() {
    return new StringBuilder().append(projectKey).append(":").append(projectRelativePath).toString();
  }
1373979
public Request request(String name, Project project) {
        return request(name, project, null);
    }
922298
@Deprecated
  @SuppressWarnings("WeakerAccess")
  public com.google.bigtable.admin.v2.ProjectName getProjectName() {
    return com.google.bigtable.admin.v2.ProjectName.of(projectId);
  }
344284
def get_meta_type_by_name(name):
    data = get_default_metadata_data()
    child_data = get_child_metadata_data()
    for item in data["metadataObjects"]:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    for item in child_data:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    '''
        
    '''
    try:
        if config.describe_data != None:
            project_org_describe = config.describe_data
        if config.project != None and os.path.isfile(os.path.join(config.project.location,'config','.describe')):
            project_org_describe = parse_json_from_file(os.path.join(config.project.location,'config','.describe'))
        if project_org_describe != None and 'metadataObjects' in project_org_describe:
            for item in project_org_describe["metadataObjects"]:
                if 'xmlName' in item and item['xmlName'] == name:
                    return item
    except:
        pass
1237195
@Override
    @GET
    @Path("/invoke/{name}/{namespace}/{projectName}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response executeCommandViaGetNoPath(@PathParam("name") final String name,
                                               @PathParam("namespace") final String namespace,
                                               @PathParam("projectName") final String project) throws Exception {
        return executeCommandViaGet(name, namespace, project, "");

    }
251493
public CollectionRequest<ProjectMembership> findByProject(String project) {
    
        String path = String.format("/projects/%s/project_memberships", project);
        return new CollectionRequest<ProjectMembership>(this, ProjectMembership.class, path, "GET");
    }
1060335
public static ProjectWriter getProjectWriter(String name) throws InstantiationException, IllegalAccessException
   {
      int index = name.lastIndexOf('.');
      if (index == -1)
      {
         throw new IllegalArgumentException("Filename has no extension: " + name);
      }

      String extension = name.substring(index + 1).toUpperCase();

      Class<? extends ProjectWriter> fileClass = WRITER_MAP.get(extension);
      if (fileClass == null)
      {
         throw new IllegalArgumentException("Cannot write files of type: " + name);
      }

      ProjectWriter file = fileClass.newInstance();

      return (file);
   }
262056
def _update_project(self, project_name):
        ''''''
        project = self.projectdb.get(project_name)
        if not project:
            return None
        return self._load_project(project)
5442
def get_by_name(self, name):
        
        for p in self.project_list:
            if p.nme == name:
                return p
        return None
726092
@Override
  public Metadata createMetadata() {
    Metadata metadata = new Metadata();
    try {
      for (DataSet ds : iimFile.getDataSets()) {
        Object value = "";
        try {
          value = ds.getValue();
        } catch (Exception ex) {

        }
        DataSetInfo info = ds.getInfo();
        //System.out.println(info.toString() + " " + info.getName() + ": " + value);

        metadata.add(info.getName(), new Text(value.toString()));
      }
    } catch (Exception ex) {
      /*Nothing to be shown*/
    }

    return metadata;
  }
1031373
public ProjectMetrics getProjectProfile(String projectPath) {
        ProjectMetrics result = projects.get(projectPath);
        if (result == null) {
            result = new ProjectMetrics(projectPath);
            projects.put(projectPath, result);
        }
        return result;
    }