\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
FileName | Input | string | The file to publish. | |
InputWorkspace | Input | Workspace | The workspace to publish. | |
NameInCatalog | Input | string | The name to give to the file being saved. The file name or workspace name is used by default. This can only contain alphanumerics, underscores or periods. | |
InvestigationNumber | Input | string | The investigation number where the published file will be saved to. | |
DataFileDescription | Input | string | A short description of the datafile you are publishing to the catalog. | |
Session | Input | string | The session information of the catalog to use. |
This algorithm allows a user (who is logged into a catalog) to publish datafiles or workspaces to investigations of which they are an investigator.Datafiles and workspaces that are published are automatically made private. This means only investigators of that investigation can view them.
Note: the catalog publish dialog is disabled if you are not an investigator on any investigations. This prevents attempts to publish to investigations of which you do not have access, which would result in an error.
Example - publish a datafile directly to the archives.
CAUTION: This usage example will only work if you are an investigator on the given investigation.
# To ensure the datafile is published to the correct catalog,
# store the session returned when logging in for use later.
session = CatalogLogin(USERNAME,PASSWORD)
# Publish a datafile to the archives.
CatalogPublish(
# The location of the datafile to publish to the archives.
FileName="~Desktop/exampleFile.nxs",
# The investigation to publish the datafile to. This could be obtained
# dynamically from CatalogSearch().
InvestigationNumber = 1193002,
# The description to save to the datafile in the archives.
DataFileDescription = "This datafile demonstrates the use of workflow N",
# Used to ensure the file is published to the correct catalog.
# This is required if you are logged into more than one catalog.
Session = session.getPropertyValue("Session")
)
Categories: AlgorithmIndex | DataHandling\Catalog
C++ header: CatalogPublish.h (last modified: 2020-03-20)
C++ source: CatalogPublish.cpp (last modified: 2020-04-07)