The WTDocumentUsageLink is an IteratedUsageLink between WTDocuments and WTDocumentMasters and used to create uses relationships between documents or document structure.
For example:
Several documents can contain the same glossary or one document can be made up of several sub-documents.
Documents should use this if a document is made up of subdocuments and the sub-documents can be reused by other documents, or need to be controlled separately.
The main document is linked to the other document’s master objects. Here main document is linked to the WTDocumentMaster objects of document_1, document_2 and document_3.
This means main document is always pointing to the latest copy of all linked document even they get new version or iteration.
Model Diagram:
JavaDoc:
wt.doc Class WTDocumentUsageLink
java.lang.Object
wt.fc.WTObject
wt.fc.ObjectToObjectLink
wt.vc.struct.IteratedUsageLink
wt.doc.WTDocumentUsageLink
public class WTDocumentUsageLink
extends IteratedUsageLink
implements Externalizable
UI Navigations:
To see the usage documents, navigate to main document’s details page -> Structure -> Document Structure table
To add the child documents, use ‘Add Documents’ row level action on parent document.
API Navigations:
To get the usage documents, we need to navigate through this link table. The service APIs are available in WTDocumentService class.
The relevant methods are (Please refer JavaDoc for more details)
Enumeration
|
getOrderedUsesWTDocumentMasters(WTDocument document)
Navigates the WTDocumentUsageLink along the uses role, returning a Enumeration of WTDocumentMaster.
|
Enumeration
|
getOrderedUsesWTDocuments(WTDocument document, ConfigSpec configSpec)
Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a Enumeration of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position.
|
QueryResult
|
getUsedByWTDocuments(WTDocumentMaster documentMaster)
Navigates the WTDocumentUsageLink along the usedBy role, returning a QueryResult of WTDocuments.
|
QueryResult
|
getUsesWTDocumentMasters(WTDocument document)
Navigates the WTDocumentUsageLink along the uses role, returning a QueryResult of WTDocumentMaster.
|
QueryResult
|
getUsesWTDocuments(WTDocument document, WTDocumentConfigSpec configSpec)
Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a QueryResult of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position.
|
QueryResult
|
getUsesWTDocumentUsageLinks(WTDocument document)
Returns the WTDocumentUsageLinks resulting from navigating the WTDocumentUsageLink along the uses role.
|
3 comments:
Do you need a separate WT DocumentMaster type? The parallel case is part structure - a part may be an assembly and also be a sub-assembly. The solution is more useful with using WTDocument for both uses and used by.
WTDocumentMaster type is available OOTB so need not to be have seperate type.
Yes this is useful with using WTDocument for both uses and used by.
If you look from UI side, the document usage link is between documents to document only. Here I tried to explain at model and DB level to get the clear picture of this link.
The details on pure doc to doc link with version dependency is posted in "Windchill Document Dependency Link"
Post a Comment