Access document lineage from plugin?
Hi!
Is there a way to access the details of a file's lineage from a plugin? I could not find a way in the API documentation.
Best,
Alex
-
Official comment
Hi Alex,
The best way to get the lineage for an Annotated Plugin Document is to call APD.getDescendantOperationRecords() and/or APD.getParentOperationRecords(). This will give you a URN that can be used to retrieve an OperationRecordDocument via DocumentUtilities.getDocumentByURN(URN). An OperationRecordDocument contains adjacent parent/child nodes in the lineage tree and can be traversed using any basic tree-traversal algorithm. I would recommend having a read of the documentation and methods for OperationRecordDocument for more details.
Hope that answers your question,
Tom -
Hi Tom,
Thanks a lot for the clear response, much appreciated.
Alex
0
Please sign in to leave a comment.
Comments
2 comments