remove compiler warnings; use new-style "for" loop.
This commit is contained in:
parent
ce6058b3bb
commit
1943040e7d
1 changed files with 4 additions and 8 deletions
|
@ -4,7 +4,6 @@ package edu.cornell.mannlib.vitro.webapp.controller.edit;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -62,13 +61,12 @@ public class RestrictionRetryController extends BaseEditController {
|
||||||
// default to object property restriction
|
// default to object property restriction
|
||||||
boolean propertyType = ("data".equals(request.getParameter("propertyType"))) ? DATA : OBJECT ;
|
boolean propertyType = ("data".equals(request.getParameter("propertyType"))) ? DATA : OBJECT ;
|
||||||
|
|
||||||
List<Property> pList = (propertyType == OBJECT)
|
List<? extends Property> pList = (propertyType == OBJECT)
|
||||||
? request.getFullWebappDaoFactory().getObjectPropertyDao().getAllObjectProperties()
|
? request.getFullWebappDaoFactory().getObjectPropertyDao().getAllObjectProperties()
|
||||||
: request.getFullWebappDaoFactory().getDataPropertyDao().getAllDataProperties();
|
: request.getFullWebappDaoFactory().getDataPropertyDao().getAllDataProperties();
|
||||||
List<Option> onPropertyList = new LinkedList<Option>();
|
List<Option> onPropertyList = new LinkedList<Option>();
|
||||||
Collections.sort(pList, new PropSorter());
|
Collections.sort(pList, new PropSorter());
|
||||||
for (Iterator<Property> i = pList.iterator(); i.hasNext(); ) {
|
for (Property p: pList) {
|
||||||
Property p = i.next();
|
|
||||||
onPropertyList.add( new Option(p.getURI(),p.getLocalNameWithPrefix()) );
|
onPropertyList.add( new Option(p.getURI(),p.getLocalNameWithPrefix()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,8 +121,7 @@ public class RestrictionRetryController extends BaseEditController {
|
||||||
private List<Option> getValueClassOptionList(VitroRequest request) {
|
private List<Option> getValueClassOptionList(VitroRequest request) {
|
||||||
List<Option> valueClassOptionList = new LinkedList<Option>();
|
List<Option> valueClassOptionList = new LinkedList<Option>();
|
||||||
VClassDao vcDao = request.getFullWebappDaoFactory().getVClassDao();
|
VClassDao vcDao = request.getFullWebappDaoFactory().getVClassDao();
|
||||||
for (Iterator i = vcDao.getAllVclasses().iterator(); i.hasNext(); ) {
|
for (VClass vc: vcDao.getAllVclasses()) {
|
||||||
VClass vc = (VClass) i.next();
|
|
||||||
valueClassOptionList.add(new Option(vc.getURI(), vc.getLocalNameWithPrefix()));
|
valueClassOptionList.add(new Option(vc.getURI(), vc.getLocalNameWithPrefix()));
|
||||||
}
|
}
|
||||||
return valueClassOptionList;
|
return valueClassOptionList;
|
||||||
|
@ -133,8 +130,7 @@ public class RestrictionRetryController extends BaseEditController {
|
||||||
private List<Option> getValueDatatypeOptionList(VitroRequest request) {
|
private List<Option> getValueDatatypeOptionList(VitroRequest request) {
|
||||||
List<Option> valueDatatypeOptionList = new LinkedList<Option>();
|
List<Option> valueDatatypeOptionList = new LinkedList<Option>();
|
||||||
DatatypeDao dtDao = request.getFullWebappDaoFactory().getDatatypeDao();
|
DatatypeDao dtDao = request.getFullWebappDaoFactory().getDatatypeDao();
|
||||||
for (Iterator i = dtDao.getAllDatatypes().iterator(); i.hasNext(); ) {
|
for (Datatype dt: dtDao.getAllDatatypes()) {
|
||||||
Datatype dt = (Datatype) i.next();
|
|
||||||
valueDatatypeOptionList.add(new Option(dt.getUri(), dt.getName()));
|
valueDatatypeOptionList.add(new Option(dt.getUri(), dt.getName()));
|
||||||
}
|
}
|
||||||
valueDatatypeOptionList.add(new Option(RDFS.Literal.getURI(), "rdfs:Literal"));
|
valueDatatypeOptionList.add(new Option(RDFS.Literal.getURI(), "rdfs:Literal"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue