001package org.biopax.paxtools.query.algorithm; 002 003/** 004 * Direction is used for specifying upstream, downstream or both. Neighborhood and CommonStream 005 * queries use this enum as parameter. 006 * 007 * The difference between BOTHSTREAM and UNDIRECTED: Both-stream means that the linking paths can be 008 * either towards upstream or downstream. A linking path will always be directed towards one 009 * direction, i.e. the directions of its relations will be consistent. Undirected means the 010 * directions are not considered at all, so a linking path can contain relations towards different 011 * directions. 012 * 013 * @author Ozgun Babur 014 */ 015public enum Direction 016{ 017 UPSTREAM("Search direction backwards in the order of events"), 018 DOWNSTREAM("Search direction forward in the order of events"), 019 BOTHSTREAM("Search towards both directions"), 020 UNDIRECTED("Search without considering directions"); 021 022 /** 023 * Description of the direction. 024 */ 025 private final String description; 026 027 /** 028 * Constructor with description. 029 * @param description Description 030 */ 031 private Direction(String description) 032 { 033 this.description = description; 034 } 035 036 /** 037 * Gets the description. 038 * @return description 039 */ 040 public String getDescription() 041 { 042 return description; 043 } 044}