Package edu.harvard.hul.ois.jhove
Class AESAudioMetadata
- java.lang.Object
-
- edu.harvard.hul.ois.jhove.AESAudioMetadata
-
public class AESAudioMetadata extends Object
Encapsulation of the AES Metadata for Audio documents- Author:
- Gary McGath
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAESAudioMetadata.FacePublic interface to the nested Face object.static interfaceAESAudioMetadata.FaceRegionPublic interface to the nested FaceRegion object.static interfaceAESAudioMetadata.FormatRegionPublic interface to the nested FormatRegion object.static interfaceAESAudioMetadata.TimeDescPublic interface to the nested TimeDesc object.
-
Field Summary
Fields Modifier and Type Field Description static String[]A_DAnalog / digital labels.static intBIG_ENDIANBig-endian constant.static StringFILE_NAMEValues for primary identifier typestatic intLITTLE_ENDIANLittle-endian constant.static doubleNILLConstant for an undefined floating-point value.static intNULLConstant for an undefined integer value.static StringOTHERValues for primary identifier typestatic StringSCHEMA_VERSIONConstant value for the SchemaVersion field
-
Constructor Summary
Constructors Constructor Description AESAudioMetadata()Instantiate aNisoImageMetadataobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFace()Adds a Face.voidaddFormatRegion()Adds a FormatRegion object to a FormatSize list.voidclearBitrateReduction()Set the bitrate reduction information to null (no compression).StringgetAnalogDigitalFlag()Returns analog/digital flag.StringgetAppSpecificData()Returns application-specific data.StringgetAudioDataEncoding()Returns audio data encoding.String[]getBitrateReduction()Returns the bitrate reduction (compression information).intgetByteOrder()Return the byte order: 0 = big-endian; 1 = little-endian.StringgetDisposition()Returns disposition.List<AESAudioMetadata.Face>getFaceList()Gets the list of Faces.longgetFirstSampleOffset()Return the offset of the first byte of sample data.StringgetFormat()Returns format name.List<AESAudioMetadata.FormatRegion>getFormatList()Gets the list of Format Regions.String[]getMapLocations()Returns the names of the map locations.intgetNumChannels()Returns number of channels.StringgetPrimaryIdentifier()Returns primary identifier.StringgetPrimaryIdentifierType()Returns primary identifier type.doublegetSampleRate()StringgetSchemaVersion()Returns schema version.StringgetSpecificationVersion()Returns specification version of the document format.String[]getUse()Returns the use (role of the document).voidsetAnalogDigitalFlag(String flagType)Sets the analog/digital flag.voidsetAppSpecificData(String data)Set the application-specific data.voidsetAudioDataEncoding(String audioDataEncoding)Sets the audio data encoding.voidsetBitDepth(int bitDepth)Sets the bit depth.voidsetBitrateReduction(String codecName, String codecNameVersion, String codecCreatorApplication, String codecCreatorApplicationVersion, String codecQuality, String dataRate, String dataRateMode)Sets the bitrate reduction (compression type).voidsetByteOrder(int order)Sets the byte order.voidsetByteOrder(String order)Sets the byte order.voidsetDirection(String direction)Sets the direction.voidsetDisposition(String disposition)Sets the disposition.voidsetDuration(long duration)Sets the duration in samples.voidsetFirstSampleOffset(long offset)Sets the offset of the first byte of sample data.voidsetFormat(String format)Sets the format name.voidsetMapLocations(String[] locations)Sets the array of channel map locations.voidsetNumChannels(int numChannels)Sets the number of channels.voidsetOtherPrimaryIdentifierType(String otherType)Sets the primary identifier type as "OTHER", and set the otherType.voidsetPrimaryIdentifier(String primaryIdentifier)Sets the primary identifier.voidsetPrimaryIdentifierType(String primaryIdentifierType)Sets the primary identifier type.voidsetSampleRate(double sampleRate)Sets the sample rate.voidsetSpecificationVersion(String specificationVersion)Sets the specification version of the document format.voidsetStartTime(long samples)Sets the start time in samples.voidsetUse(String useType, String otherType)Sets the role of the document.voidsetWordSize(int wordSize)Sets the word size.
-
-
-
Field Detail
-
BIG_ENDIAN
public static final int BIG_ENDIAN
Big-endian constant.- See Also:
- Constant Field Values
-
LITTLE_ENDIAN
public static final int LITTLE_ENDIAN
Little-endian constant.- See Also:
- Constant Field Values
-
A_D
public static final String[] A_D
Analog / digital labels.
-
FILE_NAME
public static final String FILE_NAME
Values for primary identifier type- See Also:
- Constant Field Values
-
OTHER
public static final String OTHER
Values for primary identifier type- See Also:
- Constant Field Values
-
NULL
public static final int NULL
Constant for an undefined integer value.- See Also:
- Constant Field Values
-
NILL
public static final double NILL
Constant for an undefined floating-point value.- See Also:
- Constant Field Values
-
SCHEMA_VERSION
public static final String SCHEMA_VERSION
Constant value for the SchemaVersion field- See Also:
- Constant Field Values
-
-
Method Detail
-
getAnalogDigitalFlag
public String getAnalogDigitalFlag()
Returns analog/digital flag. Value will always be "FILE_DIGITAL" in practice.
-
getAppSpecificData
public String getAppSpecificData()
Returns application-specific data. We assume this is representable in String format.
-
getAudioDataEncoding
public String getAudioDataEncoding()
Returns audio data encoding.
-
getBitrateReduction
public String[] getBitrateReduction()
Returns the bitrate reduction (compression information). This will be an array of seven strings (which may be empty, but should never be null) interpreted as follows:- 0: codecName
- 1: codecNameVersion
- 2: codecCreatorApplication
- 3: codecCreatorApplicationVersion
- 4: codecQuality
- 5: dataRate
- 6: dataRateMode
-
getSampleRate
public double getSampleRate()
-
getByteOrder
public int getByteOrder()
Return the byte order: 0 = big-endian; 1 = little-endian.
-
getDisposition
public String getDisposition()
Returns disposition.
-
getFaceList
public List<AESAudioMetadata.Face> getFaceList()
Gets the list of Faces. Normally there will be only one face in a digital file.
-
getFirstSampleOffset
public long getFirstSampleOffset()
Return the offset of the first byte of sample data.
-
getFormat
public String getFormat()
Returns format name.
-
getFormatList
public List<AESAudioMetadata.FormatRegion> getFormatList()
Gets the list of Format Regions. Since one is created automatically on initialization, it's possible that the list will contain a Format Region with only default values. This should be checked with isEmpty ().
-
getMapLocations
public String[] getMapLocations()
Returns the names of the map locations. The returned value is an array whose length equals the number of channels and whose elements correspond to channels 0, 1, etc.
-
getNumChannels
public int getNumChannels()
Returns number of channels.
-
getPrimaryIdentifier
public String getPrimaryIdentifier()
Returns primary identifier.
-
getPrimaryIdentifierType
public String getPrimaryIdentifierType()
Returns primary identifier type.
-
getSchemaVersion
public String getSchemaVersion()
Returns schema version.
-
getSpecificationVersion
public String getSpecificationVersion()
Returns specification version of the document format.
-
getUse
public String[] getUse()
Returns the use (role of the document). The value returned is an array of two strings, the useType and the otherType.
-
setAnalogDigitalFlag
public void setAnalogDigitalFlag(String flagType)
Sets the analog/digital flag. The value set should always be "FILE_DIGITAL".
-
setBitrateReduction
public void setBitrateReduction(String codecName, String codecNameVersion, String codecCreatorApplication, String codecCreatorApplicationVersion, String codecQuality, String dataRate, String dataRateMode)
Sets the bitrate reduction (compression type).
-
clearBitrateReduction
public void clearBitrateReduction()
Set the bitrate reduction information to null (no compression).
-
setByteOrder
public void setByteOrder(int order)
Sets the byte order.- Parameters:
order- Byte order: 0 = big-endian, 1 = little-endian
-
setByteOrder
public void setByteOrder(String order)
Sets the byte order.
-
setAudioDataEncoding
public void setAudioDataEncoding(String audioDataEncoding)
Sets the audio data encoding.
-
setAppSpecificData
public void setAppSpecificData(String data)
Set the application-specific data. For present purposes, we assume this is representable as a text string.
-
setBitDepth
public void setBitDepth(int bitDepth)
Sets the bit depth.
-
setDisposition
public void setDisposition(String disposition)
Sets the disposition.
-
setDirection
public void setDirection(String direction)
Sets the direction. This must be one of the values FORWARD, REVERSE, A_WIND, B_WIND, C_WIND, D_WIND, FRONT, BACK. FORWARD may be the only one that makes sense for digital formats.
-
setDuration
public void setDuration(long duration)
Sets the duration in samples. This affects the current face and its first FaceRegion.
-
setFirstSampleOffset
public void setFirstSampleOffset(long offset)
Sets the offset of the first byte of sample data.
-
setFormat
public void setFormat(String format)
Sets the format name.
-
setMapLocations
public void setMapLocations(String[] locations)
Sets the array of channel map locations. The length of the array must equal the number of channels.
-
setNumChannels
public void setNumChannels(int numChannels)
Sets the number of channels.
-
setPrimaryIdentifier
public void setPrimaryIdentifier(String primaryIdentifier)
Sets the primary identifier.
-
setPrimaryIdentifierType
public void setPrimaryIdentifierType(String primaryIdentifierType)
Sets the primary identifier type. If the primary identifier type is OTHER, use setOtherPrimaryIdentifierType instead.
-
setOtherPrimaryIdentifierType
public void setOtherPrimaryIdentifierType(String otherType)
Sets the primary identifier type as "OTHER", and set the otherType.
-
setSampleRate
public void setSampleRate(double sampleRate)
Sets the sample rate.
-
setSpecificationVersion
public void setSpecificationVersion(String specificationVersion)
Sets the specification version of the document format.
-
setStartTime
public void setStartTime(long samples)
Sets the start time in samples. This affects the current face and its first FaceRegion.
-
setUse
public void setUse(String useType, String otherType)
Sets the role of the document. Permitted values are ORIGINAL_MASTER, PRESERVATION_MASTER, PRODUCTION_MASTER, SERVICE, PREVIEW, or OTHER. If useType is "OTHER", then otherType is significant. Since OTHER is the only meaningful value for a digital document, the code assumes this will always be the case and uses otherType.
-
setWordSize
public void setWordSize(int wordSize)
Sets the word size.
-
addFormatRegion
public void addFormatRegion()
Adds a FormatRegion object to a FormatSize list. The most recently added FormatRegion object will be filled in by setBitDepth, setSampleRate, and setWordSize.
-
addFace
public void addFace()
Adds a Face.
-
-