package eu.dnetlib.contract.cp;

import eu.dnetlib.contract.event.IContractEvent;
import eu.dnetlib.contract.node.EvaluationResult;

/**
 * Dummy check point can be used to all kinds of events.
 * It was introduced to support ommiting events without 
 * checking any requirements.
 * @author mhorst
 *
 */
public class DummyCheckPoint extends AbstractCheckPoint 
	implements ICheckPoint<IContractEvent>{

	/* (non-Javadoc)
	 * @see eu.dnetlib.contract.cp.AbstractCheckPoint#check(eu.dnetlib.contract.event.IContractEvent)
	 */
	@Override
	public EvaluationResult check(IContractEvent context)
			throws CheckPointEvaluationException {
		return super.check(context);
	}

	/* (non-Javadoc)
	 * @see eu.dnetlib.contract.cp.AbstractCheckPoint#identify()
	 */
	@Override
	public String identify() {
		StringBuffer strBuff = new StringBuffer("class: " + this.getClass().getName());
		String superIdentify = super.identify();
		if (superIdentify!=null && superIdentify.length()>0) {
			strBuff.append(ICheckPoint.IDENTIFY_DELIMITER);
			strBuff.append(superIdentify);
		}
		return strBuff.toString();
	}

	/* (non-Javadoc)
	 * @see eu.dnetlib.contract.cp.ICheckPoint#getSupportedEventClass()
	 */
	public Class<? extends IContractEvent> getSupportedEventClass() {
		return IContractEvent.class;
	}

}
