XmpPacketWrapper
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.imaging.xmp.IXmlValue, com.aspose.imaging.metadata.IImageMetadataFormat
public class XmpPacketWrapper implements IXmlValue, IImageMetadataFormat
Contains serialized xmp package including header and trailer.
A wrapper consisting of a pair of XML processing instructions (PIs) may be placed around the rdf:RDF element.
Constructors
| Constructor | Description |
|---|---|
| XmpPacketWrapper(XmpHeaderPi header, XmpTrailerPi trailer, XmpMeta xmpMeta) | Initializes a new instance of the XmpPacketWrapper class. |
| XmpPacketWrapper() | Initializes a new instance of the XmpPacketWrapper class. |
Methods
| Method | Description |
|---|---|
| getHeaderPi() | Gets the header processing instruction. |
| getMeta() | Gets the XMP meta. |
| setMeta(XmpMeta value) | Sets the XMP meta. |
| getTrailerPi() | Gets the trailer processing instruction. |
| getPackages() | Gets array of XmpPackage inside XMP. |
| getPackagesCount() | Gets amount of packages inside XMP structure. |
| addPackage(XmpPackage package_) | Adds the package. |
| getPackage(String namespaceUri) | Gets package by namespace URI. |
| containsPackage(String namespaceUri) | Determines whether package is exist in xmp wrapper. |
| removePackage(XmpPackage package_) | Removes the XMP package. |
| clearPackages() | Removes all XmpPackage inside XMP. |
| getXmlValue() | Converts XMP value to the XML representation. |
| toString() | Returns an XML string that represents the current object. |
XmpPacketWrapper(XmpHeaderPi header, XmpTrailerPi trailer, XmpMeta xmpMeta)
public XmpPacketWrapper(XmpHeaderPi header, XmpTrailerPi trailer, XmpMeta xmpMeta)
Initializes a new instance of the XmpPacketWrapper class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| header | XmpHeaderPi | The XMP header of processing instruction. |
| trailer | XmpTrailerPi | The XMP trailer of processing instruction. |
| xmpMeta | XmpMeta | The XMP metadata. |
XmpPacketWrapper()
public XmpPacketWrapper()
Initializes a new instance of the XmpPacketWrapper class.
getHeaderPi()
public XmpHeaderPi getHeaderPi()
Gets the header processing instruction.
Returns: XmpHeaderPi - The Header processing instruction.
getMeta()
public XmpMeta getMeta()
Gets the XMP meta. Optional.
Returns: XmpMeta - The XMP meta. Optional.
setMeta(XmpMeta value)
public void setMeta(XmpMeta value)
Sets the XMP meta. Optional.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | XmpMeta | The XMP meta. Optional. |
getTrailerPi()
public XmpTrailerPi getTrailerPi()
Gets the trailer processing instruction.
Returns: XmpTrailerPi - Trailer processing instruction.
getPackages()
public XmpPackage[] getPackages()
Gets array of XmpPackage inside XMP.
Returns:
com.aspose.imaging.xmp.XmpPackage[] - The array of XmpPackage inside XMP.
getPackagesCount()
public int getPackagesCount()
Gets amount of packages inside XMP structure.
Returns: int - The amount of packages inside XMP structure.
addPackage(XmpPackage package_)
public void addPackage(XmpPackage package_)
Adds the package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| package_ | XmpPackage | The package. |
getPackage(String namespaceUri)
public XmpPackage getPackage(String namespaceUri)
Gets package by namespace URI.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| namespaceUri | java.lang.String | The package schema URI. |
Returns: XmpPackage - Returns the XMP package for specified namespace URI.
containsPackage(String namespaceUri)
public boolean containsPackage(String namespaceUri)
Determines whether package is exist in xmp wrapper.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| namespaceUri | java.lang.String | Package schema uri. |
Returns: boolean - Returns true if package with specified namespace Uri exist in XMP wrapper.
removePackage(XmpPackage package_)
public void removePackage(XmpPackage package_)
Removes the XMP package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| package_ | XmpPackage | The package. |
clearPackages()
public void clearPackages()
Removes all XmpPackage inside XMP.
getXmlValue()
public String getXmlValue()
Converts XMP value to the XML representation.
Returns: java.lang.String - Returns converted XMP value to XML.
toString()
public String toString()
Returns an XML string that represents the current object.
Returns: java.lang.String - An XML string that represents the current object.