NIHVIVO-2012 Remove call to BaseObjectPropertyDataPostProcessor.getMoniker() because now it only returns the moniker, not the vclass, so provides no additional data over the sparql query (see NIHVIVO-2001).
This commit is contained in:
parent
66163d24c2
commit
38c6b4310c
3 changed files with 22 additions and 15 deletions
|
@ -70,12 +70,17 @@ public abstract class BaseObjectPropertyDataPostProcessor implements
|
|||
* properties) will be removed. In addition, this type of logic (display x if it exists, otherwise y)
|
||||
* will be moved into the display modules (Editing and Display Configuration Improvements).
|
||||
*/
|
||||
protected void addMoniker(Map<String, String> map, String monikerKey, String objectKey) {
|
||||
String moniker = map.get(monikerKey);
|
||||
if (moniker == null) {
|
||||
map.put(monikerKey, getIndividual(map.get(objectKey)).getMoniker());
|
||||
}
|
||||
}
|
||||
// rjy7 Now Individual.getMoniker() returns only the moniker, not the VClass, so no reason to call the method
|
||||
// if the sparql query returns a null moniker.
|
||||
// protected void addMoniker(Map<String, String> map, String monikerKey, String objectKey) {
|
||||
// String moniker = map.get(monikerKey);
|
||||
// if (moniker == null) {
|
||||
// Individual ind = getIndividual(map.get(objectKey));
|
||||
// if (ind != null) {
|
||||
// map.put(monikerKey, ind.getMoniker());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
protected Individual getIndividual(String uri) {
|
||||
return wdf.getIndividualDao().getIndividualByURI(uri);
|
||||
|
|
|
@ -16,7 +16,7 @@ public class DefaultListViewDataPostProcessor extends
|
|||
private static final Log log = LogFactory.getLog(DefaultListViewDataPostProcessor.class);
|
||||
|
||||
private static final String KEY_NAME = "name";
|
||||
private static final String KEY_MONIKER = "moniker";
|
||||
// private static final String KEY_MONIKER = "moniker";
|
||||
private static final String KEY_OBJECT = "object";
|
||||
|
||||
public DefaultListViewDataPostProcessor(ObjectPropertyTemplateModel optm, WebappDaoFactory wdf) {
|
||||
|
@ -27,7 +27,7 @@ public class DefaultListViewDataPostProcessor extends
|
|||
/* Apply processing specific to this postprocessor */
|
||||
protected void process(Map<String, String> map) {
|
||||
addName(map, KEY_NAME, KEY_OBJECT);
|
||||
addMoniker(map, KEY_MONIKER, KEY_OBJECT);
|
||||
// addMoniker(map, KEY_MONIKER, KEY_OBJECT);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue