NIHVIVO-2924 Change name of getMostSpecificTypes DAO method to reflect the fact that it filters out types not in a classgroup
This commit is contained in:
parent
8619613fca
commit
a979738004
7 changed files with 8 additions and 8 deletions
|
@ -282,7 +282,7 @@ public class JsonServlet extends VitroHttpServlet {
|
||||||
|
|
||||||
public static Collection<String> getMostSpecificTypes(Individual individual, WebappDaoFactory wdf) {
|
public static Collection<String> getMostSpecificTypes(Individual individual, WebappDaoFactory wdf) {
|
||||||
ObjectPropertyStatementDao opsDao = wdf.getObjectPropertyStatementDao();
|
ObjectPropertyStatementDao opsDao = wdf.getObjectPropertyStatementDao();
|
||||||
Map<String, String> mostSpecificTypes = opsDao.getMostSpecificTypesForIndividual(individual.getURI());
|
Map<String, String> mostSpecificTypes = opsDao.getMostSpecificTypesInClassgroupsForIndividual(individual.getURI());
|
||||||
return mostSpecificTypes.values();
|
return mostSpecificTypes.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,6 @@ public interface ObjectPropertyStatementDao {
|
||||||
|
|
||||||
public List<Map<String, String>> getObjectPropertyStatementsForIndividualByProperty(String subjectUri, String propertyUri, String objectKey, String query, Set<String> constructQueries);
|
public List<Map<String, String>> getObjectPropertyStatementsForIndividualByProperty(String subjectUri, String propertyUri, String objectKey, String query, Set<String> constructQueries);
|
||||||
|
|
||||||
public Map<String, String> getMostSpecificTypesForIndividual(String subjectUri);
|
public Map<String, String> getMostSpecificTypesInClassgroupsForIndividual(String subjectUri);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,8 +132,8 @@ class ObjectPropertyStatementDaoFiltering extends BaseFiltering implements Objec
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getMostSpecificTypesForIndividual(String subjectUri) {
|
public Map<String, String> getMostSpecificTypesInClassgroupsForIndividual(String subjectUri) {
|
||||||
return innerObjectPropertyStatementDao.getMostSpecificTypesForIndividual(subjectUri);
|
return innerObjectPropertyStatementDao.getMostSpecificTypesInClassgroupsForIndividual(subjectUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ public class ObjectPropertyStatementDaoJena extends JenaBaseDao implements Objec
|
||||||
* Finds all mostSpecificTypes of an individual.
|
* Finds all mostSpecificTypes of an individual.
|
||||||
* Returns a list of type labels.
|
* Returns a list of type labels.
|
||||||
* **/
|
* **/
|
||||||
public Map<String, String> getMostSpecificTypesForIndividual(String subjectUri) {
|
public Map<String, String> getMostSpecificTypesInClassgroupsForIndividual(String subjectUri) {
|
||||||
|
|
||||||
String queryString = QueryUtils.subUriForQueryVar(MOST_SPECIFIC_TYPE_QUERY, "subject", subjectUri);
|
String queryString = QueryUtils.subUriForQueryVar(MOST_SPECIFIC_TYPE_QUERY, "subject", subjectUri);
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ public abstract class BaseIndividualTemplateModel extends BaseTemplateModel {
|
||||||
|
|
||||||
public Collection<String> getMostSpecificTypes() {
|
public Collection<String> getMostSpecificTypes() {
|
||||||
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
||||||
Map<String, String> types = opsDao.getMostSpecificTypesForIndividual(getUri());
|
Map<String, String> types = opsDao.getMostSpecificTypesInClassgroupsForIndividual(getUri());
|
||||||
return types.values();
|
return types.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public abstract class BaseListedIndividual extends BaseTemplateModel {
|
||||||
|
|
||||||
public List<String> getMostSpecificTypes() {
|
public List<String> getMostSpecificTypes() {
|
||||||
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
||||||
Map<String, String> types = opsDao.getMostSpecificTypesForIndividual(individual.getURI());
|
Map<String, String> types = opsDao.getMostSpecificTypesInClassgroupsForIndividual(individual.getURI());
|
||||||
List<String> typeLabels = new ArrayList<String>(types.size());
|
List<String> typeLabels = new ArrayList<String>(types.size());
|
||||||
String displayedType = (String) vreq.getAttribute("displayType");
|
String displayedType = (String) vreq.getAttribute("displayType");
|
||||||
for (String type : types.keySet()) {
|
for (String type : types.keySet()) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ public abstract class BaseIndividualSearchResult extends BaseTemplateModel {
|
||||||
|
|
||||||
public Collection<String> getMostSpecificTypes() {
|
public Collection<String> getMostSpecificTypes() {
|
||||||
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
ObjectPropertyStatementDao opsDao = vreq.getWebappDaoFactory().getObjectPropertyStatementDao();
|
||||||
Map<String, String> types = opsDao.getMostSpecificTypesForIndividual(individual.getURI());
|
Map<String, String> types = opsDao.getMostSpecificTypesInClassgroupsForIndividual(individual.getURI());
|
||||||
return types.values();
|
return types.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue