public class AAFFile extends Object implements AAFFile, Serializable
| Constructor and Description |
|---|
AAFFile(FileDescriptor aafFile)
Creates and initilizes an AAF file from a Java file descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
static AAFFile |
castFromInterface(AAFFile alien)
Cast a
AAFFile
value from the generic interface to this implementation of
the interface. |
void |
close()
Dissociates this AAFFile from its storage.
|
DictionaryImpl |
getDictionary()
Returns the dictionary that contains all types of
AAF definition objects for the file.
|
PrefaceImpl |
getPreface()
Returns the preface associated with this
file.
|
FileRev |
getRevision()
Returns the revision of the file.
|
void |
open()
Associates this AAFFile with the storage to
which it is to be associated.
|
void |
save()
If this AAFFile is open, all unsaved changes
made to the contents of this object are saved.
|
void |
saveCopyAs(AAFFile destFile)
Copies the contents of this file to a given destination file.
|
public AAFFile(FileDescriptor aafFile) throws NullPointerException
Creates and initilizes an AAF file from a Java file descriptor. This method makes no attempt to check the validity of the given file descriptor or whether the file it specifies exists and can be accessed.
aafFile - File descriptor for an AAF file.NullPointerException - Argument is null.public static final AAFFile castFromInterface(AAFFile alien) throws NullPointerException
Cast a AAFFile
value from the generic interface to this implementation of
the interface. If the given value is not a native implementation, a copy will be
instanciated using get and set methods.
alien - A potentially alien implementation of an instance of the AAFFile
interface.NullPointerException - Argument is null.public void close()
throws NotOpenException
AAFFileDissociates this AAFFile from its storage. Any AAF objects which were contained within this object will then no longer be available to the client.
If the client is maintaining any references to any objects which are contained in this object, those objects will be marked as dissociated, and methods on them will fail.
Any unsaved changes will be written to the file before the close operation is complete.
close in interface AAFFileNotOpenException - This object is not already open.AAFFile.close()public DictionaryImpl getDictionary()
AAFFileReturns the dictionary that contains all types of AAF definition objects for the file. Note that the dictionary is automatically created when the preface is created.
getDictionary in interface AAFFileAAFFile.getDictionary()public PrefaceImpl getPreface() throws NotOpenException, NoPrefaceException
AAFFileReturns the preface associated with this file. If this object has never been associated with a file, a new empty preface will be created and returned. Note that the preface is automatically created when the file object is created.
getPreface in interface AAFFileNotOpenException - The object is not open.NoPrefaceException - The object contains no preface.AAFFile.getPreface()public FileRev getRevision() throws NotOpenException
AAFFileReturns the revision of the file.
getRevision in interface AAFFileNotOpenException - The object is not open.AAFFile.getRevision()public void open()
throws AlreadyOpenException
AAFFileAssociates this AAFFile with the storage to which it is to be associated. It will then be possible to access objects within this file.
open in interface AAFFileAlreadyOpenException - This object has already been opened.AAFFile.open()public void save()
throws NotOpenException,
WrongOpenModeException,
InsufficientSpaceException
AAFFileIf this AAFFile is open, all unsaved changes made to the contents of this object are saved.
save in interface AAFFileNotOpenException - The object is not open.WrongOpenModeException - This object is not open for writing
or modification.InsufficientSpaceException - There is insufficient space in
the storage to save the contents of this object.AAFFile.save()public void saveCopyAs(AAFFile destFile) throws NotOpenException, NotWriteableException
AAFFileCopies the contents of this file to a given destination file. Requires that the destination file be open, writable or modifiable, and not yet contain any objects.
saveCopyAs in interface AAFFiledestFile - File to receive a copy of the contents of this file.NotOpenException - The destination file is not open.NotWriteableException - The destination file cannot be written.
One reason may be that it already contains objects.AAFFile.saveCopyAs(tv.amwa.maj.model.AAFFile)(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.