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
|
@ -26,9 +26,15 @@ OPTIONAL ELEMENTS
|
||||||
THE QUERY
|
THE QUERY
|
||||||
---------
|
---------
|
||||||
|
|
||||||
--------------------------
|
-----------------
|
||||||
General query requirements
|
Construct queries
|
||||||
--------------------------
|
-----------------
|
||||||
|
|
||||||
|
- forthcoming -
|
||||||
|
|
||||||
|
---------------------------------
|
||||||
|
General select query requirements
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
- Use a SELECT DISTINCT clause rather than a simple SELECT. There can still be cases where
|
- Use a SELECT DISTINCT clause rather than a simple SELECT. There can still be cases where
|
||||||
the same individual is retrieved more than once, if there are multiple solutions to the
|
the same individual is retrieved more than once, if there are multiple solutions to the
|
||||||
|
@ -47,10 +53,6 @@ due to the possibility of incomplete data. Make sure the query does the followin
|
||||||
display the local name in the absence of the linked individual. Alternatively, this can be
|
display the local name in the absence of the linked individual. Alternatively, this can be
|
||||||
retrieved in the template using the localname(uri) method.
|
retrieved in the template using the localname(uri) method.
|
||||||
|
|
||||||
### TO BE AMENDED - use uniongraph instead
|
|
||||||
- Each assertion or set of optional assertions must reference a different graph variable, so that
|
|
||||||
no requirement about which assertions are in the same graph is imposed (unless this is desired
|
|
||||||
in a specific case).
|
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
Query for collated property
|
Query for collated property
|
||||||
|
|
|
@ -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)
|
* 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).
|
* will be moved into the display modules (Editing and Display Configuration Improvements).
|
||||||
*/
|
*/
|
||||||
protected void addMoniker(Map<String, String> map, String monikerKey, String objectKey) {
|
// rjy7 Now Individual.getMoniker() returns only the moniker, not the VClass, so no reason to call the method
|
||||||
String moniker = map.get(monikerKey);
|
// if the sparql query returns a null moniker.
|
||||||
if (moniker == null) {
|
// protected void addMoniker(Map<String, String> map, String monikerKey, String objectKey) {
|
||||||
map.put(monikerKey, getIndividual(map.get(objectKey)).getMoniker());
|
// 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) {
|
protected Individual getIndividual(String uri) {
|
||||||
return wdf.getIndividualDao().getIndividualByURI(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 Log log = LogFactory.getLog(DefaultListViewDataPostProcessor.class);
|
||||||
|
|
||||||
private static final String KEY_NAME = "name";
|
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";
|
private static final String KEY_OBJECT = "object";
|
||||||
|
|
||||||
public DefaultListViewDataPostProcessor(ObjectPropertyTemplateModel optm, WebappDaoFactory wdf) {
|
public DefaultListViewDataPostProcessor(ObjectPropertyTemplateModel optm, WebappDaoFactory wdf) {
|
||||||
|
@ -27,7 +27,7 @@ public class DefaultListViewDataPostProcessor extends
|
||||||
/* Apply processing specific to this postprocessor */
|
/* Apply processing specific to this postprocessor */
|
||||||
protected void process(Map<String, String> map) {
|
protected void process(Map<String, String> map) {
|
||||||
addName(map, KEY_NAME, KEY_OBJECT);
|
addName(map, KEY_NAME, KEY_OBJECT);
|
||||||
addMoniker(map, KEY_MONIKER, KEY_OBJECT);
|
// addMoniker(map, KEY_MONIKER, KEY_OBJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue