SerializeOptions
Date: 2012-05-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.adobe.xmp.options
Class SerializeOptions

    java.lang.Object
      com.adobe.xmp.options.Options
          com.adobe.xmp.options.SerializeOptions

    public final class SerializeOptions

extends Options

Options for `XMPMetaFactory.serializeToBuffer(XMPMeta, SerializeOptions)`.

Since:
  24.01.2006

Field Summary
`static int` | `ENCODE_UTF16BE` UTF16BE encoding
`static int` | `ENCODE_UTF16LE` UTF16LE encoding
`static int` | `ENCODE_UTF8` UTF8 encoding; this is the default
`static int` | `EXACT_PACKET_LENGTH` The padding parameter provides the overall packet length.
`static int` | `INCLUDE_THUMBNAIL_PAD` Include a padding allowance for a thumbnail image.
`static int` | `OMIT_PACKET_WRAPPER` Omit the XML packet wrapper.
`static int` | `OMIT_XMPMETA_ELEMENT` Omit the <x:xmpmeta&bt;-tag
`static int` | `READONLY_PACKET` Mark packet as read-only.
`static int` | `SORT` Sort the struct properties and qualifier before serializing
`static int` | `USE_CANONICAL_FORMAT` Use the canonical form of RDF if set.
`static int` | `USE_COMPACT_FORMAT` Use a compact form of RDF.

Constructor Summary
`SerializeOptions()` Default constructor.
`SerializeOptions(int options)` Constructor using inital options

Method Summary
`java.lang.Object` | `clone()`
`int` | `getBaseIndent()`
`boolean` | `getEncodeUTF16BE()`
`boolean` | `getEncodeUTF16LE()`
`java.lang.String` | `getEncoding()`
`boolean` | `getExactPacketLength()`
`boolean` | `getIncludeThumbnailPad()`
`java.lang.String` | `getIndent()`
`java.lang.String` | `getNewline()`
`boolean` | `getOmitPacketWrapper()`
`boolean` | `getOmitVersionAttribute()`
`boolean` | `getOmitXmpMetaElement()`
`int` | `getPadding()`
`boolean` | `getReadOnlyPacket()`
`boolean` | `getSort()`
`boolean` | `getUseCanonicalFormat()`
`boolean` | `getUseCompactFormat()`
`SerializeOptions` | `setBaseIndent(int baseIndent)`
`SerializeOptions` | `setEncodeUTF16BE(boolean value)`
`SerializeOptions` | `setEncodeUTF16LE(boolean value)`
`SerializeOptions` | `setExactPacketLength(boolean value)`
`SerializeOptions` | `setIncludeThumbnailPad(boolean value)`
`SerializeOptions` | `setIndent(java.lang.String indent)`
`SerializeOptions` | `setNewline(java.lang.String newline)`
`SerializeOptions` | `setOmitPacketWrapper(boolean value)`
`SerializeOptions` | `setOmitXmpMetaElement(boolean value)`
`SerializeOptions` | `setPadding(int padding)`
`SerializeOptions` | `setReadOnlyPacket(boolean value)`
`SerializeOptions` | `setSort(boolean value)`
`SerializeOptions` | `setUseCanonicalFormat(boolean value)`
`SerializeOptions` | `setUseCompactFormat(boolean value)`

Methods inherited from class com.adobe.xmp.options.Options
`clear, containsAllOptions, containsOneOf, equals, getOptions, getOptionsString, hashCode, isExactly, setOption, setOptions, toString`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### OMIT_PACKET_WRAPPER

    public static final int OMIT_PACKET_WRAPPER

  Omit the XML packet wrapper.

  See Also:
    Constant Field Values

### READONLY_PACKET

    public static final int READONLY_PACKET

  Mark packet as read-only. Default is a writeable packet.

  See Also:
    Constant Field Values

### USE_COMPACT_FORMAT

    public static final int USE_COMPACT_FORMAT

  Use a compact form of RDF. The compact form is the default serialization format (this flag is technically ignored). To serialize to the canonical form, set the flag USE_CANONICAL_FORMAT. If both flags "compact" and "canonical" are set, canonical is used.

  See Also:
    Constant Field Values

### USE_CANONICAL_FORMAT

    public static final int USE_CANONICAL_FORMAT

  Use the canonical form of RDF if set. By default the compact form is used

  See Also:
    Constant Field Values

### INCLUDE_THUMBNAIL_PAD

    public static final int INCLUDE_THUMBNAIL_PAD

  Include a padding allowance for a thumbnail image. If no `xmp:Thumbnails` property is present, the typical space for a JPEG thumbnail is used.

  See Also:
    Constant Field Values

### EXACT_PACKET_LENGTH

    public static final int EXACT_PACKET_LENGTH

  The padding parameter provides the overall packet length. The actual amount of padding is computed. An exception is thrown if the packet exceeds this length with no padding.

  See Also:
    Constant Field Values

### OMIT_XMPMETA_ELEMENT

    public static final int OMIT_XMPMETA_ELEMENT

  Omit the <x:xmpmeta&bt;-tag

  See Also:
    Constant Field Values

### SORT

    public static final int SORT

  Sort the struct properties and qualifier before serializing

  See Also:
    Constant Field Values

### ENCODE_UTF8

    public static final int ENCODE_UTF8

  UTF8 encoding; this is the default

  See Also:
    Constant Field Values

### ENCODE_UTF16BE

    public static final int ENCODE_UTF16BE

  UTF16BE encoding

  See Also:
    Constant Field Values

### ENCODE_UTF16LE

    public static final int ENCODE_UTF16LE

  UTF16LE encoding

  See Also:
    Constant Field Values

Constructor Detail

### SerializeOptions

    public SerializeOptions()

  Default constructor.

### SerializeOptions

    public SerializeOptions(int options)
                     throws XMPException

  Constructor using inital options

  Parameters:
    `options` - the inital options
  Throws:
    `XMPException` - Thrown if options are not consistant.

Method Detail

### getOmitPacketWrapper

    public boolean getOmitPacketWrapper()

  Returns:
    Returns the option.

### setOmitPacketWrapper

    public SerializeOptions setOmitPacketWrapper(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getOmitXmpMetaElement

    public boolean getOmitXmpMetaElement()

  Returns:
    Returns the option.

### setOmitXmpMetaElement

    public SerializeOptions setOmitXmpMetaElement(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getReadOnlyPacket

    public boolean getReadOnlyPacket()

  Returns:
    Returns the option.

### setReadOnlyPacket

    public SerializeOptions setReadOnlyPacket(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getUseCompactFormat

    public boolean getUseCompactFormat()

  Returns:
    Returns the option.

### setUseCompactFormat

    public SerializeOptions setUseCompactFormat(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getUseCanonicalFormat

    public boolean getUseCanonicalFormat()

  Returns:
    Returns the option.

### setUseCanonicalFormat

    public SerializeOptions setUseCanonicalFormat(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getIncludeThumbnailPad

    public boolean getIncludeThumbnailPad()

  Returns:
    Returns the option.

### setIncludeThumbnailPad

    public SerializeOptions setIncludeThumbnailPad(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getExactPacketLength

    public boolean getExactPacketLength()

  Returns:
    Returns the option.

### setExactPacketLength

    public SerializeOptions setExactPacketLength(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getSort

    public boolean getSort()

  Returns:
    Returns the option.

### setSort

    public SerializeOptions setSort(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getEncodeUTF16BE

    public boolean getEncodeUTF16BE()

  Returns:
    Returns the option.

### setEncodeUTF16BE

    public SerializeOptions setEncodeUTF16BE(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getEncodeUTF16LE

    public boolean getEncodeUTF16LE()

  Returns:
    Returns the option.

### setEncodeUTF16LE

    public SerializeOptions setEncodeUTF16LE(boolean value)

  Parameters:
    `value` - the value to set
  Returns:
    Returns the instance to call more set-methods.

### getBaseIndent

    public int getBaseIndent()

  Returns:
    Returns the baseIndent.

### setBaseIndent

    public SerializeOptions setBaseIndent(int baseIndent)

  Parameters:
    `baseIndent` - The baseIndent to set.
  Returns:
    Returns the instance to call more set-methods.

### getIndent

    public java.lang.String getIndent()

  Returns:
    Returns the indent.

### setIndent

    public SerializeOptions setIndent(java.lang.String indent)

  Parameters:
    `indent` - The indent to set.
  Returns:
    Returns the instance to call more set-methods.

### getNewline

    public java.lang.String getNewline()

  Returns:
    Returns the newline.

### setNewline

    public SerializeOptions setNewline(java.lang.String newline)

  Parameters:
    `newline` - The newline to set.
  Returns:
    Returns the instance to call more set-methods.

### getPadding

    public int getPadding()

  Returns:
    Returns the padding.

### setPadding

    public SerializeOptions setPadding(int padding)

  Parameters:
    `padding` - The padding to set.
  Returns:
    Returns the instance to call more set-methods.

### getOmitVersionAttribute

    public boolean getOmitVersionAttribute()

  Returns:
    Returns whether the Toolkit version attribute shall be omitted. Note: This options can only be set by unit tests.

### getEncoding

    public java.lang.String getEncoding()

  Returns:
    Returns the encoding as Java encoding String.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    Returns clone of this SerializeOptions-object with the same options set.
  Throws:
    `java.lang.CloneNotSupportedException` - Cannot happen in this place.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2007 Adobe Systems Inc. All Rights Reserved.