NIHVIVO-1336 Finished custom list view for core:educationalTraining property
This commit is contained in:
parent
f170c94a68
commit
8c0124819c
8 changed files with 51 additions and 10 deletions
|
@ -37,6 +37,13 @@ public class TestController extends FreemarkerHttpServlet {
|
|||
|
||||
body.put("title", "Freemarker Test");
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = cal.getTime();
|
||||
body.put("now", now);
|
||||
// In template: ${now?date}, ${now?datetime}, ${now?time}
|
||||
|
||||
body.put("datetime", "1983-12-07T17:15:28Z");
|
||||
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.hp.hpl.jena.query.QueryExecution;
|
||||
import com.hp.hpl.jena.query.QuerySolution;
|
||||
import com.hp.hpl.jena.query.ResultSet;
|
||||
|
@ -21,7 +24,9 @@ import com.hp.hpl.jena.rdf.model.Resource;
|
|||
*/
|
||||
|
||||
public class QueryUtils {
|
||||
|
||||
|
||||
private static final Log log = LogFactory.getLog(QueryUtils.class);
|
||||
|
||||
protected static Map<String,Object> querySolutionToObjectValueMap( QuerySolution soln){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
Iterator<String> varNames = soln.varNames();
|
||||
|
|
|
@ -86,11 +86,13 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
private static final String NODE_NAME_TEMPLATE = "template";
|
||||
private static final String NODE_NAME_COLLATION_TARGET = "collation-target";
|
||||
private static final String NODE_NAME_POSTPROCESSOR = "postprocessor";
|
||||
private static final String NODE_NAME_EDIT_OBJECT = "edit-object";
|
||||
|
||||
private String queryString;
|
||||
private String templateName;
|
||||
private String collationTarget;
|
||||
private String postprocessor;
|
||||
private String editObject;
|
||||
|
||||
PropertyListConfig(ObjectProperty op, WebappDaoFactory wdf) throws Exception {
|
||||
|
||||
|
@ -121,6 +123,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
// Optional values
|
||||
collationTarget = getConfigValue(doc, NODE_NAME_COLLATION_TARGET);
|
||||
postprocessor = getConfigValue(doc, NODE_NAME_POSTPROCESSOR);
|
||||
editObject = getConfigValue(doc, NODE_NAME_EDIT_OBJECT);
|
||||
} catch (Exception e) {
|
||||
log.error("Error processing config file " + configFilePath + " for object property " + op.getURI(), e);
|
||||
// What should we do here?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue