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:
ryounes 2011-07-15 15:26:11 +00:00
parent 8619613fca
commit a979738004
7 changed files with 8 additions and 8 deletions

View file

@ -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();
} }

View file

@ -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);
} }

View file

@ -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);
} }

View file

@ -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);

View file

@ -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();
} }

View file

@ -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()) {

View file

@ -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();
} }