|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.module.tiff.TiffProfile
public abstract class TiffProfile
Abstract class for TIFF profile checkers.
A profile applies to a given IFD; the caller should
run all profiles on all IFD's and accumulate a List
of the Strings returned by getText
when satisfiesProfile
returns true.
Field Summary | |
---|---|
protected int |
_mimeClass
|
protected java.lang.String |
_profileText
PRIVATE CLASS FIELDS. |
static int |
MIME_1314
Values for mimeClass. |
static int |
MIME_FX
Values for mimeClass. |
static int |
MIME_GENERIC
Values for mimeClass. |
Constructor Summary | |
---|---|
TiffProfile()
Creates a TiffProfile. |
Method Summary | |
---|---|
int |
getMimeClass()
Returns the MIME class for this profile. |
java.lang.String |
getText()
Returns the text which describes this profile. |
boolean |
isAlreadyOK()
Returns the value of the alreadyOK flag. |
protected boolean |
satisfiesBackgroundColorIndicator(TiffIFD ifd,
int value)
Checks if the value of the BackgroundColorIndicator tag matches the value passed to it. |
protected boolean |
satisfiesBackgroundColorIndicator(TiffIFD ifd,
int[] values)
Checks if the value of the BackgroundColorIndicator tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesCompression(TiffIFD ifd,
int value)
Checks if the value of the PlanarConfiguration tag matches the value passed to it. |
protected boolean |
satisfiesCompression(TiffIFD ifd,
int[] values)
Checks if the value of the Compression tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesDotRange(TiffIFD ifd,
int minValue,
int maxValue)
Checks the DotRange against a minimum and a maximum value. |
protected boolean |
satisfiesFillOrder(TiffIFD ifd,
int[] values)
Checks if the value of the Indexed tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesImageColorIndicator(TiffIFD ifd,
int value)
Checks if the value of the ImageColorIndicator tag matches the value passed to it. |
protected boolean |
satisfiesImageColorIndicator(TiffIFD ifd,
int[] values)
Checks if the value of the ImageColorIndicator tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesImageWidth(TiffIFD ifd,
int[] values)
Checks if the value of the ImageWidth tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesIndexed(TiffIFD ifd,
int[] values)
Checks if the value of the Indexed tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesNewSubfileType(TiffIFD ifd,
long value)
Checks if the value of the NewSubfileType tag matches the value passed to it. |
protected boolean |
satisfiesNewSubfileType(TiffIFD ifd,
long[] values)
Checks if the value of the NewSubfileType tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesOrientation(TiffIFD ifd,
int value)
Checks if the value of the Orientation tag matches the value passed to it. |
protected boolean |
satisfiesOrientation(TiffIFD ifd,
int[] values)
Checks if the value of the Orientation tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesPhotometricInterpretation(TiffIFD ifd,
int value)
Checks if the value of the PhotometricInterpretation tag matches the value passed to it. |
protected boolean |
satisfiesPhotometricInterpretation(TiffIFD ifd,
int[] values)
Checks if the value of the PhotometricInterpretation tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesPlanarConfiguration(TiffIFD ifd,
int value)
Checks if the value of the PlanarConfiguration tag matches the value passed to it. |
protected boolean |
satisfiesPlanarConfiguration(TiffIFD ifd,
int[] values)
Checks if the value of the PlanarConfiguration tag matches any of the values in the array passed to it. |
boolean |
satisfiesProfile(IFD ifd)
Returns true if the IFD satisfies the profile. |
protected boolean |
satisfiesResolutionUnit(TiffIFD ifd,
int value)
Checks if the value of the ResolutionUnit tag matches the value passed to it. |
protected boolean |
satisfiesResolutionUnit(TiffIFD ifd,
int[] values)
Checks if the value of the ResolutionUnit tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesSamplesPerPixel(TiffIFD ifd,
int value)
Checks if the value of the SamplesPerPixel tag matches the value passed to it. |
protected boolean |
satisfiesSamplesPerPixel(TiffIFD ifd,
int[] values)
Checks if the value of the SamplesPerPixel tag matches any of the values in the array passed to it. |
abstract boolean |
satisfiesThisProfile(IFD ifd)
Returns true if the IFD satisfies the
profile. |
protected boolean |
satisfiesXResolution(TiffIFD ifd,
int[] values)
Checks if the value of the XResolution tag matches any of the values in the array passed to it. |
protected boolean |
satisfiesYResolution(TiffIFD ifd,
int[] values)
Checks if the value of the XResolution tag matches any of the values in the array passed to it. |
void |
setAlreadyOK(boolean ok)
Sets the value of the alreadyOK flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String _profileText
protected int _mimeClass
public static final int MIME_GENERIC
public static final int MIME_FX
public static final int MIME_1314
Constructor Detail |
---|
public TiffProfile()
Method Detail |
---|
public final boolean satisfiesProfile(IFD ifd)
true
if the IFD satisfies the profile.
This calls satisfiesThisProfile()
, which does the actual work.
satisfiesProfile()
sets the alreadyOK flag, which may be
checked by calling isAlreadyOK()
to save the effort of
testing the same profile more than once and thus generating
duplicate output.
Subclasses should not override satisfiesProfile
.
ifd
- The IFD which is being evaluated against the profilepublic abstract boolean satisfiesThisProfile(IFD ifd)
true
if the IFD satisfies the
profile. Subclasses should override satisfiesThisProfile()
,
not satisfiesProfile()
, as
satisfiesProfile()
does some
additional bookkeeping for all subclases.
public java.lang.String getText()
public void setAlreadyOK(boolean ok)
public int getMimeClass()
public boolean isAlreadyOK()
true
.
protected boolean satisfiesCompression(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesCompression(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesPhotometricInterpretation(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesPhotometricInterpretation(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesResolutionUnit(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesResolutionUnit(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesXResolution(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesYResolution(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesSamplesPerPixel(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesSamplesPerPixel(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesPlanarConfiguration(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesPlanarConfiguration(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesOrientation(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesOrientation(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesImageColorIndicator(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesImageColorIndicator(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesNewSubfileType(TiffIFD ifd, long[] values)
ifd
- The IFD being checkedvalues
- An array of long values, any of which will
satisfy the test.protected boolean satisfiesNewSubfileType(TiffIFD ifd, long value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesBackgroundColorIndicator(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesBackgroundColorIndicator(TiffIFD ifd, int value)
ifd
- The IFD being checkedvalue
- A value which must match the tag value to
satisfy the test.protected boolean satisfiesDotRange(TiffIFD ifd, int minValue, int maxValue)
protected boolean satisfiesImageWidth(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesIndexed(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.protected boolean satisfiesFillOrder(TiffIFD ifd, int[] values)
ifd
- The IFD being checkedvalues
- An array of values, any of which will
satisfy the test.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |