public class JIPipeProject extends Object implements JIPipeValidatable
Modifier and Type | Class and Description |
---|---|
static class |
JIPipeProject.CompartmentAddedEvent
Triggered when a sample is added to an
JIPipeProject |
static class |
JIPipeProject.CompartmentAddedEventEmitter |
static interface |
JIPipeProject.CompartmentAddedEventListener |
static class |
JIPipeProject.CompartmentRemovedEvent
Triggered when a sample is removed from an
JIPipeProject |
static class |
JIPipeProject.CompartmentRemovedEventEmitter |
static interface |
JIPipeProject.CompartmentRemovedEventListener |
static class |
JIPipeProject.Deserializer
Deserializes a project
|
static class |
JIPipeProject.Serializer
Serializes a project
|
Modifier and Type | Field and Description |
---|---|
static int |
CURRENT_PROJECT_FORMAT_VERSION
The current version of the project format.
|
Constructor and Description |
---|
JIPipeProject()
A JIPipe project
|
Modifier and Type | Method and Description |
---|---|
JIPipeProjectCompartment |
addCompartment(String name)
Adds a new project compartment
|
void |
connectCompartments(JIPipeProjectCompartment source,
JIPipeProjectCompartment target)
Connects two compartments
|
JIPipeProjectCompartment |
findCompartment(String uuidOrAlias)
Finds a compartment by UUID or alias
|
void |
fromJson(com.fasterxml.jackson.databind.JsonNode jsonNode,
JIPipeValidationReportContext context,
JIPipeValidationReport report,
JIPipeNotificationInbox notifications)
Loads the project from JSON
|
Map<String,JIPipeMetadataObject> |
getAdditionalMetadata() |
JIPipeGraphNode.BaseDirectoryChangedEventEmitter |
getBaseDirectoryChangedEventEmitter() |
JIPipeLocalProjectMemoryCache |
getCache() |
JIPipeProject.CompartmentAddedEventEmitter |
getCompartmentAddedEventEmitter() |
JIPipeGraph |
getCompartmentGraph() |
JIPipeProject.CompartmentRemovedEventEmitter |
getCompartmentRemovedEventEmitter() |
com.google.common.collect.BiMap<UUID,JIPipeProjectCompartment> |
getCompartments() |
Set<JIPipeGraphNode> |
getDeactivatedAlgorithms()
Returns a list of all nodes that cannot be executed or are deactivated by the user.
|
Map<String,Path> |
getDirectoryMap()
Gets a map of user-defined directories
|
JIPipeGraph |
getGraph() |
Set<JIPipeDataSlot> |
getHeavyIntermediateAlgorithmOutputSlots()
Returns a list of all nodes that generate heavy data (
LabelAsJIPipeHeavyData ) and are intermediate (see getIntermediateAlgorithms()). |
JIPipeProjectHistoryJournal |
getHistoryJournal() |
Set<JIPipeGraphNode> |
getIntermediateAlgorithms()
Returns all nodes that have at least one connected algorithm that uses its generated data.
|
JIPipeProjectMetadata |
getMetadata() |
List<JIPipeNodeExample> |
getNodeExamples(String nodeTypeId)
Gets all examples for a node type ID.
|
JIPipeProjectInfoParameters |
getPipelineParameters()
Returns the global parameters for this pipeline
|
JIPipeProjectRunSetsConfiguration |
getRunSetsConfiguration() |
JIPipeRuntimePartitionConfiguration |
getRuntimePartitions() |
<T extends JIPipeProjectSettingsSheet> |
getSettingsSheet(Class<T> klass) |
<T extends JIPipeProjectSettingsSheet> |
getSettingsSheet(String id,
Class<T> klass) |
Map<String,JIPipeProjectSettingsSheet> |
getSettingsSheets() |
Set<JIPipeDependency> |
getSimplifiedMinimalDependencies() |
JIPipeRunnableQueue |
getSnapshotQueue() |
Path |
getTemporaryBaseDirectory() |
void |
getTextDescription(StringBuilder stringBuilder,
int headingLevel)
Gets a description of the project as text
|
Path |
getWorkDirectory()
Gets the folder where the project is currently working in
|
static Set<JIPipeDependency> |
loadDependenciesFromJson(com.fasterxml.jackson.databind.JsonNode node)
Deserializes the set of project dependencies from JSON.
|
static JIPipeProjectMetadata |
loadMetadataFromJson(com.fasterxml.jackson.databind.JsonNode node)
Deserializes the project metadata from JSON
|
static JIPipeProject |
loadProject(Path fileName,
JIPipeValidationReportContext context,
JIPipeValidationReport report)
Loads a project from a file
|
static JIPipeProject |
loadProject(Path fileName,
JIPipeValidationReportContext context,
JIPipeValidationReport report,
JIPipeNotificationInbox notifications)
Loads a project from a file
|
Path |
newTemporaryDirectory()
Creates a new temporary subdirectory in the project's temporary directory
|
Path |
newTemporaryDirectory(String baseName)
Creates a new temporary subdirectory in the project's temporary directory
|
Path |
newTemporaryFilePath(String baseName,
String suffix)
Gets the path to a non-existing file in the project's temporary directory
|
void |
rebuildAliasIds(boolean force)
Re-assigns graph node Ids based on their name
|
void |
rebuildCompartmentsFromGraph()
Rebuilds the compartment list from the current state of the compartment graph
|
void |
removeCompartment(JIPipeProjectCompartment compartment)
Removes a compartment
|
void |
reportValidity(JIPipeValidationReportContext reportContext,
JIPipeValidationReport report)
Generates a validity report
|
void |
reportValidity(JIPipeValidationReportContext context,
JIPipeValidationReport report,
JIPipeGraphNode targetNode)
Reports the validity for the target node and its dependencies
|
void |
saveProject(OutputStream outputStream)
Saves the project
|
void |
saveProject(Path fileName)
Saves the project
|
void |
saveProject(Writer writer)
Saves the project
|
void |
setAdditionalMetadata(Map<String,JIPipeMetadataObject> additionalMetadata) |
void |
setWorkDirectory(Path workDirectory)
Sets the folder where the project is currently working in.
|
void |
toJson(com.fasterxml.jackson.core.JsonGenerator generator)
Writes the project to JSON
|
void |
updateCompartmentOutputs(JIPipeProjectCompartment compartment) |
void |
validateUserDirectories(JIPipeNotificationInbox notifications)
Checks if the project metadata user directories are properly set up.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateValidityReport
public static final int CURRENT_PROJECT_FORMAT_VERSION
public static JIPipeProject loadProject(Path fileName, JIPipeValidationReportContext context, JIPipeValidationReport report) throws IOException
fileName
- JSON filecontext
- the contextreport
- issue reportIOException
- Triggered by ObjectMapper
public static JIPipeProject loadProject(Path fileName, JIPipeValidationReportContext context, JIPipeValidationReport report, JIPipeNotificationInbox notifications) throws IOException
fileName
- JSON filecontext
- the contextreport
- issue reportnotifications
- notifications for the userIOException
- Triggered by ObjectMapper
public static Set<JIPipeDependency> loadDependenciesFromJson(com.fasterxml.jackson.databind.JsonNode node)
node
- JSON nodeJIPipeMutableDependency
public static JIPipeProjectMetadata loadMetadataFromJson(com.fasterxml.jackson.databind.JsonNode node)
node
- JSON nodepublic void validateUserDirectories(JIPipeNotificationInbox notifications)
notifications
- the notificationspublic Path newTemporaryFilePath(String baseName, String suffix)
baseName
- the base name (prefix)suffix
- the suffix (extension)public Path newTemporaryDirectory(String baseName)
baseName
- the base name (prefix)public Path newTemporaryDirectory()
public Path getTemporaryBaseDirectory()
public JIPipeProjectCompartment findCompartment(String uuidOrAlias)
uuidOrAlias
- UUID or aliaspublic JIPipeRunnableQueue getSnapshotQueue()
public JIPipeGraph getGraph()
public void saveProject(Path fileName) throws IOException
fileName
- Target fileIOException
- Triggered by ObjectMapper
public void saveProject(Writer writer) throws IOException
writer
- Target writerIOException
- Triggered by ObjectMapper
public void saveProject(OutputStream outputStream) throws IOException
outputStream
- Target writerIOException
- Triggered by ObjectMapper
public JIPipeLocalProjectMemoryCache getCache()
public com.google.common.collect.BiMap<UUID,JIPipeProjectCompartment> getCompartments()
public JIPipeProject.CompartmentAddedEventEmitter getCompartmentAddedEventEmitter()
public JIPipeProject.CompartmentRemovedEventEmitter getCompartmentRemovedEventEmitter()
public Map<String,JIPipeProjectSettingsSheet> getSettingsSheets()
public <T extends JIPipeProjectSettingsSheet> T getSettingsSheet(String id, Class<T> klass)
public <T extends JIPipeProjectSettingsSheet> T getSettingsSheet(Class<T> klass)
public JIPipeGraphNode.BaseDirectoryChangedEventEmitter getBaseDirectoryChangedEventEmitter()
public JIPipeProjectCompartment addCompartment(String name)
name
- Compartment namepublic void connectCompartments(JIPipeProjectCompartment source, JIPipeProjectCompartment target)
source
- Source compartmenttarget
- Target compartmentpublic void updateCompartmentOutputs(JIPipeProjectCompartment compartment)
public void reportValidity(JIPipeValidationReportContext reportContext, JIPipeValidationReport report)
JIPipeValidatable
reportValidity
in interface JIPipeValidatable
reportContext
- the report contextreport
- the report to be added topublic void reportValidity(JIPipeValidationReportContext context, JIPipeValidationReport report, JIPipeGraphNode targetNode)
context
- the contextreport
- the reporttargetNode
- the target nodepublic JIPipeGraph getCompartmentGraph()
JIPipeProjectCompartment
nodes.public void removeCompartment(JIPipeProjectCompartment compartment)
compartment
- The compartmentpublic JIPipeProjectMetadata getMetadata()
public Path getWorkDirectory()
public void setWorkDirectory(Path workDirectory)
workDirectory
- Project work directorypublic Set<JIPipeDependency> getSimplifiedMinimalDependencies()
public void rebuildAliasIds(boolean force)
force
- force updatingpublic JIPipeProjectRunSetsConfiguration getRunSetsConfiguration()
public JIPipeRuntimePartitionConfiguration getRuntimePartitions()
public Map<String,JIPipeMetadataObject> getAdditionalMetadata()
public void setAdditionalMetadata(Map<String,JIPipeMetadataObject> additionalMetadata)
public void toJson(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
generator
- the JSON generatorIOException
- thrown by JsonGenerator
public void fromJson(com.fasterxml.jackson.databind.JsonNode jsonNode, JIPipeValidationReportContext context, JIPipeValidationReport report, JIPipeNotificationInbox notifications) throws IOException
jsonNode
- the nodecontext
- the contextnotifications
- notifications for the userIOException
public void rebuildCompartmentsFromGraph()
public Set<JIPipeGraphNode> getDeactivatedAlgorithms()
public Set<JIPipeGraphNode> getIntermediateAlgorithms()
public Set<JIPipeDataSlot> getHeavyIntermediateAlgorithmOutputSlots()
LabelAsJIPipeHeavyData
) and are intermediate (see getIntermediateAlgorithms()).
Skips all nodes that do not save outputs.public JIPipeProjectInfoParameters getPipelineParameters()
public JIPipeProjectHistoryJournal getHistoryJournal()
public List<JIPipeNodeExample> getNodeExamples(String nodeTypeId)
nodeTypeId
- the IDpublic void getTextDescription(StringBuilder stringBuilder, int headingLevel)
stringBuilder
- the string builderheadingLevel
- the heading levelCopyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.