package org.kew.shs.dedupl.transformers;

import org.apache.commons.lang.StringUtils;

/**
 * This transformer translates author strings in the form "(Author1) Author2" to "Author1"
 * @author nn00kg
 *
 */
public class StripPublishingAuthorTransformer implements Transformer{

	public String transform(String s) {
		String transformed = s;
		if (StringUtils.isNotBlank(s) && ((s.indexOf("(") != -1) && s.indexOf(")") != -1))
			transformed = s.substring(s.indexOf("(")+1,s.indexOf(")"));
		return transformed;
	}
	
	public static void main(String[] args) {
		StripPublishingAuthorTransformer t  = new StripPublishingAuthorTransformer(); 
		System.out.println(t.transform("(Author1) Author 2"));
	}
	
}

package org.kew.shs.dedupl.transformers;

import org.apache.commons.lang.StringUtils;

/**
 * This transformer translates author strings in the form "(Author1) Author2" to "Author1"
 * @author nn00kg
 *
 */
public class StripPublishingAuthorTransformer implements Transformer{

	public String transform(String s) {
		String transformed = s;
		if (StringUtils.isNotBlank(s) && ((s.indexOf("(") != -1) && s.indexOf(")") != -1))
			transformed = s.substring(s.indexOf("(")+1,s.indexOf(")"));
		else
			transformed = "";
		return transformed;
	}
	
	public static void main(String[] args) {
		StripPublishingAuthorTransformer t  = new StripPublishingAuthorTransformer(); 
		System.out.println(t.transform("(Author1) Author 2"));
		System.out.println(t.transform("Author3"));
		System.out.println(t.transform("(Author4)"));
	}
	
}

Add delimited output file and new AuthorAbbreviatedMatcher
Add delimited output file and new AuthorAbbreviatedMatcher

Updated luceneUtils.java and lucenematcher.java to output a new delimited file
than can be imported direct into a db. Also added new Matchers called
AuthorAbbreviatedMatcher.java, EmptyStringMatch.java. Also added a config
and properties file to read data from the T:drive
