GroupDocs.Metadata for Java provides functionality that allows working with different kinds of diagrams such as VDX, VSDX, VSX, etc. For the full list of supported document formats please refer to Supported document formats.
Detecting the exact type of a document
The following sample of code will help you to detect the exact type of a loaded diagram and extract some additional file format information.
As you can see the code sample uses the GroupDocs.Metadata search engine to retrieve all properties that are not marked with the BuiltIn tag. Since we call the findProperties method for a certain metadata package (instance of the DiagramPackage class), the search result will contain only metadata properties that are specific for diagram documents.
Reading document statistics
Most office applications are able to display simple text statistics for loaded documents. It can be an estimated word count, page count, character count, etc. The GroupDocs.Metadata API provides similar functionality for some document formats. The following code sample demonstrates how to obtain the text statistics for a diagram (only the page count statistic is available at the moment).
Updating any built-in document properties is as simple as getting them. The following code sample demonstrates how to update built-in metadata properties in a diagram document.