Fixing ThumbnailImageURLTest and ThumbnailImageURL classes.
This commit is contained in:
parent
047540f2ff
commit
7e5826317c
2 changed files with 6 additions and 7 deletions
|
@ -39,10 +39,10 @@ public class ThumbnailImageURL implements DocumentModifier {
|
||||||
|
|
||||||
private static final String query = prefix +
|
private static final String query = prefix +
|
||||||
|
|
||||||
" SELECT (str(?thumbnailLocationURL) as ?ThumbnailLocationURL) WHERE { " +
|
" SELECT (str(?downloadLocation) as ?DownloadLocation) WHERE { " +
|
||||||
" ?uri <http://vitro.mannlib.cornell.edu/ns/vitro/public#mainImage> ?a . " +
|
" ?uri <http://vitro.mannlib.cornell.edu/ns/vitro/public#mainImage> ?a . " +
|
||||||
" ?a <http://vitro.mannlib.cornell.edu/ns/vitro/public#downloadLocation> ?b . " +
|
" ?a <http://vitro.mannlib.cornell.edu/ns/vitro/public#downloadLocation> ?downloadLocation . } " ;
|
||||||
" ?b <http://vitro.mannlib.cornell.edu/ns/vitro/public#directDownloadUrl> ?thumbnailLocationURL . } ";
|
//" ?b <http://vitro.mannlib.cornell.edu/ns/vitro/public#directDownloadUrl> ?thumbnailLocationURL . } ";
|
||||||
|
|
||||||
private Model model;
|
private Model model;
|
||||||
private Log log = LogFactory.getLog(ThumbnailImageURL.class);
|
private Log log = LogFactory.getLog(ThumbnailImageURL.class);
|
||||||
|
|
|
@ -22,7 +22,6 @@ import com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler;
|
||||||
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl;
|
import edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.MenuDaoJenaTest;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames;
|
import edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,7 +43,7 @@ public class ThumbnailImageURLTest extends AbstractTestClass{
|
||||||
setLoggerLevel(RDFDefaultErrorHandler.class, Level.OFF);
|
setLoggerLevel(RDFDefaultErrorHandler.class, Level.OFF);
|
||||||
|
|
||||||
Model model = ModelFactory.createDefaultModel();
|
Model model = ModelFactory.createDefaultModel();
|
||||||
InputStream in = MenuDaoJenaTest.class.getResourceAsStream("resources/menuForTest.n3");
|
InputStream in = ThumbnailImageURLTest.class.getResourceAsStream("testPerson.n3");
|
||||||
model.read(in,"","N3");
|
model.read(in,"","N3");
|
||||||
testModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,model);
|
testModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,model);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +69,7 @@ public class ThumbnailImageURLTest extends AbstractTestClass{
|
||||||
Assert.assertNotNull( thumbnailField.getValues() );
|
Assert.assertNotNull( thumbnailField.getValues() );
|
||||||
Assert.assertEquals(1, thumbnailField.getValueCount());
|
Assert.assertEquals(1, thumbnailField.getValueCount());
|
||||||
|
|
||||||
Assert.assertEquals("http://vivo.cornell.edu/individual/n13658", thumbnailField.getFirstValue());
|
Assert.assertEquals("http://vivo.cornell.edu/individual/n54945", thumbnailField.getFirstValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue