NIHVIVO-962 Merge 5538 from branch
This commit is contained in:
parent
be57b724ec
commit
c0ee32b498
1 changed files with 5 additions and 1 deletions
|
@ -13,10 +13,12 @@ import java.util.TreeSet;
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
|
import com.hp.hpl.jena.rdf.model.Property;
|
||||||
import com.hp.hpl.jena.rdf.model.ResIterator;
|
import com.hp.hpl.jena.rdf.model.ResIterator;
|
||||||
import com.hp.hpl.jena.rdf.model.Resource;
|
import com.hp.hpl.jena.rdf.model.Resource;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
import edu.cornell.mannlib.vitro.webapp.filestorage.FileModelHelper;
|
import edu.cornell.mannlib.vitro.webapp.filestorage.FileModelHelper;
|
||||||
import edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorage;
|
import edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorage;
|
||||||
|
|
||||||
|
@ -102,7 +104,9 @@ public class ImageSchemaTranslater extends FsuScanner {
|
||||||
Individual file = translateFile(resource, path, "main image");
|
Individual file = translateFile(resource, path, "main image");
|
||||||
Individual person = fileModelHelper.getIndividualByUri(resource
|
Individual person = fileModelHelper.getIndividualByUri(resource
|
||||||
.getURI());
|
.getURI());
|
||||||
fileModelHelper.setAsMainImageOnEntity(person, file);
|
Property mainImageProperty = resource.getModel().getProperty(VitroVocabulary.IND_MAIN_IMAGE);
|
||||||
|
resource.addProperty(mainImageProperty, model.getResource(file.getURI()));
|
||||||
|
// fileModelHelper.setAsMainImageOnEntity(person, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue