Skip to content

Commit

Permalink
cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
wow-such-code committed Jul 24, 2024
1 parent dbcbfb7 commit 62d5ef5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 31 deletions.
29 changes: 0 additions & 29 deletions src/main/java/life/qbic/io/PetabParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;
Expand All @@ -12,7 +11,6 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import life.qbic.model.petab.PetabMetadata;

Expand Down Expand Up @@ -84,31 +82,4 @@ private File findYaml(File directory) {
return null;
}

/**
* adds key-value pairs to the bottom of a petab.yaml found below the provided path
*
* @param outputPath the path of the PEtab
* @param properties map of properties to add
*/
public void addParameters(String outputPath, Map<String, String> properties) {

File directory = new File(outputPath);

File yaml = findYaml(directory);
if (yaml != null) {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(yaml.getPath(), true);
for (Map.Entry<String, String> entry : properties.entrySet()) {
String line = entry.getKey() + ": " + entry.getValue() + "\n";
fos.write(line.getBytes());
}
fos.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public void run() {
System.out.println("Could not add dataset identifier.");
throw new RuntimeException(e);
}
//parser.addParameters(outputPath, result.getProperties()); //TODO: might be used in the future
System.out.println("Done");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void run() {
}
System.out.println();
System.out.println("Reference datasets found, uploading dataset...");
System.out.println();//TODO copy and remove source references
System.out.println();
//TODO copy and remove source references here
DataSetPermId result = openbis.registerDataset(Path.of(dataPath), experimentID, parents);
System.out.printf("Dataset %s was successfully created%n", result.getPermId());
}
Expand Down

0 comments on commit 62d5ef5

Please sign in to comment.