edu.upenn.gloDB.parser
Class ParserUtils

java.lang.Object
  extended by edu.upenn.gloDB.parser.ParserUtils

public class ParserUtils
extends java.lang.Object

Methods to process the Operations ArrayList produced by the parser.

Version:
$Id: ParserUtils.java,v 1.46.2.21 2007/03/01 21:17:33 fisher Exp $

Field Summary
static boolean debug
           
static boolean debugSolveAll
           
static boolean debugSolveOps
           
 
Constructor Summary
ParserUtils()
           
 
Method Summary
static Track compute(java.lang.String parse)
          This will parse the input string to create the operations array, then compute the operations and assign the results to the Track indicated.
private static Operation getOperation(Operation operation)
          For Operations that contain groups, this will solve the group and store the resulting TreeSet of Tracks in the Operation.
private static Track negate(Track track)
          This will perform a 'binary' inversion of the Features in the Track.
static Track solveOps(java.util.ArrayList ops)
          This will run solveOpsRecurse() which will recursively solve the Operations in the ArrayList 'ops'.
static Track solveOps(java.util.ArrayList ops, java.lang.String id)
          This will run solveOpsRecurse() which will recursively solve the Operations in the ArrayList 'ops'.
private static Track solveOpsRecurse(java.util.ArrayList ops)
          This will solve the Operations in the ArrayList 'ops', calling itself to recursively resolve groups of Operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

debugSolveAll

public static boolean debugSolveAll

debugSolveOps

public static boolean debugSolveOps
Constructor Detail

ParserUtils

public ParserUtils()
Method Detail

compute

public static Track compute(java.lang.String parse)
This will parse the input string to create the operations array, then compute the operations and assign the results to the Track indicated. If the Track already exists, it will be overwritten.

Notes:
For now, trackPool and sequencePool are used as the Track and Sequence sets. These should be options that the user can set within the parse string. Within the parser they are used to determine if a Track or Sequence object is valid and are used as the set of all Tracks for the "__T" parser option.

solveOps

public static Track solveOps(java.util.ArrayList ops)
This will run solveOpsRecurse() which will recursively solve the Operations in the ArrayList 'ops'. This wrapper will make sure the output Track is added to the trackPool. The temporary Tracks created along the way are not added to the trackPool.


solveOps

public static Track solveOps(java.util.ArrayList ops,
                             java.lang.String id)
This will run solveOpsRecurse() which will recursively solve the Operations in the ArrayList 'ops'. This wrapper will make sure the output Track is added to the trackPool. The temporary Tracks created along the way are not added to the trackPool. The 'id' will be used as the output Track ID.


solveOpsRecurse

private static Track solveOpsRecurse(java.util.ArrayList ops)
This will solve the Operations in the ArrayList 'ops', calling itself to recursively resolve groups of Operations.


getOperation

private static Operation getOperation(Operation operation)
For Operations that contain groups, this will solve the group and store the resulting TreeSet of Tracks in the Operation. This will be called recursively if there are nested groups.


negate

private static Track negate(Track track)
This will perform a 'binary' inversion of the Features in the Track.




Copyright 2012 Stephen Fisher and Junhyong Kim, University of Pennsylvania. All Rights Reserved.