Media Authoring
with Java API

tv.amwa.maj.iface
Interface PropertyDefinition

All Superinterfaces:
MetaDefinition
All Known Implementing Classes:
PropertyDefinition

public interface PropertyDefinition
extends MetaDefinition

Specifies the description of a property allowed for a class.

A property definition is used to indicate a particular property within a class. It defines the name and type of a property that is used to set the value of an object of the class. Property definitions should be created through registerNewPropertyDefinition() or registerOptionalPropertyDefinition().

Author:
Richard Cartwright
See Also:
ClassDefinition.registerNewPropertyDefinition(AUID, String, TypeDefinition, boolean, boolean, Short), ClassDefinition.registerOptionalPropertyDefinition(AUID, String, TypeDefinition), ClassDefinition.getPropertyDefinitions(), ClassDefinition.forClass(Class), AAFProperty, PropertyValue, Property

Method Summary
 boolean getIsOptional()
          Returns true for a property that is optional and false for a mandatory property.
 boolean getIsUniqueIdentifier()
          Returns true for a property that provides a unique identifier for its associated object; otherwise false.
 short getLocalIdentification()
          Returns the local identification associated with this property definition, which is used to identify the property within the scope of its associated class, as returned by getMemberOf().
 ClassDefinition getMemberOf()
          Returns the class definition for the class that this property definition defines a property for.
 TypeDefinition getTypeDefinition()
          Returns the property type of the defined property.
 
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition
getAUID, getDescription, getName, setDescription, setName
 

Method Detail

getTypeDefinition

TypeDefinition getTypeDefinition()

Returns the property type of the defined property.

Returns:
Type definition for this property definition.

getIsOptional

@Bool
boolean getIsOptional()

Returns true for a property that is optional and false for a mandatory property. Optional properties can be omitted from an objects persistent representation.

Returns:
Is the property optional?

getIsUniqueIdentifier

@Bool
boolean getIsUniqueIdentifier()
                              throws PropertyNotPresentException

Returns true for a property that provides a unique identifier for its associated object; otherwise false.

Returns:
Is this property a unique identifier for an object it is part of?
Throws:
PropertyNotPresentException - The optional is unique identifier property is not present in this property definition.

getLocalIdentification

@UInt16
short getLocalIdentification()
                             throws PropertyNotPresentException

Returns the local identification associated with this property definition, which is used to identify the property within the scope of its associated class, as returned by getMemberOf(). This property is optional in the MAJ API as this API may not use an AAF-file based persistent representation of data.

Returns:
Local identification associated with this property definition.
Throws:
PropertyNotPresentException - The optional local identification property is not present in this property definition.

getMemberOf

ClassDefinition getMemberOf()
                            throws PropertyNotPresentException

Returns the class definition for the class that this property definition defines a property for. This property is optional in the MAJ API but is almost always available in the implementation.

Returns:
Class definition of the class that this property definition is associated with.
Throws:
PropertyNotPresentException - The optional member of a class property is not present in this property definition.
See Also:
ClassDefinition.getPropertyDefinitions()

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.