Class ModelBrowserHelper
- java.lang.Object
-
- org.intermine.web.logic.querybuilder.ModelBrowserHelper
-
public final class ModelBrowserHelper extends java.lang.Object
Static class holding methods for managing the model browser in the query builder.- Author:
- Matthew Wakeling, Richard Smith
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ModelBrowserHelper.NodeBuilder
An object that will descend through the model and build a tree of metadata nodes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<MetadataNode>
makeNodes(java.lang.String path, Model model, boolean isSuperUser, PathQuery query, WebConfig webConfig, java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys, BagManager bagManager, Profile profile, ObjectStoreSummary oss)
Given a path, render a set of metadata Nodes to the relevant depthstatic java.util.Collection<MetadataNode>
makeSelectedNodes(java.lang.String stringPath, java.lang.String prefix, Model model, boolean isSuperUser, PathQuery query, WebConfig webConfig, java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys, BagManager bagManager, Profile profile, ObjectStoreSummary oss)
Finds the collection of MetadataNode objects that the model browser needs to display.
-
-
-
Method Detail
-
makeSelectedNodes
public static java.util.Collection<MetadataNode> makeSelectedNodes(java.lang.String stringPath, java.lang.String prefix, Model model, boolean isSuperUser, PathQuery query, WebConfig webConfig, java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys, BagManager bagManager, Profile profile, ObjectStoreSummary oss) throws PathException
Finds the collection of MetadataNode objects that the model browser needs to display.- Parameters:
stringPath
- a deeper path in the query that must be added to the nodesprefix
- the root class of the query, even if the query is emptymodel
- a ModelisSuperUser
- true if the current user is a superuserquery
- a PathQuerywebConfig
- a WebConfig objectclassKeys
- a Map of class keys, for working out if a path has anybagManager
- a BagManager object, for working out if it is possible to constrain by bagprofile
- the profile of the current user, for fetching bags from the BagManageross
- to determine which collections/references/attributes are empty- Returns:
- a Collection of MetadataNode objects
- Throws:
PathException
- if the query is not valid
-
makeNodes
public static java.util.Collection<MetadataNode> makeNodes(java.lang.String path, Model model, boolean isSuperUser, PathQuery query, WebConfig webConfig, java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys, BagManager bagManager, Profile profile, ObjectStoreSummary oss) throws PathException
Given a path, render a set of metadata Nodes to the relevant depth- Parameters:
path
- of form Gene.organism.namemodel
- the model used to resolve class namesisSuperUser
- true if the user is the superuserwebConfig
- the web configuration.query
- a PathQuery, for working out possible loopsclassKeys
- a Map of class keys, for working out if a path has anybagManager
- a BagManager object, for working out if it is possible to constrain by bagprofile
- the profile of the current user, for fetching bags from the BagManageross
- to determine which nodes are null- Returns:
- an ordered Set of nodes
- Throws:
PathException
- if the query is invalid.
-
-