VIVO-70 Create a DocumentModifier to handle PreferredTitle

Preferred Title is no longer a property. Instead use Title from the VCard.
This commit is contained in:
j2blake 2013-10-11 15:46:31 -04:00
parent c5a849e163
commit fd91aa4580

View file

@ -100,9 +100,7 @@ public class IndividualToSolrDocument {
log.debug(ex); log.debug(ex);
return null; return null;
}catch(Exception th){ }catch(Exception th){
//Odd exceptions can get thrown on shutdown log.error(th,th);
if( log != null )
log.error(th,th);
return null; return null;
} }
} }
@ -171,11 +169,6 @@ public class IndividualToSolrDocument {
DataPropertyStatement dataPropertyStmt = dataPropertyStmtIter.next(); DataPropertyStatement dataPropertyStmt = dataPropertyStmtIter.next();
if(dataPropertyStmt.getDatapropURI().equals(label)){ // we don't want label to be added to alltext if(dataPropertyStmt.getDatapropURI().equals(label)){ // we don't want label to be added to alltext
continue; continue;
} else if(dataPropertyStmt.getDatapropURI().equals("http://vivoweb.org/ontology/core#preferredTitle")){
//add the preferredTitle field
String preferredTitle = null;
doc.addField(term.PREFERRED_TITLE, ((preferredTitle=dataPropertyStmt.getData()) == null)?"":preferredTitle);
log.debug("Preferred Title: " + dataPropertyStmt.getData());
} }
allTextValue.append(" "); allTextValue.append(" ");
allTextValue.append(((t=dataPropertyStmt.getData()) == null)?"":t); allTextValue.append(((t=dataPropertyStmt.getData()) == null)?"":t);