public class DataGetterUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_GETTERS_FOR_PAGE
Attribute name in request for DataGetters
|
| Constructor and Description |
|---|
DataGetterUtils() |
| Modifier and Type | Method and Description |
|---|---|
static JSONObject |
covertDataToJSONForPage(VitroRequest vreq,
String pageUri,
com.hp.hpl.jena.rdf.model.Model displayModel)
Convert data to JSON for page uri based on type and related datagetters
TODO: How to handle different data getters? Will this replace json fields or add to them?
|
static DataGetter |
dataGetterForURI(VitroRequest vreq,
com.hp.hpl.jena.rdf.model.Model displayModel,
String dataGetterURI)
Returns a DataGetter using information in the
displayModel for the individual with the URI given by dataGetterURI
to configure it.
|
static String |
generateDataGetterTypeURI(String dataGetterClassName) |
static void |
getClassGroupForDataGetter(javax.servlet.http.HttpServletRequest req,
Map<String,Object> pageData,
Map<String,Object> templateData) |
static String |
getClassGroupForDataGetter(com.hp.hpl.jena.rdf.model.Model displayModel,
String dataGetterURI) |
static List<HashMap<String,String>> |
getClassGroups(javax.servlet.http.HttpServletRequest req) |
static String |
getClassNameFromUri(String dataGetterClassUri)
For the page, get the actual Data Getters to be employed.
|
static List<DataGetter> |
getDataGettersForClass(VitroRequest vreq,
com.hp.hpl.jena.rdf.model.Model displayModel,
String classURI)
Get a list of DataGetter objects that are associated with a Vitro VClass.
|
static List<DataGetter> |
getDataGettersForPage(VitroRequest vreq,
com.hp.hpl.jena.rdf.model.Model displayModel,
String pageURI)
Get a list of DataGetter objects that are associated with a page.
|
static List<DataGetter> |
getDataGettersForTemplate(VitroRequest vreq,
com.hp.hpl.jena.rdf.model.Model displayModel,
String templateName)
Get a list of DataGetter objects that are associated with a Freemarker template.
|
static String |
getJClassForDataGetterURI(com.hp.hpl.jena.rdf.model.Model displayModel,
String dataGetterURI) |
protected static String |
nodeToString(com.hp.hpl.jena.rdf.model.RDFNode node) |
static JSONObject |
processVClassGroupJSON(VClassGroup vcg) |
public static final String DATA_GETTERS_FOR_PAGE
public static List<DataGetter> getDataGettersForPage(VitroRequest vreq, com.hp.hpl.jena.rdf.model.Model displayModel, String pageURI) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, SecurityException, InvocationTargetException
public static List<DataGetter> getDataGettersForClass(VitroRequest vreq, com.hp.hpl.jena.rdf.model.Model displayModel, String classURI) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, SecurityException, InvocationTargetException
public static List<DataGetter> getDataGettersForTemplate(VitroRequest vreq, com.hp.hpl.jena.rdf.model.Model displayModel, String templateName) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, SecurityException, InvocationTargetException
templateName - a filename like "index.ftl", which will be used as a URI like "freemarker:index.ftl".InstantiationExceptionIllegalAccessExceptionClassNotFoundExceptionIllegalArgumentExceptionSecurityExceptionInvocationTargetExceptionpublic static DataGetter dataGetterForURI(VitroRequest vreq, com.hp.hpl.jena.rdf.model.Model displayModel, String dataGetterURI) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, SecurityException
public static String getJClassForDataGetterURI(com.hp.hpl.jena.rdf.model.Model displayModel, String dataGetterURI) throws IllegalAccessException
IllegalAccessExceptionprotected static String nodeToString(com.hp.hpl.jena.rdf.model.RDFNode node)
public static String generateDataGetterTypeURI(String dataGetterClassName)
public static final String getClassGroupForDataGetter(com.hp.hpl.jena.rdf.model.Model displayModel, String dataGetterURI)
public static JSONObject covertDataToJSONForPage(VitroRequest vreq, String pageUri, com.hp.hpl.jena.rdf.model.Model displayModel) throws InstantiationException, IllegalAccessException, ClassNotFoundException
public static String getClassNameFromUri(String dataGetterClassUri)
public static JSONObject processVClassGroupJSON(VClassGroup vcg)
public static List<HashMap<String,String>> getClassGroups(javax.servlet.http.HttpServletRequest req)
Copyright © 2016. All rights reserved.