Package org.intermine.pathquery
Class JSONQueryHandler
- java.lang.Object
-
- org.intermine.pathquery.JSONQueryHandler
-
public final class JSONQueryHandler extends java.lang.Object
Handle parsing JSON queries and template queries- Author:
- Julie Sullivan
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PathQuery
parse(Model model, java.lang.String jsonQueryString)
Parse PathQuery from JSONstatic PathQuery
parse(TemplateQuery templateQuery, Model model, java.lang.String jsonQueryString)
Parse PathQuery from JSON.
-
-
-
Method Detail
-
parse
public static PathQuery parse(Model model, java.lang.String jsonQueryString) throws org.json.JSONException
Parse PathQuery from JSON- Parameters:
model
- the data modeljsonQueryString
- the query in JSON format- Returns:
- a Map from query name to PathQuery
- Throws:
org.json.JSONException
- if poorly formatted JSON
-
parse
public static PathQuery parse(TemplateQuery templateQuery, Model model, java.lang.String jsonQueryString) throws org.json.JSONException
Parse PathQuery from JSON. Handles template constraints too.- Parameters:
model
- the data modeljsonQueryString
- the query in JSON formattemplateQuery
- template associate with query. may be null.- Returns:
- a Map from query name to PathQuery
- Throws:
org.json.JSONException
- if poorly formatted JSON
-
-