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

org.biopax.paxtools.query.model.Node Maven / Gradle / Ivy

Go to download

BioPAX graph-theoretic querying - for finding paths between molecules, or identifying molecules that are reachable through specific paths, using the BioPAX pathway data model.

There is a newer version: 6.0.0
Show newest version
package org.biopax.paxtools.query.model;

import java.util.Collection;

/**
 * Node interface to use in graph algorithms.
 *
 * @author Ozgun Babur
 */
public interface Node extends GraphObject
{
	/**
	 * @return Upstream edges
	 */
	Collection getUpstream();

	/**
	 * @return Downstream edges
	 */
	Collection getDownstream();

	/**
	 * This method is critical when the algorithm needs to calculate a path length. A graph may
	 * contain nodes that will not add to the path length. Such nodes are not breadth node. So the
	 * length of the path is the number of breadth nodes - 1.
	 *
	 * @return Whether this is a breadth node
	 */
	boolean isBreadthNode();

	/**
	 * @return Parent equivalent nodes
	 */
	Collection getUpperEquivalent();

	/**
	 * @return Child equivalent nodes
	 */
	Collection getLowerEquivalent();

	/**
	 * Some nodes can have a sign (typically non-breadth nodes).
	 * @return Sign of the node
	 */
	int getSign();

	/**
	 * In biological graphs, some nodes are used ubiquitously like ATP, H2O, etc. While traversing a
	 * graph we do not want these molecules to link two reactions. So they should be labeled.
	 * @return Whether this note is a ubiquitous node.
	 */
	boolean isUbique();

	/**
	 * A node may be related to a transcription and an algorithm can depend on this information.
	 * @return Whether this node is related to a transcription event
	 */
	boolean isTranscription();

	/**
	 * Initializes the node.
	 */
	void init();

	/**
	 * Positive sign. This is not an Enum because we want to be able calculate sign of a path by
	 * multiplying signs of path elements.
	 */
	public static final int POSITIVE = 1;

	/**
	 * Negative sign. This is not an Enum because we want to be able calculate sign of a path by
	 * multiplying signs of path elements.
	 */
	public static final int NEGATIVE = -1;

	/**
	 * Neutral sign. This is not an Enum because we want to be able calculate sign of a path by
	 * multiplying signs of path elements.
	 */
	public static final int NEUTRAL = 0;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy