From 93a0c56f0818cfaa5a9acd6d45215314318a9c80 Mon Sep 17 00:00:00 2001 From: bdc34 Date: Mon, 31 Jan 2011 20:43:04 +0000 Subject: [PATCH] Removing some unused code and logging individual count in IndividualDaoSDB.java --- .../webapp/dao/jena/IndividualDaoSDB.java | 57 +------------------ 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java index d9ec66455..31525937d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java @@ -336,63 +336,8 @@ public class IndividualDaoSDB extends IndividualDaoJena { w.close(); } -// getOntModel().enterCriticalSection(Lock.READ); -// try { -// ClosableIterator allIndIt = getOntModel().listIndividuals(); -// try { -// while (allIndIt.hasNext()) { -// com.hp.hpl.jena.ontology.Individual ind = (com.hp.hpl.jena.ontology.Individual) allIndIt.next(); -// -// -// -// //don't include anything that lacks a label, issue VIVO-119. -// if( getLabel(ind) == null ) -// continue; -// -// -// boolean userVisible = true; -// //Check for non-user visible types, maybe this should be an annotation? -// ClosableIterator typeIt = ind.listRDFTypes(false); -// try { -// while (typeIt.hasNext()) { -// Resource typeRes = (Resource) typeIt.next(); -// String type = typeRes.getURI(); -// // brute forcing this until we implement a better strategy -// if (VitroVocabulary.PORTAL.equals(type) || -// VitroVocabulary.TAB.equals(type) || -// VitroVocabulary.TAB_INDIVIDUALRELATION.equals(type) || -// VitroVocabulary.LINK.equals(type) || -// VitroVocabulary.KEYWORD.equals(type) || -// VitroVocabulary.KEYWORD_INDIVIDUALRELATION.equals(type) || -// VitroVocabulary.CLASSGROUP.equals(type) || -// VitroVocabulary.PROPERTYGROUP.equals(type) || -// VitroVocabulary.APPLICATION.equals(type)) { -// userVisible = false; -// break; -// } -// if( OWL.ObjectProperty.getURI().equals(type) || -// OWL.DatatypeProperty.getURI().equals(type) || -// OWL.AnnotationProperty.getURI().equals(type) || -// RDF.type.getURI().equals(type) ){ -// userVisible = false; -// break; -// } -// } -// } finally { -// typeIt.close(); -// } -// if (userVisible) { -// list.add(ind); -// } -// -// } -// } finally { -// allIndIt.close(); -// } -// } finally { -// getOntModel().leaveCriticalSection(); -// } if (list.size() >0){ + log.info("Number of individuals from source: " + list.size()); return new Iterator(){ Iterator innerIt = list.iterator(); public boolean hasNext() {