NIHVIVO-2466 Order data property statements by value. Ensures a consistent ordering, and that the correct (in most cases) label is chosen in case of multiple labels.
This commit is contained in:
parent
845283e4e8
commit
ca1518a5f4
2 changed files with 2 additions and 5 deletions
|
@ -62,7 +62,6 @@ public class IndividualListController extends FreemarkerHttpServlet {
|
||||||
String templateName = TEMPLATE_DEFAULT;
|
String templateName = TEMPLATE_DEFAULT;
|
||||||
Map<String, Object> body = new HashMap<String, Object>();
|
Map<String, Object> body = new HashMap<String, Object>();
|
||||||
String errorMessage = null;
|
String errorMessage = null;
|
||||||
String message = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object obj = vreq.getAttribute("vclass");
|
Object obj = vreq.getAttribute("vclass");
|
||||||
|
@ -138,8 +137,6 @@ public class IndividualListController extends FreemarkerHttpServlet {
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
templateName = Template.ERROR_MESSAGE.toString();
|
templateName = Template.ERROR_MESSAGE.toString();
|
||||||
body.put("errorMessage", errorMessage);
|
body.put("errorMessage", errorMessage);
|
||||||
} else if (message != null) {
|
|
||||||
body.put("message", message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TemplateResponseValues(templateName, body);
|
return new TemplateResponseValues(templateName, body);
|
||||||
|
|
|
@ -301,7 +301,7 @@ public class DataPropertyStatementDaoJena extends JenaBaseDao implements DataPro
|
||||||
" ?subject ?property ?value . \n" +
|
" ?subject ?property ?value . \n" +
|
||||||
// ignore statements with uri values
|
// ignore statements with uri values
|
||||||
" FILTER ( isLiteral(?value) ) " +
|
" FILTER ( isLiteral(?value) ) " +
|
||||||
"} ";
|
"} ORDER BY ?value";
|
||||||
|
|
||||||
protected static Query dataPropertyValueQuery;
|
protected static Query dataPropertyValueQuery;
|
||||||
static {
|
static {
|
||||||
|
|
Loading…
Add table
Reference in a new issue