Provenance traces the origins and history of the content contained in an i-model. More...
Classes | |
class | ProvenanceManager |
The Provenance Manager allows to write provenance to an i-model and read it back. More... | |
Typedefs | |
typedef ProvenanceManager * | ProvenanceManagerP |
Provenance Manager pointer. More... | |
typedef RefCountedPtr < ProvenanceManager > | ProvenanceManagerPtr |
Functions | |
static DGNPLATFORM_EXPORT ProvenanceManagerPtr | Create (DgnFileR fileR, bool isReadOnly=true, bool readEmbeddedfiles=false) |
Create an instance of ProvenanceManager. More... | |
static DGNPLATFORM_EXPORT ProvenanceManagerPtr | Create (WString fileName, bool isReadOnly=true, bool readEmbeddedfiles=false) |
Create an instance of ProvenanceManager. More... | |
DGNPLATFORM_EXPORT StatusInt | ExtractXML (WCharCP xmlFileName, bool extractEmbedded=false) |
Extract provenance xml from i-model. More... | |
DGNPLATFORM_EXPORT StatusInt | ExtractBuffer (WChar **ppXmlBuffer) |
Extract provenance buffer from i-model. More... | |
DGNPLATFORM_EXPORT bvector < SourcePtr > | GetFileSources () |
Get file sources from provenance. More... | |
DGNPLATFORM_EXPORT bvector < SourcePtr > | GetEmbeddedFileSources (int index) |
Get file sources from embedded provenance for a given index. More... | |
DGNPLATFORM_EXPORT StatusInt | GetFileSourceURLList (bvector< WString > &srcFileUrlVec) |
Get all file source URL path from provenance. More... | |
DGNPLATFORM_EXPORT StatusInt | GetRootFileSourceURLList (bvector< WString > &srcFileUrlVec) |
Get all root file source URL path from provenance. More... | |
DGNPLATFORM_EXPORT bool | IsFilePresentAsFileSource (WStringCR sourcePath) |
Find the source path available in provenance. More... | |
DGNPLATFORM_EXPORT bool | IsFilePresentAsFileSource (WStringCR sourcePath, SourcePtr &source) |
Find the source path available in provenance. More... | |
DGNPLATFORM_EXPORT FileProvenanceCollection | GetAllFileProvenance () |
Get all file provenance. More... | |
DGNPLATFORM_EXPORT ProvenanceFileP | GetRootFileProvenance () |
Get root file provenance. More... | |
DGNPLATFORM_EXPORT ProvenanceFileP | GetFileProvenanceFromMatchingTarget (WStringCR targetURL) |
Get file provenance that matches with the target URL. More... | |
DGNPLATFORM_EXPORT int | GetFileProvenanceCount () |
Get count of all file provenances. More... | |
DGNPLATFORM_EXPORT FileProvenanceCollection | GetEmbeddedFileProvenanceList (int index) |
Get file provenance from embedded provenance for a valid index value . More... | |
DGNPLATFORM_EXPORT int | GetEmbeddedProvenanceCount () |
Get embedded provenance count . More... | |
DGNPLATFORM_EXPORT bool | IsEmbeddedProvenaceExist () |
Find out if embedded provenance exists or not . More... | |
DGNPLATFORM_EXPORT StatusInt | SetFileSource (WCharCP targetFileNameFuture, DgnFileR sourceFileObject, ProcessType type, WCharCP engine, WCharCP engineVersion, WCharCP configuration, ProvenanceAttributeVector &attribList) |
*------------------------------------------------------------------------------—**//** More... | |
DGNPLATFORM_EXPORT StatusInt | SetFileSource (WCharCP targetFileNameFuture, WCharCP targetFileURL, DgnFileR sourceFileObject, WCharCP sourceFileURL, ProcessType type, WCharCP engine, WCharCP engineVersion, WCharCP configuration, ProvenanceAttributeVector &attribList) |
*------------------------------------------------------------------------------—**//** More... | |
DGNPLATFORM_EXPORT StatusInt | SetFileSource (WCharCP targetFileNameFuture, WCharCP targetFileURL, DgnFileR sourceFileObject, WCharCP sourceFileURL, ProcessType type, WCharCP engine, WCharCP engineVersion, WCharCP configuration, const SourceVector &sources, ProvenanceAttributeVector &attribList) |
*------------------------------------------------------------------------------—**//** More... | |
DGNPLATFORM_EXPORT bool | MatchFileSourceURL (WCharCP srcFileURL) |
*------------------------------------------------------------------------------—**//** More... | |
Provenance traces the origins and history of the content contained in an i-model.
It specifies the original sources, date, state and scope of information and includes transformations applied to the original content. Provenance can be recorded at different levels of granularity, depending on the intended use, i.e., repository/file, model, component and property. NOTE: At this time, repository/file provenance is only recorded and accessible via the API. The API will be updated as the other forms of provenance are supported.
The Provenance library provides APIs to read provenance from any i-model.
Overview of common uses for Provenance library with the following capabilities:
typedef ProvenanceManager* ProvenanceManagerP |
Provenance Manager pointer.
typedef RefCountedPtr<ProvenanceManager> ProvenanceManagerPtr |
|
static |
Create an instance of ProvenanceManager.
fileR | MSDgnFile reference from which provenance will be read or write. |
isReadOnly | open the file in readonly mode or read/write mode. Default is read only mode. |
readEmbeddedfiles | Read the provenance from embedded file. Default is not to read embedded file provenances. |
|
static |
Create an instance of ProvenanceManager.
fileName | file path of a design file from which provenance will be read or write. |
isReadOnly | open the file in readonly mode or read/write mode |
readEmbeddedfiles | Read the provenance from embedded file. Default is not to read embedded file provenances. |
DGNPLATFORM_EXPORT StatusInt ExtractBuffer | ( | WChar ** | ppXmlBuffer | ) |
Extract provenance buffer from i-model.
ppXmlBuffer | Set the xml buffer and filled the buffer with provenance data in xml format. Only primary provenance is read back in the buffer |
DGNPLATFORM_EXPORT StatusInt ExtractXML | ( | WCharCP | xmlFileName, |
bool | extractEmbedded = false |
||
) |
Extract provenance xml from i-model.
xmlFileName | Name of the output xml file. |
extractEmbedded | Set true to extract embedded file provenance from a package file. False to skip all embedded file provenance While exporting the embedded file provenance as xml files, same path will be used as provided through xmlFileName. Xml file name will be generated by appending .xml to the name of the embedded files for easy identification. |
DGNPLATFORM_EXPORT FileProvenanceCollection GetAllFileProvenance | ( | ) |
Get all file provenance.
DGNPLATFORM_EXPORT FileProvenanceCollection GetEmbeddedFileProvenanceList | ( | int | index | ) |
Get file provenance from embedded provenance for a valid index value .
index | Index of the embedded provenance. |
DGNPLATFORM_EXPORT bvector<SourcePtr> GetEmbeddedFileSources | ( | int | index | ) |
Get file sources from embedded provenance for a given index.
This could be used to find timestamp and other information hold by Source struct. Currently this only fetches source from file provenances
DGNPLATFORM_EXPORT int GetEmbeddedProvenanceCount | ( | ) |
Get embedded provenance count .
DGNPLATFORM_EXPORT int GetFileProvenanceCount | ( | ) |
Get count of all file provenances.
DGNPLATFORM_EXPORT ProvenanceFileP GetFileProvenanceFromMatchingTarget | ( | WStringCR | targetURL | ) |
Get file provenance that matches with the target URL.
targetURL | target URL that will be matched with the Provenance's target URL. |
DGNPLATFORM_EXPORT bvector<SourcePtr> GetFileSources | ( | ) |
Get file sources from provenance.
This could be used to find timestamp and other information hold by Source struct. Currently this only fetches source from file provenances
DGNPLATFORM_EXPORT StatusInt GetFileSourceURLList | ( | bvector< WString > & | srcFileUrlVec | ) |
Get all file source URL path from provenance.
srcFileUrlVec | vector of URL string of all sources |
DGNPLATFORM_EXPORT ProvenanceFileP GetRootFileProvenance | ( | ) |
Get root file provenance.
This is the main provenance of an i-model.
DGNPLATFORM_EXPORT StatusInt GetRootFileSourceURLList | ( | bvector< WString > & | srcFileUrlVec | ) |
Get all root file source URL path from provenance.
srcFileUrlVec | vector of URL string of all root sources |
DGNPLATFORM_EXPORT bool IsEmbeddedProvenaceExist | ( | ) |
Find out if embedded provenance exists or not .
DGNPLATFORM_EXPORT bool IsFilePresentAsFileSource | ( | WStringCR | sourcePath | ) |
Find the source path available in provenance.
sourcePath | path of the file to be searched. Disk file source should be of the form L"file://C:\\DesignHistory.dgn" Projectwise file source should be of the form L"pw://PW8119SS3REF2K8.bentley.com:SS3109PWSH/Documents/D{f9d0209b-d19e-40d0-b759-8d671d60a99c}" |
DGNPLATFORM_EXPORT bool IsFilePresentAsFileSource | ( | WStringCR | sourcePath, |
SourcePtr & | source | ||
) |
Find the source path available in provenance.
sourcePath | path of the file to be searched. File source should be of the form L"file://C:\\DesignHistory.dgn" Projectwise file should be of the form L"pw://PW8119SS3REF2K8.bentley.com:SS3109PWSH/Documents/D{f9d0209b-d19e-40d0-b759-8d671d60a99c}" |
source | get the pointer of Source struct if source path is found |
DGNPLATFORM_EXPORT bool MatchFileSourceURL | ( | WCharCP | srcFileURL | ) |
*------------------------------------------------------------------------------—**//**
DGNPLATFORM_EXPORT StatusInt SetFileSource | ( | WCharCP | targetFileNameFuture, |
DgnFileR | sourceFileObject, | ||
ProcessType | type, | ||
WCharCP | engine, | ||
WCharCP | engineVersion, | ||
WCharCP | configuration, | ||
ProvenanceAttributeVector & | attribList | ||
) |
*------------------------------------------------------------------------------—**//**
DGNPLATFORM_EXPORT StatusInt SetFileSource | ( | WCharCP | targetFileNameFuture, |
WCharCP | targetFileURL, | ||
DgnFileR | sourceFileObject, | ||
WCharCP | sourceFileURL, | ||
ProcessType | type, | ||
WCharCP | engine, | ||
WCharCP | engineVersion, | ||
WCharCP | configuration, | ||
ProvenanceAttributeVector & | attribList | ||
) |
*------------------------------------------------------------------------------—**//**
DGNPLATFORM_EXPORT StatusInt SetFileSource | ( | WCharCP | targetFileNameFuture, |
WCharCP | targetFileURL, | ||
DgnFileR | sourceFileObject, | ||
WCharCP | sourceFileURL, | ||
ProcessType | type, | ||
WCharCP | engine, | ||
WCharCP | engineVersion, | ||
WCharCP | configuration, | ||
const SourceVector & | sources, | ||
ProvenanceAttributeVector & | attribList | ||
) |
*------------------------------------------------------------------------------—**//**