package eu.dnetlib.r2d2.neo4j.events;

import java.util.Date;

import eu.dnetlib.r2d2.neo4j.domain.Relationships;

public class RelationDeleteEvent {

	private String sourceNodeId = null;
	private String targetNodeId = null;
	private Relationships relationship = null;
	private Date eventDate = null;

	public RelationDeleteEvent(String sourceNodeId, String targetNodeId,
			Relationships relationship, Date eventdate) {
		this.sourceNodeId = sourceNodeId;
		this.targetNodeId = targetNodeId;
		this.relationship = relationship;
		this.eventDate = eventdate;
	}

	public String getSourceNodeId() {
		return sourceNodeId;
	}

	public void setSourceNodeId(String sourceNodeId) {
		this.sourceNodeId = sourceNodeId;
	}

	public String getTargetNodeId() {
		return targetNodeId;
	}

	public void setTargetNodeId(String targetNodeId) {
		this.targetNodeId = targetNodeId;
	}

	public Relationships getRelationship() {
		return relationship;
	}

	public void setRelationship(Relationships relationship) {
		this.relationship = relationship;
	}

	public Date getEventDate() {
		return eventDate;
	}

	public void setEventDate(Date eventDate) {
		this.eventDate = eventDate;
	}
	
	public String toString() {
		StringBuilder builder = new StringBuilder();

		builder.append("[").append(eventDate);
		builder.append("] [DELETE RELATION] relation: ").append(relationship);
		builder.append(", sourceId: ").append(sourceNodeId).append(", targetId: ");
		builder.append(targetNodeId);
		
		return builder.toString();
	}
}