com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class DiagramPackage

  • All Implemented Interfaces:
    Iterable<MetadataProperty>


    public class DiagramPackage
    extends DocumentPackage

    Represents a native metadata package in a diagram format.

    Learn more

    The following code sample demonstrates how to update built-in metadata properties in a diagram document.

    
     try (Metadata metadata = new Metadata(Constants.InputVdx)) {
         DiagramRootPackage root = metadata.getRootPackageGeneric();
         root.getDocumentProperties().setCreator("test author");
         root.getDocumentProperties().setTimeCreated(new Date());
         root.getDocumentProperties().setCompany("GroupDocs");
         root.getDocumentProperties().setCategory("test category");
         root.getDocumentProperties().setKeywords("metadata, built-in, update");
         // ...
         metadata.save(Constants.OutputVdx);
     }
     
    • Method Detail

      • getAlternateNames

        public final String getAlternateNames()

        Gets the alternate names for the document. Can be updated in VDX and VSX formats only.

        Returns:
        The alternate names for the document.
      • setAlternateNames

        public final void setAlternateNames(String value)

        Sets the alternate names for the document. Can be updated in VDX and VSX formats only.

        Parameters:
        value - The alternate names for the document.
      • getBuildNumberCreated

        public final String getBuildNumberCreated()

        Gets the full build number of the instance used to create the document.

        Returns:
        The full build number of the instance used to create the document.
      • getBuildNumberEdited

        public final String getBuildNumberEdited()

        Gets the build number of the instance last used to edit the document.

        Returns:
        The build number of the instance last used to edit the document.
      • getCategory

        public final String getCategory()

        Gets the descriptive text for the type of drawing, such as flowchart or office layout. This text can also be entered in the Microsoft Visio user interface in the Category box in the Properties dialog box.

        Returns:
        The descriptive text for the type of drawing, such as flowchart or office layout.
      • setCategory

        public final void setCategory(String value)

        Sets the descriptive text for the type of drawing, such as flowchart or office layout. This text can also be entered in the Microsoft Visio user interface in the Category box in the Properties dialog box.

        Parameters:
        value - The descriptive text for the type of drawing, such as flowchart or office layout.
      • getCompany

        public final String getCompany()

        Gets the user-entered information identifying the company creating the drawing or the company the drawing is being created for. Maximum length is 63 characters.

        Returns:
        The user-entered information identifying the company creating the drawing or the company the drawing is being created for.
      • setCompany

        public final void setCompany(String value)

        Sets the user-entered information identifying the company creating the drawing or the company the drawing is being created for. Maximum length is 63 characters.

        Parameters:
        value - The user-entered information identifying the company creating the drawing or the company the drawing is being created for.
      • getCreator

        public final String getCreator()

        Gets the person who created or last updated the file. The maximum length is 63 characters..

        Returns:
        The person who created or last updated the file.
      • setCreator

        public final void setCreator(String value)

        Sets the person who created or last updated the file. The maximum length is 63 characters..

        Parameters:
        value - The person who created or last updated the file.
      • getDescription

        public final String getDescription()

        Gets a descriptive text string for the document. Use this element to store important information about the document, such as its purpose, recent changes, or pending changes. The maximum is 191 characters.

        Returns:
        A descriptive text string for the document.
      • setDescription

        public final void setDescription(String value)

        Sets a descriptive text string for the document. Use this element to store important information about the document, such as its purpose, recent changes, or pending changes. The maximum is 191 characters.

        Parameters:
        value - A descriptive text string for the document.
      • getHyperlinkBase

        public final String getHyperlinkBase()

        Gets the path to be used for relative hyperlinks (hyperlinks for which the linked file location is described in relation to the Microsoft Visio diagram). By default, a hyperlink path is relative to the current document unless a different path is specified in this element. Maximum length is 256 characters.

        Returns:
        The path to be used for relative hyperlinks.
      • setHyperlinkBase

        public final void setHyperlinkBase(String value)

        Sets the path to be used for relative hyperlinks (hyperlinks for which the linked file location is described in relation to the Microsoft Visio diagram). By default, a hyperlink path is relative to the current document unless a different path is specified in this element. Maximum length is 256 characters.

        Parameters:
        value - The path to be used for relative hyperlinks.
      • getKeywords

        public final String getKeywords()

        Gets a text string that identifies topics or other important information about the file, such as project name, client name, or version number. The maximum string length is 63 characters.

        Returns:
        A text string that identifies topics or other important information about the file, such as project name, client name, or version number.
      • setKeywords

        public final void setKeywords(String value)

        Sets a text string that identifies topics or other important information about the file, such as project name, client name, or version number. The maximum string length is 63 characters.

        Parameters:
        value - A text string that identifies topics or other important information about the file, such as project name, client name, or version number.
      • getLanguage

        public final String getLanguage()

        Gets the language of the document. Can be updated in VSD and VSDX formats only.

        Returns:
        The language of the document.
      • setLanguage

        public final void setLanguage(String value)

        Sets the language of the document. Can be updated in VSD and VSDX formats only.

        Parameters:
        value - The language of the document.
      • getManager

        public final String getManager()

        Gets a user-entered text string identifying the person in charge of the project or department. The maximum length is 63 characters.

        Returns:
        A user-entered text string identifying the person in charge of the project or department.
      • setManager

        public final void setManager(String value)

        Sets a user-entered text string identifying the person in charge of the project or department. The maximum length is 63 characters.

        Parameters:
        value - A user-entered text string identifying the person in charge of the project or department.
      • getPreviewPicture

        public final byte[] getPreviewPicture()

        Gets the preview picture.

        Returns:
        The preview picture.
      • setPreviewPicture

        public final void setPreviewPicture(byte[] value)

        Sets the preview picture.

        Parameters:
        value - The preview picture.
      • getSubject

        public final String getSubject()

        Gets a user-defined text string that describes the contents of the document. Maximum length is 63 characters.

        Returns:
        A user-defined text string that describes the contents of the document.
      • setSubject

        public final void setSubject(String value)

        Sets a user-defined text string that describes the contents of the document. Maximum length is 63 characters.

        Parameters:
        value - A user-defined text string that describes the contents of the document.
      • getTemplate

        public final String getTemplate()

        Gets a string value specifying the file name of the template from which the document was created.

        Returns:
        A string value specifying the file name of the template from which the document was created.
      • setTemplate

        public final void setTemplate(String value)

        Sets a string value specifying the file name of the template from which the document was created.

        Parameters:
        value - A string value specifying the file name of the template from which the document was created.
      • getTimeCreated

        public final Date getTimeCreated()

        Gets a date and time value indicating when the document was created.

        Returns:
        A date and time value indicating when the document was created.
      • setTimeCreated

        public final void setTimeCreated(Date value)

        Sets a date and time value indicating when the document was created.

        Parameters:
        value - A date and time value indicating when the document was created.
      • getTimeEdited

        public final Date getTimeEdited()

        Gets a date and time value indicating when the document was last edited.

        Returns:
        A date and time value indicating when the document was last edited.
      • getTimePrinted

        public final Date getTimePrinted()

        Gets a date and time value indicating when the document was last printed.

        Returns:
        A date and time value indicating when the document was last printed.
      • getTimeSaved

        public final Date getTimeSaved()

        Gets a date and time value indicating when the document was last saved.

        Returns:
        A date and time value indicating when the document was last saved.
      • getTitle

        public final String getTitle()

        Gets a user-defined text string that serves as a descriptive title for the document. Maximum length is 63 characters.

        Returns:
        A user-defined text string that serves as a descriptive title for the document.
      • setTitle

        public final void setTitle(String value)

        Sets a user-defined text string that serves as a descriptive title for the document. Maximum length is 63 characters.

        Parameters:
        value - A user-defined text string that serves as a descriptive title for the document.
      • set

        public final void set(String propertyName,
                              String value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              boolean value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              double value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              Date value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.