Removing objectproperties from IndividualToSolrDocument and uncommenting contextURI in ContextNodesInclusionFactory

This commit is contained in:
deepakkoni 2011-05-19 19:08:51 +00:00
parent 5f8f5fa8f5
commit 17d7132222
2 changed files with 4 additions and 12 deletions

View file

@ -26,7 +26,7 @@ import edu.cornell.mannlib.vitro.webapp.dao.jena.ModelContext;
public class ContextNodesInclusionFactory {
private OntModel fullModel;
// private String contextNodeURI;
private String contextNodeURI;
//private String query = "";
// private static final String queryForEducationalTraining = "SELECT ?query WHERE {" +
@ -37,7 +37,7 @@ public class ContextNodesInclusionFactory {
public ContextNodesInclusionFactory(String contextNodeURI,
OntModel displayOntModel, ServletContext context) {
this.fullModel = ModelContext.getJenaOntModel(context);
// this.contextNodeURI = contextNodeURI;
this.contextNodeURI = contextNodeURI;
//query = getQueryFromModel(contextNodeURI, displayOntModel);
}

View file

@ -9,10 +9,8 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document;
import org.apache.solr.client.solrj.beans.Field;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.SolrInputField;
import org.joda.time.DateTime;
import com.hp.hpl.jena.vocabulary.OWL;
@ -29,7 +27,6 @@ import edu.cornell.mannlib.vitro.webapp.search.beans.ContextNodesInclusionFactor
import edu.cornell.mannlib.vitro.webapp.search.beans.IndividualProhibitedFromSearch;
import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch;
import edu.cornell.mannlib.vitro.webapp.search.docbuilder.Obj2DocIface;
import edu.cornell.mannlib.vitro.webapp.search.lucene.Entity2LuceneDoc;
public class IndividualToSolrDocument implements Obj2DocIface {
@ -47,7 +44,6 @@ public class IndividualToSolrDocument implements Obj2DocIface {
private ContextNodesInclusionFactory contextNodesInclusionFactory;
private static HashSet<String> objectProperties = new HashSet<String>();
public IndividualToSolrDocument(ProhibitedFromSearch classesProhibitedFromSearch,
@ -58,6 +54,7 @@ public class IndividualToSolrDocument implements Obj2DocIface {
this.contextNodesInclusionFactory = contextNodesInclusionFactory;
}
@SuppressWarnings("static-access")
@Override
public Object translate(Object obj) throws IndexingException{
long tProhibited = System.currentTimeMillis();
@ -232,11 +229,6 @@ public class IndividualToSolrDocument implements Obj2DocIface {
continue;
try {
value+= " "+ ( ((t=objectPropertyStmt.getObject().getName()) == null)?"":t );
if(ent.isVClass("http://xmlns.com/foaf/0.1/Person")){
//IndividualURIToObjectProperties.put(ent.getURI(), ( ((t=objectPropertyStmt.getProperty().getURI()) == null)?"":t ) );
objectProperties.add(( ((t=objectPropertyStmt.getProperty().getURI()) == null)?"":t ));
}
} catch (Exception e) {
log.debug("could not index name of related object: " + e.getMessage());
}