NIHVIVO-2775 Rename the display vocabulary search index constant
This commit is contained in:
parent
532de948da
commit
7f92c2abe9
7 changed files with 7 additions and 7 deletions
|
@ -329,7 +329,7 @@ public class JsonServlet extends VitroHttpServlet {
|
||||||
.getAttribute("displayOntModel");
|
.getAttribute("displayOntModel");
|
||||||
if (displayOntModel != null) {
|
if (displayOntModel != null) {
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
||||||
DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, displayOntModel);
|
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
||||||
editConfig.setProhibitedFromSearch(pfs);
|
editConfig.setProhibitedFromSearch(pfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class DisplayVocabulary {
|
||||||
private static final String NS = DISPLAY_NS;
|
private static final String NS = DISPLAY_NS;
|
||||||
|
|
||||||
/* Individuals */
|
/* Individuals */
|
||||||
public static final String PRIMARY_SEARCH_INDEX_URI = NS + "SearchIndex";
|
public static final String SEARCH_INDEX_URI = NS + "SearchIndex";
|
||||||
|
|
||||||
//bk392 for extracting properties beyond context nodes.
|
//bk392 for extracting properties beyond context nodes.
|
||||||
public static final String CONTEXT_NODES_URI = NS + "QueryForContextNodes";
|
public static final String CONTEXT_NODES_URI = NS + "QueryForContextNodes";
|
||||||
|
|
|
@ -320,7 +320,7 @@ public class VClassGroupDaoJena extends JenaBaseDao implements VClassGroupDao {
|
||||||
public void removeClassesHiddenFromSearch(List<VClassGroup> groups) {
|
public void removeClassesHiddenFromSearch(List<VClassGroup> groups) {
|
||||||
OntModel displayOntModel = getOntModelSelector().getDisplayModel();
|
OntModel displayOntModel = getOntModelSelector().getDisplayModel();
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
||||||
DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, displayOntModel);
|
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
||||||
for (VClassGroup group : groups) {
|
for (VClassGroup group : groups) {
|
||||||
List<VClass> classList = new ArrayList<VClass>();
|
List<VClass> classList = new ArrayList<VClass>();
|
||||||
for (VClass vclass : group.getVitroClassList()) {
|
for (VClass vclass : group.getVitroClassList()) {
|
||||||
|
|
|
@ -476,7 +476,7 @@ public class MenuEditingFormGenerator implements EditConfigurationGenerator {
|
||||||
.getAttribute("displayOntModel");
|
.getAttribute("displayOntModel");
|
||||||
if (displayOntModel != null) {
|
if (displayOntModel != null) {
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
||||||
DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, displayOntModel);
|
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
||||||
if( editConfiguration != null )
|
if( editConfiguration != null )
|
||||||
editConfiguration.setProhibitedFromSearch(pfs);
|
editConfiguration.setProhibitedFromSearch(pfs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class SolrSetup implements javax.servlet.ServletContextListener{
|
||||||
modifiers.add(new NameBoost());
|
modifiers.add(new NameBoost());
|
||||||
|
|
||||||
IndividualToSolrDocument indToSolrDoc = new IndividualToSolrDocument(
|
IndividualToSolrDocument indToSolrDoc = new IndividualToSolrDocument(
|
||||||
new ProhibitedFromSearch(DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, displayOntModel),
|
new ProhibitedFromSearch(DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel),
|
||||||
new IndividualProhibitedFromSearchImpl(context),
|
new IndividualProhibitedFromSearchImpl(context),
|
||||||
modifiers);
|
modifiers);
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ public class InputElementFormattingTag extends TagSupport {
|
||||||
.getAttribute("displayOntModel");
|
.getAttribute("displayOntModel");
|
||||||
if (displayOntModel != null) {
|
if (displayOntModel != null) {
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
||||||
DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, displayOntModel);
|
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
||||||
if( editConfig != null )
|
if( editConfig != null )
|
||||||
editConfig.setProhibitedFromSearch(pfs);
|
editConfig.setProhibitedFromSearch(pfs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class ProhibitedFromSearchTest {
|
||||||
m.add( r.listStatements() );
|
m.add( r.listStatements() );
|
||||||
|
|
||||||
Assert.assertTrue(m.size() == 1);
|
Assert.assertTrue(m.size() == 1);
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch( DisplayVocabulary.PRIMARY_SEARCH_INDEX_URI, m);
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch( DisplayVocabulary.SEARCH_INDEX_URI, m);
|
||||||
Assert.assertNotNull(pfs.prohibitedClasses);
|
Assert.assertNotNull(pfs.prohibitedClasses);
|
||||||
Assert.assertEquals(1, pfs.prohibitedClasses.size() );
|
Assert.assertEquals(1, pfs.prohibitedClasses.size() );
|
||||||
Assert.assertTrue(pfs.isClassProhibitedFromSearch("http://vivoweb.org/ontology/core#NonAcademic"));
|
Assert.assertTrue(pfs.isClassProhibitedFromSearch("http://vivoweb.org/ontology/core#NonAcademic"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue