Adding a new field siteName for Source Institution and changing SITE_URL to siteURL.
This commit is contained in:
parent
4fae584dd7
commit
5990fe18c2
3 changed files with 16 additions and 4 deletions
|
@ -581,8 +581,11 @@
|
|||
<!-- field for storing locations of thumbnails -->
|
||||
<field name="THUMBNAIL_URL" type="string" indexed="false" stored="true"/>
|
||||
|
||||
<!-- field for source institution's name -->
|
||||
<field name="SITE_URL" type="string" indexed="true" stored="true"/>
|
||||
<!-- field for source institution's url -->
|
||||
<field name="siteURL" type="string" indexed="true" stored="true"/>
|
||||
|
||||
<!-- field for source institution's name -->
|
||||
<field name="siteName" type="string" indexed="true" stored="true"/>
|
||||
|
||||
<!-- field for preferred title -->
|
||||
<field name="PREFERRED_TITLE" type="string" indexed="true" stored="true"/>
|
||||
|
|
|
@ -72,7 +72,11 @@ public class VitroSearchTermNames {
|
|||
public static final String THUMBNAIL_URL = "THUMBNAIL_URL";
|
||||
|
||||
/** source institution url */
|
||||
public static final String SITE_URL = "SITE_URL";
|
||||
public static final String SITE_URL = "siteURL";
|
||||
|
||||
/** source institution name */
|
||||
public static final String SITE_NAME = "siteName";
|
||||
|
||||
/** preferred title */
|
||||
public static final String PREFERRED_TITLE = "PREFERRED_TITLE";
|
||||
}
|
||||
|
|
|
@ -10,11 +10,15 @@ import edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames;
|
|||
public class SourceInstitution implements DocumentModifier {
|
||||
|
||||
private String siteURL;
|
||||
private String siteName;
|
||||
|
||||
static VitroSearchTermNames term = new VitroSearchTermNames();
|
||||
private String fieldForSiteURL = term.SITE_URL;
|
||||
private String fieldForSiteName = term.SITE_NAME;
|
||||
|
||||
public SourceInstitution(String siteURL){
|
||||
public SourceInstitution(String siteURL, String siteName){
|
||||
this.siteURL = siteURL;
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,6 +26,7 @@ public class SourceInstitution implements DocumentModifier {
|
|||
StringBuffer addUri) throws SkipIndividualException {
|
||||
|
||||
doc.addField(fieldForSiteURL, siteURL);
|
||||
doc.addField(fieldForSiteName, siteName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue