VIVO-870 Create IndividualDao.getAllIndividualUris()
This replaces IndividualDao.getAllOfThisTypeIterator(). It returns the list that was created instead of the iterator. This would require a change to ObjectSourceIFace, but we get rid of it instead. Nobody was using it.
This commit is contained in:
parent
99c03ce49a
commit
0602406c53
6 changed files with 12 additions and 27 deletions
|
@ -10,9 +10,8 @@ import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.EditLiteral;
|
||||
import edu.cornell.mannlib.vitro.webapp.search.beans.ObjectSourceIface;
|
||||
|
||||
public interface IndividualDao extends ObjectSourceIface {
|
||||
public interface IndividualDao {
|
||||
|
||||
/**
|
||||
* Returns a collection of DataPropertyStatements involving all the external ID literals for a given Individual.
|
||||
|
@ -85,9 +84,9 @@ public interface IndividualDao extends ObjectSourceIface {
|
|||
public abstract Individual getIndividualByURI(String individualURI);
|
||||
|
||||
/**
|
||||
* Returns an Iterator over all Individuals in the model that are user-viewable.
|
||||
* Returns a collection of all Individuals in the model that are user-viewable.
|
||||
*/
|
||||
public abstract Iterator<String> getAllOfThisTypeIterator();
|
||||
public abstract Collection<String> getAllIndividualUris();
|
||||
|
||||
/**
|
||||
* Returns an Iterator over all Individuals in the model that are user-viewable and have been updated since the specified time.
|
||||
|
|
|
@ -120,8 +120,8 @@ class IndividualDaoFiltering extends BaseFiltering implements IndividualDao{
|
|||
|
||||
/* ******************* unfiltered methods ****************** */
|
||||
|
||||
public Iterator<String> getAllOfThisTypeIterator() {
|
||||
return innerIndividualDao.getAllOfThisTypeIterator();
|
||||
public Collection<String> getAllIndividualUris() {
|
||||
return innerIndividualDao.getAllIndividualUris();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -603,7 +603,7 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao {
|
|||
return inds;
|
||||
}
|
||||
|
||||
public Iterator<String> getAllOfThisTypeIterator() {
|
||||
public Collection<String> getAllIndividualUris() {
|
||||
//this is implemented in IndivdiualSDB
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.dao.jena;
|
|||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
@ -437,9 +438,8 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Iterator<String> getAllOfThisTypeIterator() {
|
||||
final List<String> list =
|
||||
new LinkedList<String>();
|
||||
public Collection<String> getAllIndividualUris() {
|
||||
final List<String> list = new LinkedList<String>();
|
||||
|
||||
// get all labeled resources from any non-tbox and non-metadata graphs,
|
||||
// as well as the unnamed graph (first pattern below)
|
||||
|
@ -472,8 +472,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
w.close();
|
||||
}
|
||||
|
||||
return list.iterator();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private Iterator<Individual> getIndividualIterator(
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.search.beans;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public interface ObjectSourceIface {
|
||||
|
||||
Iterator<String> getAllOfThisTypeIterator();
|
||||
|
||||
Iterator<String> getUpdatedSinceIterator(long msSinceEpoc);
|
||||
|
||||
}
|
|
@ -130,9 +130,9 @@ public class IndividualDaoStub implements IndividualDao {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Iterator<String> getAllOfThisTypeIterator() {
|
||||
public Collection<String> getAllIndividualUris() {
|
||||
throw new RuntimeException(
|
||||
"IndividualDaoStub.getAllOfThisTypeIterator() not implemented.");
|
||||
"IndividualDaoStub.getAllIndividualUris() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue