All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.omx.das.impl.MolgenisDasTarget Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version
package org.molgenis.omx.das.impl;

import uk.ac.ebi.mydas.exceptions.DataSourceException;
import uk.ac.ebi.mydas.model.DasTarget;

public class MolgenisDasTarget extends DasTarget
{
	//class used to override  the equals method so it can be used in unittests
	private static final long serialVersionUID = 1L;

	public MolgenisDasTarget(String targetId, int startCoordinate, int stopCoordinate, String targetName)
			throws DataSourceException
	{
		super(targetId, startCoordinate, stopCoordinate, targetName);
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		MolgenisDasTarget other = (MolgenisDasTarget) obj;
		if (getStartCoordinate() != other.getStartCoordinate()) return false;
		if (getStopCoordinate() != other.getStopCoordinate()) return false;
		if (getTargetId() == null)
		{
			if (other.getTargetId() != null) return false;
		}
		else if (!getTargetId().equals(other.getTargetId())) return false;
		if (getTargetId() == null)
		{
			if (other.getTargetId() != null) return false;
		}
		else if (!getTargetName().equals(other.getTargetName())) return false;
		return true;
	}

	public String getTargetId()
	{
		return super.getTargetId();
	}


	public int getStartCoordinate()
	{
		return super.getStartCoordinate();
	}


	public int getStopCoordinate()
	{
		return super.getStopCoordinate();
	}


	public String getTargetName()
	{
		return super.getTargetName();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy