/*
(non-Javadoc)
@see org.fcrepo.kernel.api.models.FedoraBinary#getFilename()
976345
@Override
    public String getFilename() {
        try {
            if (hasDescriptionProperty(FILENAME)) {
                return getDescriptionProperty(FILENAME).getString().replace(FIELD_DELIMITER + XSDstring.getURI(), "");
            }
            return node.getName();
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
917529
private String getContenFileName() {
        final String file  = this.content.getPath();
        if(file.indexOf('/') != -1){
            return file.substring(file.lastIndexOf('/'));
        }
        return file;
    }
565876
@Nullable
  public String getSourceFileName() {
    StaticSourceFile file = getStaticSourceFile();
    return file == null ? null : file.getName();
  }
175849
public function getFilename()
	{
		if (is_null($this->filename)) {
			$this->filename = pathinfo($this->path, PATHINFO_BASENAME);
		}
		return $this->filename;
	}
531237
public function getFilename()
    {
        if ($this->isDirty && $this->filename) {
            return $this->filename;
        }

        if ($this->riakGridFSFile instanceof \RiakGridFSFile && $filename = $this->riakGridFSFile->getFilename()) {
            return $filename;
        }

        return $this->filename;
    }
978428
protected function getFileName(): string
    {
        if ($this->generatedFileName === null || Application::isCli()) {
            if ($this->fileNameFn !== null) {
                $this->generatedFileName = call_user_func($this->fileNameFn);
            } else {
                $this->generatedFileName = gmdate('Y-m-d') . '.log';
            }
        }

        return $this->generatedFileName;
    }
751482
public String fileName(int index) {
        byte_vector v = fs.file_name(index).to_bytes();
        return Vectors.byte_vector2utf8(v);
    }
722766
String getUIDFolderName() {
        if (uidFolderName == null) {
            String relPath = getAbsolutePath().replace(REPO_ABSOLUTE_PATH, "");
            relPath = relPath.substring(relPath.indexOf(SystemUtils.FILE_SEPARATOR) + 1);
            String[] parts = relPath.split("[\\\\/]");
            uidFolderName = StringUtils.isEmpty(parts[0]) ? "" : parts[0];
        }
        return uidFolderName;
    }
1234237
public String getFilename(String name)
    {
        List part = (List)_partMap.getValues(name);
        if (part==null)
            return null;
        return ((Part)part.get(0))._filename;
    }
584363
private String fileToName(File policyFile) throws PolicyIndexException {
        try {
            if (!policyFile.getName().endsWith(".xml"))
                throw new PolicyIndexException("Invalid policy file name.  Policy files must end in .xml - " + policyFile.getName());

            return PID.fromFilename(policyFile.getName().substring(0, policyFile.getName().lastIndexOf(".xml"))).toString();
        } catch (MalformedPIDException e) {
            throw new PolicyIndexException("Invalid policy file name.  Filename cannot be converted to a valid PID - " + policyFile.getName());
        }

    }
278998
@Override
    public String getIndexFileName(final String outputFileRoot) {
        final File indexDir = new File(outputFileRoot).getParentFile();
        setFilePath(indexDir.getAbsolutePath());
        return new File(indexDir, "index.xml").getAbsolutePath();
    }
501228
protected String toFilename(final Resource resource) throws UnsupportedOperationException {
        if (resource instanceof FileResource) {
            return ((FileResource) resource).getFile().getPath();
        }

        throw new UnsupportedOperationException("Unsupported resource type: " + resource);
    }
504500
public static String getFileName(String filePath) {
		if (filePath == null) {
			return filePath;
		}
		int index = filePath.lastIndexOf(File.separator);
		if (index == -1) {
			return filePath;
		}
		return filePath.substring(index + 1);
	}
547906
private String getFileName(Field field) {
        String fileName = field.getAnnotation(Plugin.Data.class).value();
        if ("##default".equals(fileName)) {
            fileName = getName() + ".json";
        }
        return fileName;
    }
1231206
@Override
    public String getSubmittedFileName() {
        if (_part.isFormField()) {
            return null;
        }
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getSubmittedFileName()",_part.getName());
        }
        return _part.getName();
    }
1261836
public static String getFileName(String filePath) {
       int separatorIndex = filePath.lastIndexOf(separator);
       return separatorIndex < 0 ? filePath : filePath.substring(separatorIndex + 1,
    		   filePath.length());
   }
753651
protected String getFilename(Object result, String filenamepre) {
    if(filenamepre == null || filenamepre.length() == 0) {
      filenamepre = "result";
    }
    for(int i = 0;; i++) {
      String filename = i > 0 ? filenamepre + "-" + i : filenamepre;
      Object existing = filenames.get(filename);
      if(existing == null || existing == result) {
        filenames.put(filename, result);
        return filename;
      }
    }
  }