private boolean checkType ( int tagid , int tagType , int n ) { if ( TiffTags . hasTag ( tagid ) && ! TiffTags . getTag ( tagid ) . getName ( ) . equals ( "IPTC" ) ) { boolean found = false ; String stagType = TiffTags . getTagTypeName ( tagType ) ; if ( stagType != null ) { if ( stagType . equals ( "SUBIFD" ) ) stagType = "IFD" ; if ( stagType . equals ( "UNDEFINED" ) ) stagType = "BYTE" ; for ( String vType : TiffTags . getTag ( tagid ) . getType ( ) ) { String vType2 = vType ; if ( vType2 . equals ( "UNDEFINED" ) ) vType2 = "BYTE" ; if ( vType2 . equals ( stagType ) ) { found = true ; } } } if ( ! found ) { validation . addError ( "Incorrect type for tag " + TiffTags . getTag ( tagid ) . getName ( ) , "IFD" + n , stagType ) ; return false ; } return true ; } return false ; }
Check tag type .