Media Authoring
with Java API

tv.amwa.maj.entity
Class Identification

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Identification
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, Identification, InterchangeObject, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=12288,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="Identification",
          description="The Identification class provides information about the application that created or modified the file.")
public class Identification
extends InterchangeObject
implements Identification, Serializable, Cloneable, MAJCommon

Implements a representation of identity information about the application that created or modified a file.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class Identification.ProductVersionXMLHandler
           
static class Identification.ToolkitVersionXMLHandler
           
static class Identification.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String APICompanyName
           
static AUID APIProductID
           
static String APIProductName
           
static ProductVersion APIProductVersion
           
static String APIProductVersionString
           
static ProductVersion APIToolkitVersion
           
static String IDENTIFICATION_TAG
           
 
Constructor Summary
Identification(String companyName, String productName, String productVersionString, AUID productID)
          Creates and initializes a new identification object, which provides information about the application that created or modified the current persistent unit.
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 Identification clone()
          Creates a cloned copy of this entity.
 boolean equals(Object o)
          Two identifications are equals if they have the same generation id.
 String getCompanyName()
          Returns the company name property of this identification, which specifies the name of the company or organization that created the application.
 TimeStamp getDate()
          Returns the time stamp property of this identification.
 Identification getGeneration()
          Gets the generation of this object, which identifies when this object was created or last modified.
 AUID getGenerationAUID()
          Shortcut to get the AUID of the identification representing this object's generation.
 String getPlatform()
          Returns the platform property of this identification, which specifies the toolkit and the platform on which the application is running, e.g.
 AUID getProductID()
          Returns the product id of this identification, which uniquely identifies the application.
 String getProductName()
          Returns the product name of this identification, which specifies the name of the application.
 ProductVersion getProductVersion()
          Gets the product version property associated with this identification, which specifies the version number of the application.
 String getProductVersionString()
          Returns the product version string of this identification, which specifies the version number of the application in string form.
 ProductVersion getRefImplVersion()
          Returns the reference implementation which created this identification object.
 ProductVersion getToolkitVersion()
          Returns the reference implementation which created this identification object.
 int hashCode()
          Returns a hash code value for this interchange object.
 void setProductVersion(ProductVersion version)
          Set the product version property of this identification, which specifies the version number of the application.
 void setPropertiesFromInterface(Identification castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
toString
 

Field Detail

APICompanyName

public static final String APICompanyName
See Also:
Constant Field Values

APIProductName

public static final String APIProductName
See Also:
Constant Field Values

APIProductVersion

public static final ProductVersion APIProductVersion

APIProductVersionString

public static final String APIProductVersionString
See Also:
Constant Field Values

APIProductID

public static final AUID APIProductID

APIToolkitVersion

public static final ProductVersion APIToolkitVersion

IDENTIFICATION_TAG

public static final String IDENTIFICATION_TAG
See Also:
Constant Field Values
Constructor Detail

Identification

public Identification(@AAFString
                      String companyName,
                      @AAFString
                      String productName,
                      @AAFString
                      String productVersionString,
                      AUID productID)
               throws NullPointerException

Creates and initializes a new identification object, which provides information about the application that created or modified the current persistent unit. The mandatory date and generation AUID properties of the identification will be created automatically.

Parameters:
companyName - Name of the company or organization that created the application.
productName - Name of the application.
productVersionString - Version number of the application in string form.
productID - Unique identifier for the application.
Throws:
NullPointerException - One or more of the arguments is null and all arguments are required.
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(Identification castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getCompanyName

@AAFProperty(uuid1=85985025,
             uuid2=513,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="CompanyName",
             typeName="String",
             optional=false,
             uniqueIdentifier=false,
             pid=15361)
public String getCompanyName()
Description copied from interface: Identification

Returns the company name property of this identification, which specifies the name of the company or organization that created the application.

Specified by:
getCompanyName in interface Identification
Returns:
Company name of this identification.

getDate

@AAFProperty(uuid1=117571856,
             uuid2=515,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Date",
             typeName="TimeStamp",
             optional=false,
             uniqueIdentifier=false,
             pid=15366)
public TimeStamp getDate()
Description copied from interface: Identification

Returns the time stamp property of this identification. The date-time stamp recorded in this object corresponds to the time that this file was created or modified on the occasion that this identification was added to the file.

Specified by:
getDate in interface Identification
Returns:
Time stamp of this identification.
See Also:
Header.appendIdentification(Identification)

getGenerationAUID

@AAFProperty(uuid1=85985025,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="GenerationAUID",
             typeName="AUID",
             optional=false,
             uniqueIdentifier=false,
             pid=15369)
public AUID getGenerationAUID()
Description copied from interface: InterchangeObject

Shortcut to get the AUID of the identification representing this object's generation.

This method will succeed if generation tracking is enabled for this object. Call InterchangeObject.enableGenerationTracking() and InterchangeObject.disableGenerationTracking() to control generation tracking for this object. Call InterchangeObject.isGenerationTracked() to determine if generation tracking is currently enabled for this object.

Specified by:
getGenerationAUID in interface Identification
Specified by:
getGenerationAUID in interface InterchangeObject
Overrides:
getGenerationAUID in class InterchangeObject
Returns:
AUID of the identification representing this object's generation.
See Also:
InterchangeObject.getGeneration(), Identification.getGenerationAUID()

getPlatform

@AAFProperty(uuid1=85985025,
             uuid2=1537,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Platform",
             typeName="String",
             optional=true,
             uniqueIdentifier=false,
             pid=15368)
public String getPlatform()
Description copied from interface: Identification

Returns the platform property of this identification, which specifies the toolkit and the platform on which the application is running, e.g. "MAJ API". This is an optional property.

This information is provided only to allow diagnostic printing of platform information to be read by humans. The format of the strings is not guaranteed to remain the same for a given platform.

Specified by:
getPlatform in interface Identification
Returns:
Platform property of this identification.

getProductID

@AAFProperty(uuid1=85985025,
             uuid2=1792,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ProductID",
             typeName="AUID",
             optional=false,
             uniqueIdentifier=false,
             pid=15365)
public AUID getProductID()
Description copied from interface: Identification

Returns the product id of this identification, which uniquely identifies the application.

Specified by:
getProductID in interface Identification
Returns:
Product id of this identification.

getProductName

@AAFProperty(uuid1=85985025,
             uuid2=769,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ProductName",
             typeName="String",
             optional=false,
             uniqueIdentifier=false,
             pid=15362)
public String getProductName()
Description copied from interface: Identification

Returns the product name of this identification, which specifies the name of the application.

Specified by:
getProductName in interface Identification
Returns:
Product name of this identification.

getProductVersion

@AAFProperty(uuid1=85985025,
             uuid2=1024,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ProductVersion",
             typeName="ProductVersion",
             optional=true,
             uniqueIdentifier=false,
             pid=15363)
public ProductVersion getProductVersion()
                                 throws PropertyNotPresentException
Description copied from interface: Identification

Gets the product version property associated with this identification, which specifies the version number of the application. This is an optional property.

Specified by:
getProductVersion in interface Identification
Returns:
Product version property associated with this identification.
Throws:
PropertyNotPresentException - The optional product version property is not present in this identification.

setProductVersion

public void setProductVersion(ProductVersion version)
Description copied from interface: Identification

Set the product version property of this identification, which specifies the version number of the application. Set this optional property to null to omit it.

Specified by:
setProductVersion in interface Identification
Parameters:
version - Product version to set for this identification.

getProductVersionString

@AAFProperty(uuid1=85985025,
             uuid2=1281,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ProductVersionString",
             typeName="String",
             optional=false,
             uniqueIdentifier=false,
             pid=15364)
public String getProductVersionString()
Description copied from interface: Identification

Returns the product version string of this identification, which specifies the version number of the application in string form.

Specified by:
getProductVersionString in interface Identification
Returns:
Product version string of this identification.

getToolkitVersion

@AAFProperty(uuid1=85985025,
             uuid2=2560,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ToolkitVersion",
             typeName="ProductVersion",
             optional=true,
             uniqueIdentifier=false,
             pid=15367)
public ProductVersion getToolkitVersion()

Returns the reference implementation which created this identification object.

Same as getRefImplVersion() to use the AAF specification name.

See Also:
Identification.getRefImplVersion()

getRefImplVersion

public ProductVersion getRefImplVersion()
Description copied from interface: Identification

Returns the reference implementation which created this identification object.

Specified by:
getRefImplVersion in interface Identification
Returns:
Reference implementation version.

getGeneration

public Identification getGeneration()
Description copied from interface: InterchangeObject

Gets the generation of this object, which identifies when this object was created or last modified.

This method will succeed if generation tracking is enabled for this object. Call InterchangeObject.enableGenerationTracking() and InterchangeObject.disableGenerationTracking() to control generation tracking for this object. Call InterchangeObject.isGenerationTracked() to determine if generation tracking is currently enabled for this object.

Specified by:
getGeneration in interface InterchangeObject
Overrides:
getGeneration in class InterchangeObject
Returns:
Identification for when this object was last modified.

equals

public boolean equals(Object o)

Two identifications are equals if they have the same generation id.

Specified by:
equals in interface MAJCommon
Overrides:
equals in class Object
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Description copied from interface: MAJCommon

Returns a hash code value for this interchange object.

Specified by:
hashCode in interface MAJCommon
Overrides:
hashCode in class Object
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public Identification clone()
Description copied from interface: MAJCommon

Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.

This method does not throw a CloneNotSupportedException as all entity values must implement the Cloneable interface. If a cloning error does occur, a null value will be returned but this is very unlikely to happen.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class Object
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: XMLSerializable

Append child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the XMLBuilder class are provided to help with this process.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class InterchangeObject
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

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