public String toIPTC ( SubjectReferenceSystem srs ) { StringBuffer b = new StringBuffer ( ) ; b . append ( "IPTC:" ) ; b . append ( getNumber ( ) ) ; b . append ( ":" ) ; if ( getNumber ( ) . endsWith ( "000000" ) ) { b . append ( toIPTCHelper ( srs . getName ( this ) ) ) ; b . append ( "::" ) ; } else if ( getNumber ( ) . endsWith ( "000" ) ) { b . append ( toIPTCHelper ( srs . getName ( srs . get ( getNumber ( ) . substring ( 0 , 2 ) + "000000" ) ) ) ) ; b . append ( ":" ) ; b . append ( toIPTCHelper ( srs . getName ( this ) ) ) ; b . append ( ":" ) ; } else { b . append ( toIPTCHelper ( srs . getName ( srs . get ( getNumber ( ) . substring ( 0 , 2 ) + "000000" ) ) ) ) ; b . append ( ":" ) ; b . append ( toIPTCHelper ( srs . getName ( srs . get ( getNumber ( ) . substring ( 0 , 5 ) + "000" ) ) ) ) ; b . append ( ":" ) ; b . append ( toIPTCHelper ( srs . getName ( this ) ) ) ; } return b . toString ( ) ; }
Formats an IPTC string for this reference using information obtained from Subject Reference System .