org.intermine.web.logic.pathqueryresult
Class PathQueryResultHelper

java.lang.Object
  extended by org.intermine.web.logic.pathqueryresult.PathQueryResultHelper

public final class PathQueryResultHelper
extends java.lang.Object

Helper for everything related to PathQueryResults


Method Summary
static java.util.List<java.lang.String> getDefaultViewForClass(java.lang.String type, Model model, WebConfig webConfig, java.lang.String prefix)
          Return a list of string paths that are defined as WebConfig to be shown in results.
static PathQuery getQueryWithDefaultView(java.lang.String type, Model model, WebConfig webConfig, java.lang.String prefix)
           
static PathQuery makePathQueryForBag(InterMineBag imBag, WebConfig webConfig, Model model)
          Create a PathQuery to get the contents of an InterMineBag
static PathQuery makePathQueryForCollection(WebConfig webConfig, ObjectStore os, InterMineObject object, java.lang.String referencedClassName, java.lang.String field)
          Create a PathQuery to get results for a collection of items from an InterMineObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultViewForClass

public static java.util.List<java.lang.String> getDefaultViewForClass(java.lang.String type,
                                                                      Model model,
                                                                      WebConfig webConfig,
                                                                      java.lang.String prefix)
Return a list of string paths that are defined as WebConfig to be shown in results. This will include only attributes of the given class and not follow references. Optionally provide a prefix to for creating a view for references/collections.

Parameters:
type - the class name to create a view for
model - the model
webConfig - we configuration
prefix - a path to prefix the class
Returns:
the configured view paths for the class

getQueryWithDefaultView

public static PathQuery getQueryWithDefaultView(java.lang.String type,
                                                Model model,
                                                WebConfig webConfig,
                                                java.lang.String prefix)

makePathQueryForBag

public static PathQuery makePathQueryForBag(InterMineBag imBag,
                                            WebConfig webConfig,
                                            Model model)
Create a PathQuery to get the contents of an InterMineBag

Parameters:
imBag - the bag
webConfig - the WebConfig
model - the Model
Returns:
a PathQuery

makePathQueryForCollection

public static PathQuery makePathQueryForCollection(WebConfig webConfig,
                                                   ObjectStore os,
                                                   InterMineObject object,
                                                   java.lang.String referencedClassName,
                                                   java.lang.String field)
Create a PathQuery to get results for a collection of items from an InterMineObject

Parameters:
webConfig - the WebConfig
os - the production ObjectStore
object - the InterMineObject
referencedClassName - the collection type
field - the name of the field for the collection in the InterMineObject
Returns:
a PathQuery