Publish involves two steps: document selection, which is an interactive process, and XML generation, which is a batch process.
Document Selection
-
The software creates and loads the meta-schema, if not already done.
-
SmartPlant Client performs the following steps:
-
Creates a container composition for the Common schema.
-
Creates a container for schema objects.
-
Loads the Common schema.
-
Creates a container composition for document.
-
Creates document containers (Metadata, Documents, Tombstones, and Message).
-
For each document, creates and adds version and issue record objects to the metadata container.
-
Establishes relationships between version object and IDocVersionComposition.
-
Establishes relationships between issue record object and IIssueRecordComposition.
-
-
Saves containers to XML files.
XML Generation (Actual Publish in Batch Process)
-
Create and load the meta-schema, if not already done.
-
SmartPlant Client performs the following steps:
-
Steps 2a through 2e of Document Selection. Loads saved XML containers (Document, Metadata).
-
Sorts document objects by document type.
-
Creates container composition for a component schema.
-
For each document type:
-
Gets Component Schema UID by calling the GetCompSchemaUID method of the ISPAdapter interface. The tool adapter returns the Component Schema UID for a given document type.
-
Gets the class definition UID of Document by calling the GetDocClassDefUID method of the ISPAdapter interface. The tool adapter returns the UID of the class definition of the Document for a given component schema name.
-
Creates a container for schema objects.
-
Calls SPCLClient to get the Component Schema file.
-
Creates a container composition for document.
-
-
For each document object in a document type:
-
Create document containers (Metadata, Document, Tombstones, and Message).
-
Create an instance of the document object.
-
Copy the document object interfaces and relationships from the container composition to the Document container.
-
Calls the PublishDocument method of the ISPAdapter. The arguments are DocumentIObj, document metadata container, and document container created in step above. The tool adapter creates and populates document data objects. The tool adapter adds the view file interface to the metadata container and sets the FilePath property to the absolute path of the graphic file associated with document.
-
Call SPCLClient to publish the document. The argument is container composition of document.
-
Releases the contents of the container composition of the document.
-
Releases the contents of the container composition of the Component Schema.
-
-
-
Releases all containers and container compositions.