All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.xmp.core.serializer.SerializeOptions Maven / Gradle / Ivy

// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
// Copyright 2012 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================

package com.adobe.xmp.core.serializer;

import java.util.EnumSet;



/**
 * Options for {@link XMPSerializer}.
 * Default serialization tooks place if no options are set.
 */
public class SerializeOptions implements Cloneable
{
	/**
	 * Enum for all serialization options.
	 */
	public enum Option
	{
		/** Omit the XML packet wrapper. */
		NO_PACKET_WRAPPER, 

		/** Omit the <x:xmpmeta>-tag */
		NO_XMPMETA_ELEMENT,

		/** Omits the Toolkit version attribute, not published, only used for Unit tests. */
		NO_VERSION_ATTRIBUTE,

		/**
		 * Mark packet as read-only. Default is a writable packet.
		 * This option can only be applied 
		 * if the option NO_PACKET_WRAPPER isn't set.
		 */
		READONLY_PACKET,
		
		/**
		 * Serialize to the canonical form of RDF if set.
		 * The compact form is the default serialization format
		 * (if this option is not set).
		 * To serialize to the canonical form, set the flag USE_CANONICAL_FORMAT.
		 */
		CANONICAL_FORMAT,
		
		/**
		 * Include a padding allowance for a thumbnail image. If no xmp:Thumbnails property
		 * is present, the typical space for a JPEG thumbnail is used.
		 */
		INCLUDE_THUMBNAIL_PAD,

		/**
		 * If this option is set, 
		 * the padding parameter is interpreted to be the overall packet length. 
		 * The actual amount of padding is computed. 
		 * An exception is thrown if the packet exceeds this length with no padding.
		 */
		EXACT_PACKET_LENGTH,
		
		/** Sort the struct properties, unordered arrays and qualifiers before serializing */
		SORT,

		/** Serializes with UTF-16 Big Endian encoding.
		 *  UTF-8 is the default */
		ENCODE_UTF16BE,
		
		/** Serializes with UTF-16 Little Endian encoding.
		 *  UTF-8 is the default */
		ENCODE_UTF16LE
	}
	
	/** Holds a set of serialize options */
	private EnumSet




© 2015 - 2024 Weber Informatics LLC | Privacy Policy