com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class XmpPackage

    • Field Detail

      • prefix

        protected final String prefix

        Xmlns prefix. For example, xmlns:dc.

      • namespaceUri

        protected final String namespaceUri

        Namespace uri for the specific XMP schema.

      • properties

        protected com.aspose.ms.System.Collections.Generic.Dictionary<String,XmpValueBase> properties

        Dictionary of key/value properties XMP package.

    • Constructor Detail

      • XmpPackage

        public XmpPackage(String prefix,
                  String namespaceUri)

        Initializes a new instance of the XmpPackage class.

        Parameters:
        prefix - XMP prefix, for example dc:title.
        namespaceUri - Namespace uri.
    • Method Detail

      • getXmlNamespace

        public final String getXmlNamespace()

        Gets xml namespace.

        Value: The XML namespace.
      • getPrefix

        public final String getPrefix()

        Gets package xmlns prefix.

        Value: The prefix.
      • getNamespaceUri

        public final String getNamespaceUri()

        Gets package namespace URI.

        Value: The namespace URI.
      • getKeys

        public String[] getKeys()

        Gets keys in XMP package.

      • containsKey

        public boolean containsKey(String key)

        Determines whether package contains key.

        Parameters:
        key - XMP metadata key.
        Returns:
        true if key is found; otherwise false.
      • addValue

        public void addValue(String key,
                    String value)

        Adds string property.

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • addValue

        public void addValue(String key,
                    int value)

        Adds integer property.

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • addValue

        public void addValue(String key,
                    boolean value)

        Adds boolean property.

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • addValue

        public void addValue(String key,
                    Date value)

        Adds DateTime property.

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • remove

        public boolean remove(String key)

        Remove the value with the specified key.

        Parameters:
        key - XMP metadata key.
        Returns:
        true if metadata key is found and removed; otherwise false.
      • clear

        public void clear()

        Removes all XMP properties.

      • setLangAlt

        public final void setLangAlt(String key,
                      LangAlt langAlt)

        Sets the LangAlt value.

        Parameters:
        key - XMP metadata key.
        langAlt - LangAlt value.
        Throws:
        com.aspose.ms.System.ArgumentNullException - LangAlt could not be null.
      • setArray

        public final void setArray(String key,
                    XmpArray array)

        Sets the XmpArray value.

        Parameters:
        key - XMP metadata key.
        array - Array value.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Array could not be null.
      • setXmpTypeValue

        public void setXmpTypeValue(String key,
                           XmpTypeBase value)

        Sets the value inherited from XmpTypeBase .

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • setXmpComplexTypeValue

        public void setXmpComplexTypeValue(String key,
                                  XmpComplexType value)

        Sets the value inherited from XmpTypeBase .

        Parameters:
        key - XMP metadata key.
        value - XMP metadata value.
      • getNodeType

        public final com.aspose.ms.System.Type getNodeType(String key)

        Returns node type but it's key.

        Parameters:
        key - Package key.
        Returns:
        Appropriate System.Type.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Key could not be null or empty.
        com.aspose.ms.System.ArgumentException - Key not found.
      • getXmlValue

        public String getXmlValue()

        Converts XMP value to the xml representation.

        Specified by:
        getXmlValue in interface IXmlValue
        Returns:
        Returns string representation of XMP value.
      • getStringArray

        public final String[] getStringArray(String key)
      • getGenericArray

        public final <T extends XmpComplexType> T[] getGenericArray(String key,
                                                     T[] t)
      • getReal

        public final com.aspose.ms.System.Nullable<Float> getReal(String key)
      • setTextValue

        public final void setTextValue(String key,
                        String value)
      • setBoolValue

        public final void setBoolValue(String key,
                        boolean value)
      • setIntValue

        public final void setIntValue(String key,
                       int value)
      • setDateValue

        public final void setDateValue(String key,
                        Date value)
      • setRealValue

        public final void setRealValue(String key,
                        float value)
      • setStingArray

        public final void setStingArray(String key,
                         String[] values,
                         int arrayType)
      • setNullableInt

        public final void setNullableInt(String xmpKey,
                          Integer integerValue,
                          String paramName)
      • getKeyValueAsXml

        protected String getKeyValueAsXml(String key)

        Returns XMP representation of the XMP metadata by it's key.

        Parameters:
        key - XMP metadata key.
        Returns:
        find metadata value by key and returns it's XMP representation.