VIVO-935 Clean up code for search exclusion.
Take out the attribute key in SearchIndexerSetup. Nobody ever sets that attribute. Take out the VClassGroupCache.removeClassesHiddenFromSearch() method. If nobody sets that attribute, this method does nothing. Take out VClassGroupDao.removeClassesHiddenFromSearch() and VClassGroupDaoJena.removeClassesHiddenFromSearch(). They are never called. Take out ClassProhibitedFromSearch interface. It is implemented but never referenced. Take out FileBasedProhibitedFromSearch. It is never used. Move ProhibitedFromSearch and ProhibitedFromSearchTest from edu.cornell.mannlib.vitro.webapp.search.beans to edu.cornell.mannlib.vitro.webapp.dao.vclassgroup
This commit is contained in:
parent
f4f51a096f
commit
ac39b0799e
12 changed files with 16 additions and 115 deletions
|
@ -1,6 +1,6 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.search.beans;
|
||||
package edu.cornell.mannlib.vitro.webapp.dao.vclassgroup;
|
||||
|
||||
import java.io.StringReader;
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class ProhibitedFromSearchTest {
|
|||
@Test
|
||||
public void testBuildingProhibited(){
|
||||
Model r = ModelFactory.createDefaultModel().read(new StringReader(n3), null, "N3");
|
||||
OntModel m = (OntModel) ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
m.add( r.listStatements() );
|
||||
|
||||
Assert.assertTrue(m.size() > 4);
|
||||
|
@ -48,7 +48,7 @@ public class ProhibitedFromSearchTest {
|
|||
@Test
|
||||
public void testNotFound(){
|
||||
Model r = ModelFactory.createDefaultModel().read(new StringReader(n3), null, "N3");
|
||||
OntModel m = (OntModel) ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
m.add( r.listStatements() );
|
||||
|
||||
Assert.assertTrue(m.size() > 4);
|
||||
|
@ -63,7 +63,7 @@ public class ProhibitedFromSearchTest {
|
|||
@Test
|
||||
public void testListener(){
|
||||
Model r = ModelFactory.createDefaultModel().read(new StringReader(n3), null, "N3");
|
||||
OntModel m = (OntModel) ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
m.add( r.listStatements() );
|
||||
Assert.assertTrue(m.size() > 4);
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class ProhibitedFromSearchTest {
|
|||
@Test
|
||||
public void testListenerAbnormal(){
|
||||
Model r = ModelFactory.createDefaultModel().read(new StringReader(n3), null, "N3");
|
||||
OntModel m = (OntModel) ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
m.add( r.listStatements() );
|
||||
Assert.assertTrue(m.size() > 4);
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class ProhibitedFromSearchTest {
|
|||
"<http://vivoweb.org/ontology/core#NonAcademic> . ";
|
||||
|
||||
Model r = ModelFactory.createDefaultModel().read(new StringReader(primaryIndexN3), null, "N3");
|
||||
OntModel m = (OntModel) ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||
m.add( r.listStatements() );
|
||||
|
||||
Assert.assertTrue(m.size() == 1);
|
Loading…
Add table
Add a link
Reference in a new issue