Minor performance improvements
This commit is contained in:
parent
e224736323
commit
60017600a3
9 changed files with 9 additions and 28 deletions
|
@ -66,10 +66,7 @@ public class IndividualTypeRetryController extends BaseEditController {
|
|||
continue;
|
||||
}
|
||||
prohibitedURIset.add(vc.getURI());
|
||||
for (Iterator<String> djURIIt = vcDao.getDisjointWithClassURIs(vc.getURI()).iterator(); djURIIt.hasNext(); ) {
|
||||
String djURI = djURIIt.next();
|
||||
prohibitedURIset.add(djURI);
|
||||
}
|
||||
prohibitedURIset.addAll(vcDao.getDisjointWithClassURIs(vc.getURI()));
|
||||
}
|
||||
|
||||
List<VClass> eligibleVClasses = new ArrayList<VClass>();
|
||||
|
|
|
@ -133,9 +133,7 @@ public class JenaAdminActions extends BaseEditController {
|
|||
typeSet.add((Resource) stmt.getObject());
|
||||
}
|
||||
}
|
||||
for (Resource classRes : ontModel.listClasses().toList()) {
|
||||
typeSet.add(classRes);
|
||||
}
|
||||
typeSet.addAll(ontModel.listClasses().toList());
|
||||
for (Resource ontClass : typeSet) {
|
||||
if (!ontClass.isAnon()) { // Only query for named classes
|
||||
System.out.println("Describing "+ontClass.getURI());
|
||||
|
|
|
@ -37,9 +37,7 @@ public class GetAllVClasses extends JsonObjectProducer {
|
|||
VClassGroupsForRequest vcgc = VClassGroupCache.getVClassGroups(vreq);
|
||||
List<VClassGroup> groups = vcgc.getGroups();
|
||||
for(VClassGroup vcg: groups) {
|
||||
for( VClass vc : vcg){
|
||||
vclasses.add(vc);
|
||||
}
|
||||
vclasses.addAll(vcg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -296,9 +296,7 @@ public class EditConfigurationUtils {
|
|||
/** Make a copy of list of Strings. */
|
||||
public static List<String> copy(List<String> list) {
|
||||
List<String> copyList = new ArrayList<String>();
|
||||
for(String l: list) {
|
||||
copyList.add(l);
|
||||
}
|
||||
copyList.addAll(list);
|
||||
return copyList;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,9 +145,7 @@ public class DefaultObjectPropertyFormGenerator implements EditConfigurationGene
|
|||
if (!rangeVClass.isUnion()) {
|
||||
types.add(rangeVClass);
|
||||
} else {
|
||||
for (VClass unionComponent : rangeVClass.getUnionComponents()) {
|
||||
types.add(unionComponent);
|
||||
}
|
||||
types.addAll(rangeVClass.getUnionComponents());
|
||||
}
|
||||
return types;
|
||||
} else {
|
||||
|
|
|
@ -679,9 +679,7 @@ private String getExistingIsSelfContainedTemplateQuery() {
|
|||
VClassGroupsForRequest vcgc = VClassGroupCache.getVClassGroups(vreq);
|
||||
List<VClassGroup> groups = vcgc.getGroups();
|
||||
for(VClassGroup vcg: groups) {
|
||||
for( VClass vc : vcg){
|
||||
vclasses.add(vc);
|
||||
}
|
||||
vclasses.addAll(vcg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -207,9 +207,7 @@ public class ProcessRdfFormController extends FreemarkerHttpServlet{
|
|||
|
||||
public static List<String> makeListCopy(List<String> list) {
|
||||
List<String> copyOfN3 = new ArrayList<String>();
|
||||
for( String str : list){
|
||||
copyOfN3.add(str);
|
||||
}
|
||||
copyOfN3.addAll(list);
|
||||
return copyOfN3;
|
||||
}
|
||||
|
||||
|
|
|
@ -239,9 +239,7 @@ public class ABoxRecomputer {
|
|||
}
|
||||
}
|
||||
if(rebuildModel.size() - prevRebuildSize > 0) {
|
||||
for (String sameAsInd : sameAsInds) {
|
||||
individualQueue.add(sameAsInd);
|
||||
}
|
||||
individualQueue.addAll(sameAsInds);
|
||||
}
|
||||
}
|
||||
return additionalInferences;
|
||||
|
|
|
@ -240,9 +240,7 @@ public class OpenSocialManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
for (PreparedGadget gadget : removedGadgets) {
|
||||
gadgets.remove(gadget);
|
||||
}
|
||||
gadgets.removeAll(removedGadgets);
|
||||
}
|
||||
|
||||
public void removeGadget(String name) {
|
||||
|
|
Loading…
Add table
Reference in a new issue