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

org.molgenis.pathways.model.Pathway Maven / Gradle / Ivy

There is a newer version: 5.2.2
Show newest version
package org.molgenis.pathways.model;

import com.google.auto.value.AutoValue;
import org.molgenis.wikipathways.client.WSPathwayInfo;
import org.molgenis.wikipathways.client.WSSearchResult;

/**
 * Name and ID of a Pathway
 */
@AutoValue
public abstract class Pathway
{
	public abstract String getId();

	public abstract String getName();

	public static Pathway create(String id, String name)
	{
		return new AutoValue_Pathway(id, name + " (" + id + ")");
	}

	public static Pathway create(WSPathwayInfo p)
	{
		return Pathway.create(p.getId(), p.getName());
	}

	public static Pathway create(WSSearchResult p)
	{
		return Pathway.create(p.getId(), p.getName());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy