private void pdb_HEADER_Handler(String line) {

		String classification  = null;
		String deposition_date = null;
		String pdbCode         = null;

		int len = line.trim().length();
		if(len > 10) {
			classification  = line.substring (10, min(len,50)).trim() ;
			pdbHeader.setClassification(classification);
		}
		if(len > 50) {
			deposition_date = line.substring (50, min(len,59)).trim() ;
			try {
				Date dep = dateFormat.parse(deposition_date);
				pdbHeader.setDepDate(dep);

			} catch (ParseException e){
				logger.info("Could not parse deposition date string '"+deposition_date+"'. Will continue without deposition date");
			}
		}
		if(len > 62) {
			pdbCode         = line.substring (62, min(len,66)).trim() ;
			pdbId = pdbCode;

			logger.debug("Parsing entry " + pdbId);


			structure.setPDBCode(pdbCode);
			pdbHeader.setIdCode(pdbCode);
		}

		//*really* old files (you'll need to hunt to find these as they
		//should have been remediated) have headers like below. Plus the
		//pdbId at positions 72-76 is present in every line

		//HEADER    PROTEINASE INHIBITOR (TRYPSIN)          05-OCT-84   5PTI      5PTI   3
		//HEADER    TRANSFERASE (ACYLTRANSFERASE)           02-SEP-92   1LAC      1LAC   2
		if (len > 66) {
			if (pdbId.equals(line.substring (72, 76))){
				isLegacyFormat = true;
				logger.warn(pdbId + " is a LEGACY entry - this will most likely not parse correctly.");
			}
		}

	}
private void pdb_HEADER_Handler ( String line ) { String classification = null ; String deposition_date = null ; String pdbCode = null ; int len = line . trim ( ) . length ( ) ; if ( len > 10 ) { classification = line . substring ( 10 , min ( len , 50 ) ) . trim ( ) ; pdbHeader . setClassification ( classification ) ; } if ( len > 50 ) { deposition_date = line . substring ( 50 , min ( len , 59 ) ) . trim ( ) ; try { Date dep = dateFormat . parse ( deposition_date ) ; pdbHeader . setDepDate ( dep ) ; } catch ( ParseException e ) { logger . info ( "Could not parse deposition date string '" + deposition_date + "'. Will continue without deposition date" ) ; } } if ( len > 62 ) { pdbCode = line . substring ( 62 , min ( len , 66 ) ) . trim ( ) ; pdbId = pdbCode ; logger . debug ( "Parsing entry " + pdbId ) ; structure . setPDBCode ( pdbCode ) ; pdbHeader . setIdCode ( pdbCode ) ; } if ( len > 66 ) { if ( pdbId . equals ( line . substring ( 72 , 76 ) ) ) { isLegacyFormat = true ; logger . warn ( pdbId + " is a LEGACY entry - this will most likely not parse correctly." ) ; } } }
Handler for
HEADER Record Format
<pre>
COLUMNS        DATA TYPE       FIELD           DEFINITION
----------------------------------------------------------------------------------
1 -  6        Record name     "HEADER"
11 - 50        String(40)      classification  Classifies the molecule(s)
51 - 59        Date            depDate         Deposition date.  This is the date
the coordinates were received by
the PDB
63 - 66        IDcode          idCode          This identifier is unique within PDB
</pre>