{
StringBuilder sb = new StringBuilder(128);
sb.append(MEGA_ID).append(newline);
- printProperty(al, sb, PROP_TITLE, TITLE);
- printProperty(al, sb, PROP_DESCRIPTION, DESCRIPTION);
+ String propertyValue = (String) al.getProperty(PROP_TITLE);
+ if (propertyValue != null)
+ {
+ sb.append(BANG).append(TITLE).append(SPACE)
+.append(propertyValue)
+ .append(SEMICOLON)
+ .append(newline);
+ }
+ propertyValue = (String) al.getProperty(PROP_DESCRIPTION);
+ if (propertyValue != null)
+ {
+ sb.append(BANG).append(DESCRIPTION).append(newline)
+ .append(propertyValue).append(SEMICOLON)
+ .append(newline);
+ }
/*
* !Format DataType CodeTable
}
/**
- * Helper method to append a property e.g. !Title to the output buffer, if the
- * property is set on the alignment.
- *
- * @param al
- * @param headers
- * @param propertyName
- * @param propertyKeyword
- */
- protected void printProperty(AlignmentI al, StringBuilder headers,
- String propertyName, String propertyKeyword)
- {
- String propertyValue = (String) al.getProperty(propertyName);
- if (propertyValue != null)
- {
- headers.append(BANG).append(propertyKeyword).append(SPACE)
- .append(propertyValue).append(SEMICOLON)
- .append(newline);
- }
- }
-
- /**
* Returns the number of sequence positions output per line
*
* @return