本文整理汇总了Java中org.apache.commons.io.FilenameUtils.getFullPath方法的典型用法代码示例。如果您正苦于以下问题:Java FilenameUtils.getFullPath方法的具体用法?Java FilenameUtils.getFullPath怎么用?Java FilenameUtils.getFullPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.io.FilenameUtils
的用法示例。
在下文中一共展示了FilenameUtils.getFullPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JavaSerializationCluster2CurveRead
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private boolean JavaSerializationCluster2CurveRead() {
if (!new File(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_Clus2Cur.ser").exists()) {
return false;
}
try {
Logger.getRootLogger().debug("Reading PrecursorFragmentCorr serialization from file:" + FilenameUtils.getBaseName(ScanCollectionName) + "_Clus2Cur.ser...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_Clus2Cur.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
FragmentsClu2Cur = (HashMap<Integer, ArrayList<PrecursorFragmentPairEdge>>) in.readObject();
in.close();
fileIn.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例2: JavaSerializationPeakClusterRead
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private boolean JavaSerializationPeakClusterRead() {
if (!new File(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.ser").exists()) {
return false;
}
try {
Logger.getRootLogger().info("Reading PeakCluster serialization from file:" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.ser...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
PeakClusters = (ArrayList<PeakCluster>) in.readObject();
in.close();
fileIn.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例3: ReadDIASettingSerialization
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public static DIA_Setting ReadDIASettingSerialization(String filepath) {
if (!new File(FilenameUtils.getFullPath(filepath) + FilenameUtils.getBaseName(filepath) + "_diasetting.ser").exists()) {
return null;
}
try {
Logger.getRootLogger().debug("Reading DIA setting from file:" + FilenameUtils.getFullPath(filepath) + FilenameUtils.getBaseName(filepath) + "_diasetting.ser...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(filepath) + FilenameUtils.getBaseName(filepath) + "_diasetting.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
DIA_Setting setting = (DIA_Setting) in.readObject();
in.close();
fileIn.close();
return setting;
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return null;
}
}
示例4: LibraryMatchRead
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public static TargetMatchScoring LibraryMatchRead(String Filename, String LibID) throws FileNotFoundException {
if (!new File(FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.serFS").exists()) {
return null;
}
TargetMatchScoring match = null;
try {
Logger.getRootLogger().info("Loading Target library match results to file:" + FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.serFS...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.serFS");
FSTObjectInput in = new FSTObjectInput(fileIn);
match = (TargetMatchScoring) in.readObject();
in.close();
fileIn.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return null;
}
return match;
}
示例5: JavaSerializationCluster2CurveUnfragRead
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private boolean JavaSerializationCluster2CurveUnfragRead() {
if (!new File(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_UnfClus2Cur.ser").exists()) {
return false;
}
try {
Logger.getRootLogger().debug("Reading UnfragPrecursorFragCorr serialization from file:" + FilenameUtils.getBaseName(ScanCollectionName) + "_UnfClus2Cur.ser...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_UnfClus2Cur.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
UnFragIonClu2Cur = (HashMap<Integer, ArrayList<PrecursorFragmentPairEdge>>) in.readObject();
in.close();
fileIn.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例6: FS_PeakClusterRead
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private boolean FS_PeakClusterRead() {
if (!new File(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.serFS").exists()) {
return false;
}
try {
Logger.getRootLogger().info("Reading PeakCluster serialization from file:" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.serFS...");
FileInputStream fileIn = new FileInputStream(FilenameUtils.getFullPath(ParentmzXMLName) + FilenameUtils.getBaseName(ParentmzXMLName) + "_Peak/" + FilenameUtils.getBaseName(ScanCollectionName) + "_PeakCluster.serFS");
FSTObjectInput in = new FSTObjectInput(fileIn);
PeakClusters = (ArrayList<PeakCluster>) in.readObject();
in.close();
fileIn.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
if (FS_PeakClusterRead_Old()) {
WritePeakClusterSerialization();
return true;
}
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例7: Convert
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public void Convert() {
try {
String[] msconvertcmd = {msconvertpath, "--mzXML", "--32", "-z", SpectrumPath, "-o", FilenameUtils.getFullPath(SpectrumPath)};
Process p = Runtime.getRuntime().exec(msconvertcmd);
Logger.getRootLogger().info("MGF file coversion by msconvert.exe...." + SpectrumPath);
Logger.getRootLogger().debug("Command: " + Arrays.toString(msconvertcmd));
PrintThread printThread = new PrintThread(p);
printThread.start();
p.waitFor();
if (p.exitValue() != 0) {
Logger.getRootLogger().info("msconvert : " + SpectrumPath + " failed");
//PrintOutput(p);
return;
}
} catch (IOException | InterruptedException ex) {
java.util.logging.Logger.getLogger(MSConvert.class.getName()).log(Level.SEVERE, null, ex);
}
}
示例8: getDownloadUrl
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
/**
* Get a signed url to view an attachment. The url will last 24 hours. The file name portion of the id is url escaped internally.
*
* @param id The id of the attachment.
* @return Url
*/
public String getDownloadUrl(String id) {
String filename = FilenameUtils.getName(id);
String path = FilenameUtils.getFullPath(id);
String escapedFullPath = FilenameUtils.concat(path, UrlEscapers.urlFragmentEscaper().escape(filename));
return cloudStorage.generateSignedUrl(gcsDefaultBucket, escapedFullPath, DEFAULT_LINK_EXPIRY_DURATION);
}
示例9: ExportPepIonCSV
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private void ExportPepIonCSV(String folder) throws IOException {
if (folder == null | "".equals(folder)) {
folder = FilenameUtils.getFullPath(mzXMLFileName);
}
Logger.getRootLogger().info("Writing PepIon result to file:" + folder + FilenameUtils.getBaseName(mzXMLFileName) + "_PepIonIDs.csv...");
FileWriter writer = new FileWriter(folder + FilenameUtils.getBaseName(mzXMLFileName) + "_PepIonIDs.csv");
writer.write("PepIndex,Sequence,ModSeq,TPPModSeq,IsNonDegenerate,Charge,mz,IDRT,PeakRT,NoPSMs,MS1ClusIndex,MS2ClusIndex,PeakScore,PeakHeight1,PeakHeight2,PeakHeight3,PeakArea1,PeakArea2,PeakArea3\n");
for (PepIonID pepion : PepIonList.values()) {
writer.write(pepion.Index + "," + pepion.Sequence + "," + pepion.ModSequence + "," + pepion.TPPModSeq + "," + (pepion.Is_NonDegenerate ? 1 : 0) + "," + pepion.Charge + "," + pepion.NeutralPrecursorMz() + "," + pepion.GetIDRT() + "," + pepion.PeakRT + "," + pepion.GetSpectralCount() + "," + pepion.GetMS1ClusIndex() + "," + pepion.GetMS2ClusIndex() + "," + pepion.PeakClusterScore + "," + pepion.PeakHeight[0] + "," + pepion.PeakHeight[1] + "," + pepion.PeakHeight[2] + "," + pepion.PeakArea[0] + "," + pepion.PeakArea[1] + "," + pepion.PeakArea[2] + "\n");
}
writer.close();
}
示例10: LibraryMatchWriteJS
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public boolean LibraryMatchWriteJS() throws FileNotFoundException {
try {
Logger.getRootLogger().info("Writing Target match results to file:" + FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.ser...");
FileOutputStream fout2 = new FileOutputStream(FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.ser", false);
ObjectOutputStream oos = new ObjectOutputStream(fout2);
oos.writeObject(this);
oos.close();
fout2.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例11: LibraryMatchWrite
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public boolean LibraryMatchWrite() throws FileNotFoundException {
try {
Logger.getRootLogger().info("Writing Target match results to file:" + FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.serFS...");
FileOutputStream fout = new FileOutputStream(FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + "_" + LibID + "_LibMatch.serFS", false);
FSTObjectOutput out = new FSTObjectOutput(fout);
out.writeObject(this);
out.close();
fout.close();
} catch (Exception ex) {
Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例12: ExportMappedPepIonCSV
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private void ExportMappedPepIonCSV() throws IOException {
Logger.getRootLogger().info("Writing MappedPepIonIDs result to file:" + FilenameUtils.getFullPath(mzXMLFileName) + FilenameUtils.getBaseName(mzXMLFileName) + "_MappedPepIonIDs.csv...");
FileWriter writer = new FileWriter(FilenameUtils.getFullPath(mzXMLFileName) + FilenameUtils.getBaseName(mzXMLFileName) + "_MappedPepIonIDs.csv");
writer.write("PepIndex,Sequence,ModSeq,TPPModSeq,ModInfo,Charge,mz,PredictRT, PeakRT,MS1ClusIndex,MS2ClusIndex,PeakScore,PeakHeight1,PeakHeight2,PeakHeight3,PeakArea1,PeakArea2,PeakArea3,MS1AlignmentProb,MS1AlignmentLProb,MS2AlignmentProb,MS2AlignmentLProb\n");
int index = 1;
for (PepIonID pepion : MappedPepIonList.values()) {
writer.write((index++) + "," + pepion.Sequence + "," + pepion.ModSequence + "," + pepion.TPPModSeq + "," + pepion.GetModificationString() + "," + pepion.Charge + "," + pepion.NeutralPrecursorMz() + "," + pepion.PredictRTString() + "," + pepion.PeakRT + "," + pepion.GetMS1ClusIndex() + "," + pepion.GetMS2ClusIndex() + "," + pepion.PeakClusterScore + "," + pepion.PeakHeight[0] + "," + pepion.PeakHeight[1] + "," + pepion.PeakHeight[2] + "," + pepion.PeakArea[0] + "," + pepion.PeakArea[1] + "," + pepion.PeakArea[2] + "," + pepion.MS1AlignmentProbability + "," + pepion.UScoreProbability_MS1 + "," + pepion.MS2AlignmentProbability + "," + pepion.UScoreProbability_MS2 + "\n");
}
writer.close();
}
示例13: FasterSerialzationWrite
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public boolean FasterSerialzationWrite(String Filename) throws FileNotFoundException {
try {
org.apache.log4j.Logger.getRootLogger().info("Writing fasta serialization to file:" + FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + ".FastaSer...");
FileOutputStream fout = new FileOutputStream(FilenameUtils.getFullPath(Filename) + FilenameUtils.getBaseName(Filename) + ".FastaSer", false);
FSTObjectOutput out = new FSTObjectOutput(fout);
out.writeObject(this);
out.close();
fout.close();
} catch (Exception ex) {
org.apache.log4j.Logger.getRootLogger().error(ExceptionUtils.getStackTrace(ex));
return false;
}
return true;
}
示例14: FindPSMRT
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
private void FindPSMRT() {
try {
if (!new File(FilenameUtils.getFullPath(Filename) + GetQ1Name() + ".mzXML").exists()) {
Logger.getRootLogger().warn(FilenameUtils.getFullPath(Filename) + GetQ1Name() + ".mzXML doesn't exsit.");
return;
}
if (!new File(FilenameUtils.getFullPath(Filename) + GetQ2Name() + ".mzXML").exists()) {
Logger.getRootLogger().warn(FilenameUtils.getFullPath(Filename) + GetQ2Name() + ".mzXML doesn't exsit.");
return;
}
if (!new File(FilenameUtils.getFullPath(Filename) + GetQ3Name() + ".mzXML").exists()) {
Logger.getRootLogger().warn(FilenameUtils.getFullPath(Filename) + GetQ3Name() + ".mzXML doesn't exsit.");
return;
}
mzXMLParser mgfname1 = new mzXMLParser(FilenameUtils.getFullPath(Filename) + GetQ1Name() + ".mzXML", parameter, SpectralDataType.DataType.DDA, null, NoCPUs);
mzXMLParser mgfname2 = new mzXMLParser(FilenameUtils.getFullPath(Filename) + GetQ2Name() + ".mzXML", parameter, SpectralDataType.DataType.DDA, null, NoCPUs);
mzXMLParser mgfname3 = new mzXMLParser(FilenameUtils.getFullPath(Filename) + GetQ3Name() + ".mzXML", parameter, SpectralDataType.DataType.DDA, null, NoCPUs);
HashMap<String, mzXMLParser> mgfs = new HashMap<>();
mgfs.put(GetQ1Name(), mgfname1);
mgfs.put(GetQ2Name(), mgfname2);
mgfs.put(GetQ3Name(), mgfname3);
for (PSM psm : IDsummary.PSMList.values()) {
if (psm.RetentionTime == -1f) {
psm.RetentionTime = mgfs.get(psm.GetRawNameString()).GetScanElutionTimeMap().get(psm.ScanNo);
psm.NeighborMaxRetentionTime = psm.RetentionTime;
}
}
} catch (Exception ex) {
Logger.getRootLogger().warn("Exception trying to fill PSM RTs");
}
}
示例15: GetIPROPHETProtXML
import org.apache.commons.io.FilenameUtils; //导入方法依赖的package包/类
public String GetIPROPHETProtXML() {
return FilenameUtils.getFullPath(ParentmzXMLName) + "interact-" + FilenameUtils.getBaseName(ParentmzXMLName) + ".iproph.prot.xml";
}