*
* @throws IOException
*/
+ @Override
public void parse() throws IOException
{
String line = nextLine();
return nextLine();
}
+ /*
+ * parse location - which may be over more than one line e.g. EAW51554
+ */
CdsData data = new CdsData();
- data.cdsLocation = tokens[2];
- // TODO location can be over >1 line e.g. EAW51554
+ StringBuilder sb = new StringBuilder().append(tokens[2]);
+ line = parseFeatureQualifier(sb, "CDS");
+ data.cdsLocation = sb.toString();
- line = nextLine();
while (line != null)
{
if (!line.startsWith("FT ")) // 4 spaces
String qualifier = line.substring(slashPos + 1, eqPos);
String value = line.substring(eqPos + 1);
value = removeQuotes(value);
- StringBuilder sb = new StringBuilder().append(value);
+ sb = new StringBuilder().append(value);
line = parseFeatureQualifier(sb, qualifier);
String featureValue = sb.toString();
*/
static String removeQuotes(String value)
{
- if (value == null)
+ if (value == null)
{
return null;
}
* heuristic rule: most multi-line value (e.g. /product) are text,
* so add a space for word boundary at a new line; not for translation
*/
- if (!"translation".equals(qualifierName))
+ if (!"translation".equals(qualifierName)
+ && !"CDS".equals(qualifierName))
{
sb.append(" ");
}