|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.harvard.hul.ois.jhove.module.tiff.TagFamily
Subclasses of this abstract class encapsulate a set of TIFF tags,
providing accessor functions for their values. Any TiffIFD instance
should instantiate all the subclasses of TagFamily, enabling those
which are actually legitimate for the IFD by setting the
enabled
parameter in the constructor.
Field Summary | |
protected boolean |
_enabled
True if tag family enabled. |
protected TiffIFD |
_ifd
TIFF IFD. |
protected int |
_version
TIFF version. |
static int |
UNDEFINED
Undefined initial value. |
Constructor Summary | |
TagFamily(TiffIFD ifd,
boolean enabled)
TagFamily constructor. |
Method Summary | |
protected void |
checkCount(int tag,
int nValues,
int minCount)
Check the tag entry count. |
protected void |
checkType(int tag,
int fieldType,
int type)
Check the tag entry type. |
protected void |
checkType(int tag,
int fieldType,
int type1,
int type2)
Check the tag entry type. |
boolean |
isEnabled()
Returns true if this TagFamily object is
enabled. |
protected abstract boolean |
lookupTag(TiffModule module,
TiffIFD ifd,
int tag,
int fieldType,
int nValues,
long valueOffset,
RepInfo info)
Looks up a tag in a TagFamily object. |
protected java.lang.String |
makeAscii(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a string value from a tag whose type is ASCII or UNDEFINED. |
protected java.lang.String[] |
makeAsciiArray(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a string array from a tag whose type is ASCII or UNDEFINED. |
protected double[] |
makeDoubleArray(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a double array value from a tag whose type is DOUBLE. |
protected int |
makeInt(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains an integer value from a tag whose type is integer-compatible. |
protected int[] |
makeIntArray(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains an integer array value from a tag whose type is integer-compatible. |
protected long |
makeLong(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a long value from a tag whose type is integer-compatible. |
protected long[] |
makeLongArray(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a long array value from a tag whose type is integer-compatible. |
protected Rational |
makeRational(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a Rational value from a tag whose type is RATIONAL. |
protected Rational[] |
makeRationalArray(TiffModule module,
TiffTag tiffTag,
long valueOffset)
Obtains a Rational array value from a tag whose type is Rational. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNDEFINED
protected boolean _enabled
protected TiffIFD _ifd
protected int _version
Constructor Detail |
public TagFamily(TiffIFD ifd, boolean enabled)
ifd
- The IFD from which the tag cameenabled
- true
if we should make use of
this TagFamily subclass for the current IFDMethod Detail |
protected void checkCount(int tag, int nValues, int minCount) throws TiffException
tag
- Tag entry valuenValues
- Tag entry countminCount
- Tag count
TiffException
protected void checkType(int tag, int fieldType, int type) throws TiffException
tag
- Tag entry valuefieldType
- Tag entry typetype
- Tag type
TiffException
protected void checkType(int tag, int fieldType, int type1, int type2) throws TiffException
tag
- Tag entry valuefieldType
- Tag entry typetype1
- Tag typetype2
- Alternate tag type
TiffException
public boolean isEnabled()
true
if this TagFamily object is
enabled.
protected abstract boolean lookupTag(TiffModule module, TiffIFD ifd, int tag, int fieldType, int nValues, long valueOffset, RepInfo info) throws TiffException
module
- The TiffModule under which the tag is being readifd
- The TiffIFD in which the tag was foundtag
- The tag value for the tag being looked upfieldType
- The field type (using the TIFF type values)nValues
- The number of values indicated by the tagvalueOffset
- The offset in the file to the value. If the
size of the data is 4 or less, this will be an
offset to the "offset" field itself.info
- The RepInfo object describing the current file
TiffException
protected java.lang.String makeAscii(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value. If the
value is contained in the tag,
this must be the offset to the datum
in the tag itself.
java.io.IOException
protected java.lang.String[] makeAsciiArray(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value. If the
value is contained in the tag,
this must be the offset to the datum
in the tag itself.
java.io.IOException
protected double[] makeDoubleArray(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value.
java.io.IOException
protected int makeInt(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value. If the
value is contained in the tag,
this must be the offset to the datum
in the tag itself.
java.io.IOException
protected int[] makeIntArray(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value.
java.io.IOException
protected long makeLong(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value. If the
value is contained in the tag,
this must be the offset to the datum
in the tag itself.
java.io.IOException
protected long[] makeLongArray(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value.
java.io.IOException
protected Rational makeRational(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value. If the
value is contained in the tag,
this must be the offset to the datum
in the tag itself.
java.io.IOException
protected Rational[] makeRationalArray(TiffModule module, TiffTag tiffTag, long valueOffset) throws java.io.IOException
module
- The TiffModule under which we are
operatingtiffTag
- The TiffTag from which we are extracting
the valuevalueOffset
- The offset to the data value.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |