Repository Objects
This defines the basic functionality for a content repository.
Unlike the file persistence tasks defined by TaskFactory,
these are executed synchronously through the repository object rather
than indirectly via the Session.
r.createFolder(parentFolder, newFolder) : string
parentFolder (string) : the path to the parent
folder
newFolder (string) : the new folder name
Creates a new folder with the specified name.
Exceptions:
SessionException : if the folder cannot be created
r.createRetrieveURI(path, version, label) : URI
path (string) : the full path to the object to
be retrieved
version (string) : the version marker or None
label (string) : the label or None
A utility function to create a repository URI that is valid for
retrieving an object from the specified location. Either a version
or label may be specified if a specific version is required. If both
are None then the LATEST version will be returned.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
r.createStoreURI(path, label) : URI
path (string) : the full path to the store location
label (string) : the label to be applied to the
object or None
A utility function to create a repository URI that is valid for storing an object at the specified location and with an optional label to be applied to the object when it is stored.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
r.deleteFolder(folder)
folder (string) : the folder to be deleted
Deletes the specified folder and any content within it.
Exceptions:
SessionException : if the folder cannot be deleted
r.getRepositoryHandle() : Object
Returns the underlying repository handle. The handle will be an
instance of the Java class com.spss.repository.client.application.Repository.
r.renameFolder(folder, newName)
folder (string) : the path of the folder to be
renamed
newName (string) : the new folder name
Renames the specified folder.
Exceptions:
SessionException : if the folder cannot be renamed
r.retrieveDocument(path, version, label, autoManage) : DocumentOutput
path (string) : the full path to the object
version (string) : the version marker or None
label (string) : the label or None
autoManage (boolean) : whether the document should
be added to the output manager
Retrieves an output document (in COU format) from the specified path. Either a version or label
may be specified if a specific version is required. If both are None then the
LATEST version is returned. Code that needs to open documents privately without having them made
visible to the user should set the autoManage flag to False.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the document output cannot
be retrieved for some reason
r.retrieveModel(path, version, label, autoManage) : ModelOutput
path (string) : the full path to the object
version (string) : the version marker or None
label (string) : the label or None
autoManage (boolean) : whether the model should
be added to the model manager
Retrieves a model output from the specified path. Either a version
or label may be specified if a specific version is required. If both
are None then the LATEST version is returned. Code
that needs to open models privately without having them made visible
to the user should set the autoManage flag to False.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the model output cannot
be retrieved for some reason
r.retrieveProcessor(path, version, label, diagram) : Node
path (string) : the full path to the object
version (string) : the version marker or None
label (string) : the label or None
diagram (Diagram) : the diagram that the node
should be added to
Retrieves a node from the specified path and inserts it into the
supplied diagram. Either a version or label may be specified if a
specific version is required. If both are None then
the LATEST version is returned.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the node cannot be retrieved
for some reason
r.retrieveStream(path, version, label, autoManage) : Stream
path (string) : the full path to the object
version (string) : the version marker or None
label (string) : the label or None
autoManage (boolean) : whether the stream should
be added to the stream manager
Retrieves a stream from the specified path. Either a version or
label may be specified if a specific version is required. If both
are None then the LATEST version is returned. Code
that needs to open streams privately without having them made visible
to the user should set the autoManage flag to False.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the stream cannot be retrieved
for some reason
r.storeDocument(documentOutput, path, label) : string
documentOutput (DocumentOutput) : the document
output to be stored
path (string) : the path
label (string) : the label or None
Stores a document output to the specified location. If the label is provided then it is applied to the new version.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the document output cannot
be stored for some reason
r.storeModel(modelOutput, path, label) : string
modelOutput (ModelOutput) : the model output to
be stored
path (string) : the path
label (string) : the label or None
Stores a model output to the specified location. If the label is provided then it is applied to the new version.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the model output cannot
be stored for some reason
r.storeProcessor(node, path, label) : string
node (Node) : the node to be stored
path (string) : the path
label (string) : the label or None
Stores a node to the specified location. If the label is provided then it is applied to the new version.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the node cannot be stored
for some reason
r.storeStream(stream, path, label) : string
stream (Stream) : the stream to be stored
path (string) : the path
label (string) : the label or None
Stores a stream to the specified location. If the label is provided then it is applied to the new version.
Exceptions:
URISyntaxException : if the method cannot construct
a valid URI
SessionException : if the stream cannot be stored
for some reason