private void pdb_COMPND_Handler(String line) {

		logger.debug("previousContinuationField  is "
					+ previousContinuationField);
		logger.debug("current continuationField  is "
					+ continuationField);
		logger.debug("current continuationString is "
					+ continuationString);
		logger.debug("current compound           is "
					+ current_compound);


		// In legacy PDB files the line ends with the PDB code and a serial number, chop those off!
		//format version 3.0 onwards will have 80 characters in a line
		//		if (line.length() > 72) {
		if (isLegacyFormat) {
			//                    if (DEBUG) {
			//                        System.out.println("We have a legacy file - truncating line length to 71 characters:");
			//                        System.out.println(line);
			//                    }
			line = line.substring(0, 72);
		}

		line = line.substring(10, line.length());


		String[] fieldList = line.trim().split("\\s+");
		int fl = fieldList.length;
		if ((fl >0 ) && compndFieldValues.contains(fieldList[0])) {

			continuationField = fieldList[0];
			if (previousContinuationField.equals("")) {
				previousContinuationField = continuationField;
			}

		} else if (fl>0) {
			// the ':' character indicates the end of a field name and should be invalid as part the first data token
			// e.g. obsolete file 1hhb has a malformed COMPND line that can only be caught with this kind of check
			if (fieldList[0].contains(":") ) {
				logger.info("COMPND line does not follow the PDB 3.0 format. Note that COMPND parsing is not supported any longer in format 2.3 or earlier");
				return;
			}

		} else {

			// the line will be added as data to the previous field
		}

		line = line.replace(continuationField, "").trim();

		StringTokenizer compndTokens = new StringTokenizer(line);

		//		System.out.println("PDBFileParser.pdb_COMPND_Handler: Tokenizing '" + line + "'");

		while (compndTokens.hasMoreTokens()) {
			String token = compndTokens.nextToken();

			if (previousContinuationField.equals("")) {
				previousContinuationField = continuationField;
			}

			if (previousContinuationField.equals(continuationField)
					&& compndFieldValues.contains(continuationField)) {

				logger.debug("Still in field " + continuationField);
				logger.debug("token = " + token);

				continuationString = continuationString.concat(token + " ");

				logger.debug("continuationString = "
							+ continuationString);

			}
			if (!continuationField.equals(previousContinuationField)) {

				if (continuationString.equals("")) {
					continuationString = token;

				} else {

					compndValueSetter(previousContinuationField,
							continuationString);
					previousContinuationField = continuationField;
					continuationString = token + " ";
				}
			} else if (ignoreCompndFieldValues.contains(token)) {
				// this field shall be ignored
				//continuationField = token;
			}
		}
		if (isLastCompndLine) {
			// final line in the section - finish off the compound
			//			System.out.println("[pdb_COMPND_Handler] Final COMPND line - Finishing off final MolID header.");
			compndValueSetter(continuationField, continuationString);
			continuationString = "";
			if (current_compound!=null) entities.add(current_compound);
		}
	}
private void pdb_COMPND_Handler ( String line ) { logger . debug ( "previousContinuationField  is " + previousContinuationField ) ; logger . debug ( "current continuationField  is " + continuationField ) ; logger . debug ( "current continuationString is " + continuationString ) ; logger . debug ( "current compound           is " + current_compound ) ; if ( isLegacyFormat ) { line = line . substring ( 0 , 72 ) ; } line = line . substring ( 10 , line . length ( ) ) ; String [ ] fieldList = line . trim ( ) . split ( "\\s+" ) ; int fl = fieldList . length ; if ( ( fl > 0 ) && compndFieldValues . contains ( fieldList [ 0 ] ) ) { continuationField = fieldList [ 0 ] ; if ( previousContinuationField . equals ( "" ) ) { previousContinuationField = continuationField ; } } else if ( fl > 0 ) { if ( fieldList [ 0 ] . contains ( ":" ) ) { logger . info ( "COMPND line does not follow the PDB 3.0 format. Note that COMPND parsing is not supported any longer in format 2.3 or earlier" ) ; return ; } } else { } line = line . replace ( continuationField , "" ) . trim ( ) ; StringTokenizer compndTokens = new StringTokenizer ( line ) ; while ( compndTokens . hasMoreTokens ( ) ) { String token = compndTokens . nextToken ( ) ; if ( previousContinuationField . equals ( "" ) ) { previousContinuationField = continuationField ; } if ( previousContinuationField . equals ( continuationField ) && compndFieldValues . contains ( continuationField ) ) { logger . debug ( "Still in field " + continuationField ) ; logger . debug ( "token = " + token ) ; continuationString = continuationString . concat ( token + " " ) ; logger . debug ( "continuationString = " + continuationString ) ; } if ( ! continuationField . equals ( previousContinuationField ) ) { if ( continuationString . equals ( "" ) ) { continuationString = token ; } else { compndValueSetter ( previousContinuationField , continuationString ) ; previousContinuationField = continuationField ; continuationString = token + " " ; } } else if ( ignoreCompndFieldValues . contains ( token ) ) { } } if ( isLastCompndLine ) { compndValueSetter ( continuationField , continuationString ) ; continuationString = "" ; if ( current_compound != null ) entities . add ( current_compound ) ; } }
This should not be accessed directly, other than by </code>makeCompounds</code>. It still deals with the same
lines in a similar manner but if not accessed from </code>makeCompounds</code> the last element will be
missing. Don't say I didn't warn you.

@param line