#include <seWorkspace.h>
Public Member Functions | |
seWorkspace (const char *name=NULL, const char *params=NULL) | |
virtual | ~seWorkspace () |
virtual void | open (const char *name=NULL, const char *params=NULL) |
virtual void | close () |
virtual bool | isValid () const |
virtual void | setName (const char *name) |
virtual const char * | getName () const |
Returns the workspace name. | |
virtual void | openTransmittalByFile (const char *file_name, seTransmittal &xmtal, SE_Access_Mode access_mode=SE_AC_MODE_READ_ONLY) |
void | createTransmittal (const char *file_name, seTransmittal &xmtal) |
void | editTransmittal (const char *file_name, seTransmittal &xmtal) |
virtual void | openTransmittalByURN (const char *xmtal_urn, seTransmittal &xmtal, SE_Access_Mode access_mode=SE_AC_MODE_READ_ONLY) |
virtual unsigned int | getOpenedTransmittalCount () const |
virtual void | getOpenedTransmittal (unsigned int index, seTransmittal &xmtal) const |
virtual const char * | resolveTransmittalURN (const char *xmtal_urn) |
virtual void | createUnresolvedObject (const char *xmtal_urn, const char *obj_label, seObject &obj) const |
virtual void | setITRBehaviour (SE_ITR_Behaviour itr_behaviour) |
virtual SE_ITR_Behaviour | getITRBehaviour () |
virtual void | setAccessModeInheritance (bool tf) |
virtual bool | getAccessModeInheritance () const |
virtual void | setITRResolverPath (const char *new_path) |
virtual const char * | getITRResolverPath () const |
virtual void | setMemoryModel (unsigned int mem_model) |
virtual unsigned int | getMemoryModel () const |
virtual const char * | getImplVerInfo () const |
Protected Member Functions | |
seWorkspace (const seWorkspace &other) | |
Not allowed. | |
seWorkspace & | operator= (const seWorkspace &) |
Not allowed. |
seWorkspace wksp; seTransmittal xmtal1, xmtal2; wksp.setITRResolverPath(myResolverPath); wksp.openTransmittalByFile(fileName1, xmtal1); wksp.openTransmittalByFile(fileName2, xmtal2); ... work on transmittals
seException | on error. |
|
Creates and opens an seWorkspace. Workspaces are the only way to open transmittals. You can keep as many workspaces as you need to group the opening/creation/access to transmittals. You can close() and re open() a workspace with the caveates explained in those methods.
|
|
Destructor, calls close().
|
|
|
|
Closes the workspace and releases the handle to the workspace. All transmittals opened by this workspace are closed. Note that after a workspace handle is close you can't do much with this handle. To make the workspace handle valid again you must call open() to open a new workspace.
|
|
Create a transmittal. Convenience method for openTransmittalByFile() in CREATE mode.
|
|
Creates an unresolved object that references an object in another transmittal. This method is used to create an object that references an object in another transmittal using the ITR mechanism. You can use the returned object pretty much like you would use any other object (for example you can add it as a component/associate of another). However, you cannot call methods that require it to be resolved since they will fail with an exception. For example, to create an ITR reference to transmittal B and to add a published object B in that transmittal as a component of object A in transmittal A, you can do: ... seObject itr_obj; wksp.createUnresolvedObject(urn_B, label_B, itr_obj); obj_A.addComponent(itr_obj); ... seObject itr_obj; wksp.createUnresolvedObject(urn_A, label_A, itr_obj); itr_obj.addComponent(obj_B);
|
|
Open a transmittal for edit. Convenience method for openTransmittalByFile() in UPDATE mode.
|
|
Returns the workspace access mode inheritance flag.
|
|
Returns the implementation version of the API component. |
|
Returns the workspace ITR behaviour. @see setITRBehaviour() |
|
Returns the workspace resolver path.
|
|
Returns the memory model in use by the workspace.
|
|
|
|
Returns a handle to an opened transmittal by index. seWorkspace wksp; ... open transmittals for (unsigned int i=0; i < wksp.getOpenedTransmittalCount(); i++) { seTransmittal xmtal; wksp.getOpenedTransmittal(i, xmtal); cout << xmtal.getFileName() << " is opened" << endl; }
|
|
Returns the current number of opened transmittals in this workspace.
|
|
Returns true if this workspace handle is valid (workspace is opened). seWorkspace wksp; ... if (wksp.isValid()) cout << "Workspace is opened"; |
|
Opens a previously closed workspace. seWorkspace wksp("a name"); // implicit open() ... wksp.openTransmittalByFile(...); ... wksp.close(); ... wksp.open("another name"); wksp.openTransmittalByFile(...);
|
|
Opens a transmittal by file using the access mode specified. This is the general way to open a transmittal by file. You can also use the convenience methods createTransmittal() and editTransmittal() to create and open transmittals for editing, respectively. seWorkspace wksp; seTransmittal xmtal; seDRMTransmittalRoot root_obj; wksp.openTransmittalByFile("transmittals/test.stf", xmtal); cout << xmtal.getFileName() << " is now opened"; xmtal.getRootObject(root_obj); ... process transmittal hierarchy
|
|
Open a transmittal by its URN. The API uses resolver files to map a URN to a resource location (typically a file on a disk). See resolveTransmittalURN() for more information on resolver files.
|
|
|
|
Resolves a transmittal URN to a transmittal resource location. The API uses a search mechanism to look for resolver files with the appropriate mapping of a URN to a resource. The default extension for SEDRIS resolver files is ".rsl", and the default file name for SEDRIS resolver files is "sedris.rsl". The resolution process proceeds as follows until the URN is resolved:
TRANSMITTAL urn:sedris:xyzcorp:xyz_data_orlando:1 3.1:stf:3.1 file:///${CUR_RESOLVE_DIR}\xyz_mco.stf seWorkspace wksp; const char *file_path; if (wksp.resolveTransmittalURN("xyz_data_orlando", &file_path)) { cout << "Transmittal is at " << file_path << endl; } The format of a valid SEDRIS name is as follows: urn:sedris:<delegated_creation_authority>:<assigned_transmittal_name> [:<transmittal_version_serial>]
The first 11 characters are required fields that represent a sentinel for the SEDRIS namespace. These fields must be present for the name string to be considered valid. The <delegated_creation_authority> is the string representing the portion of the SEDRIS namespace that has been delegated by the SEDRIS namespace registrar to the group, organization, or body that has authority for the assignment of transmittal named within the delegated namespace. This string may represent a sub-delegation by the registered authority to another group, organization or body. The <assigned_transmittal_name> is the string representing a specific transmittal, and the optional <transmittal_version_serial> allows for a more specific designation of the transmittal to resolve. The rules governing the naming and versioning of SEDRIS transmittals are described more fully in the SEDRIS documentation set.
|
|
Sets whether access modes are inherited by the automatic ITR resolution process. This flag indicates whether the access mode used when opening transmittals should be propagated to transmittals opened by the automatic ITR resolution process (see setITRBehaviour()). For example, if you open a transmittal in update mode, the access mode inheritance flag is set to true (i.e. to inherit the modes), and the ITR behaviour is set to automatically resolve, then all transmittals being referenced will also be opened in update mode. If this flag is set to false, then (if automatic resolution is enabled) ITR references will be opened in read only mode.
|
|
Sets the ITR behaviour to use in the workspace from now on. The ITR behaviour determines how iterators and objects behave when they encounter an ITR reference. See seIterator::getNext() for information on iterator behaviour. Also see the documentation for the SE_ITR_Behaviour type for more information.
|
|
Sets the ITR resolver path to use in the workspace from now on. The resolver path is used to find resolver files when resolving a transmittal URN to an actual resource (typically a disk file). You may specify multiple directories by separating them with colons (:) in Unix systems or semicolons (;) in Win32 systems.
|
|
Sets the memory model used by transmittals. The operation of the memory model is transmittal implementation dependent. The default value is 0, which lets the transmittal implementation to choose its own value.
|
|
Set the workspace name. Note that workspaces can have a name but the names are inconsequential and are not required for normal operation. An application can set the name to whatever string it wants.
|
SEDRIS Transmittal Access C++ API | 4.0.0 beta - 14 Jul 2004 |
Copyright © 2004 SEDRIS | Docs by Doxygen 1.3.2 |