public enum EmitXMLClassIDAs extends Enum<EmitXMLClassIDAs>
Specifies how the class identifier for the type of an object should be included with that object when it is serialized to XML.
Normally, an ObjectClass element is emitted as a child element
for every interchange object. In certain cases, such
as when the object has not been defined in a namespace that is not derived from the AAF
namespace, it is desirable to emit the identifier as an attribute or
to suppress it altogether.
How the object's class identifier is to be emitted is controlled by the setting the
emitXMLClassID property of the media class annotation. If the optional annotation property is omitted from a class,
the default is Parent.
| Enum Constant and Description |
|---|
Attribute
Emit the identifier of the class as an attribute of the element.
|
Element
Emit the identifier of the class as an child element of its serialization to XML
called
ObjectClass. |
Parent
Emit the same class identification for this element as for its parent in the
class hierarchy.
|
Suppressed
Do not emit the identifier of the class in any form.
|
| Modifier and Type | Method and Description |
|---|---|
static EmitXMLClassIDAs |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EmitXMLClassIDAs[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EmitXMLClassIDAs Element
Emit the identifier of the class as an child element of its serialization to XML
called ObjectClass. This is the default approach and results in XML of
the form:
<NetworkLocator>
<ObjectClass>urn:smpte:ul:060e2b34.02060101.0d010101.01013200</ObjectClass>
<URL>http://www.portability4media.com/demo</URL>
</NetworkLocator>
public static final EmitXMLClassIDAs Attribute
Emit the identifier of the class as an attribute of the element. The attribute is
named uid. This results in XML of the form:
<NetworkLocator uid="urn:smpte:ul:060e2b34.02060101.0d010101.01013200">
<URL>http://www.portability4media.com/demo</URL>
</NetworkLocator>
public static final EmitXMLClassIDAs Suppressed
Do not emit the identifier of the class in any form. In this case, it is assumed that an XML schema is providing sufficient identification. This results in XML of the form:
<NetworkLocator>
<URL>http://www.portability4media.com/demo</URL>
</NetworkLocator>
CommonConstants.ObjectClassIDpublic static final EmitXMLClassIDAs Parent
Emit the same class identification for this element as for its parent in the
class hierarchy. The root of the type hierarchy will default to Element
if this method is set.
ClassDefinition.getParent()public static EmitXMLClassIDAs[] values()
for (EmitXMLClassIDAs c : EmitXMLClassIDAs.values()) System.out.println(c);
public static EmitXMLClassIDAs valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.