@WebServlet(name="CreateAndLinkResource",
urlPatterns="/createAndLink/*")
public class CreateAndLinkResourceController
extends edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet
| Modifier and Type | Class and Description |
|---|---|
class |
CreateAndLinkResourceController.PublicationType |
| Constructor and Description |
|---|
CreateAndLinkResourceController() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addDateToResource(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Resource work,
ResourceModel.DateField date)
Add a date object to the resource
|
protected String |
createVIVOObject(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Model model,
ResourceModel resourceModel,
String typeUri)
Create a new resource in VIVO, based on the values of the intermediate model
|
protected String |
findInVIVO(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
ExternalIdentifiers ids,
String profileUri,
Citation citation)
Try to find a resource in VIVO that defines one of the external identifiers
|
static Set<String> |
getEnabledProviders(edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties props) |
protected org.apache.jena.rdf.model.Model |
getExistingResource(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String uri)
Find an existing resource in VIVO, and return a Model with the appropriate statements
|
protected String |
getPublisherURI(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String publisher)
Get a URI for the publisher object
|
protected String |
getVCardURI(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String familyName,
String givenName)
Get a URI for a VCARD object
|
void |
init(javax.servlet.ServletConfig config) |
protected boolean |
isResourceOfType(org.apache.jena.rdf.model.Resource resource,
String typeUri)
Check that the resource is declared to be of a particular type
|
protected void |
processRelationships(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Model model,
String vivoUri,
String userUri,
String relationship)
Adjust the in-memory model to create the appropriate relationships for the claimed user role (authorship, editorship, etc)
|
protected edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues |
processRequest(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
Main method for the resource claiming (create and link) workflow
|
protected void |
proposeAuthorToLink(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
Citation citation,
String profileUri)
Method to find an author to propose for linking
|
static void |
registerProviders(edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties props) |
protected void |
removeAuthorship(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Model model,
String vivoUri,
int rank)
Removes an existing authorship at a given position, when that position is claimed by the author
|
protected void |
removeVCard(org.apache.jena.rdf.model.Model model,
String vcardUri)
Attempt to remove a VCARD from VIVO, ensuring that it is not being used first
|
protected edu.cornell.mannlib.vitro.webapp.auth.requestedAction.AuthorizationRequest |
requiredActions(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
Ensure that we can only be called if the user has the correct permissions
|
protected void |
writeChanges(edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService rdfService,
org.apache.jena.rdf.model.Model existingModel,
org.apache.jena.rdf.model.Model updatedModel)
Determine the difference between the "existing" and "updated" models, and write the changes to VIVO
|
doException, doForward, doGet, doPost, doRdf, doRedirect, doResponse, doTemplate, getBeansWrapper, getDisplayModelMenu, getFreemarkerComponentsForJsp, getPageTemplateName, getPageTemplateValues, getThemeDir, getTitle, handleException, processTemplate, processTemplateToString, wrap, wrap, write, writePage, writeTemplate, writeTemplatedumpRequestParameters, isAuthorizedToDisplayPage, maximumMultipartFileSize, redirectToInsufficientAuthorizationPage, redirectToLoginPage, redirectUnauthorizedRequest, service, sortForPickList, stashFileSizeExceptiondoDelete, doHead, doOptions, doPut, doTrace, getLastModified, servicepublic static final edu.cornell.mannlib.vitro.webapp.auth.requestedAction.AuthorizationRequest REQUIRED_ACTIONS
public static final String BIBO_ABSTRACT
public static final String BIBO_ARTICLE
public static final String BIBO_BOOK
public static final String BIBO_DOI
public static final String BIBO_ISBN10
public static final String BIBO_ISBN13
public static final String BIBO_ISSN
public static final String BIBO_ISSUE
public static final String BIBO_JOURNAL
public static final String BIBO_PAGE_COUNT
public static final String BIBO_PAGE_END
public static final String BIBO_PAGE_START
public static final String BIBO_PMID
public static final String BIBO_VOLUME
public static final String FOAF_FIRSTNAME
public static final String FOAF_LASTNAME
public static final String OBO_CONTACT_INFO_FOR
public static final String OBO_HAS_CONTACT_INFO
public static final String OBO_INHERES_IN
public static final String OBO_BEARER_OF
public static final String RDFS_LABEL
public static final String VIVO_AUTHORSHIP
public static final String VIVO_DATETIME
public static final String VIVO_DATETIMEPRECISION
public static final String VIVO_DATETIMEVALUE
public static final String VIVO_EDITORSHIP
public static final String VIVO_HASPUBLICATIONVENUE
public static final String VIVO_PMCID
public static final String VIVO_PUBLICATIONVENUEFOR
public static final String VIVO_PUBLISHER
public static final String VIVO_PUBLISHER_CLASS
public static final String VIVO_PUBLISHER_OF
public static final String VIVO_RANK
public static final String VIVO_RELATEDBY
public static final String VIVO_RELATES
public static final String VCARD_FAMILYNAME
public static final String VCARD_GIVENNAME
public static final String VCARD_HAS_NAME
public static final String VCARD_HAS_URL
public static final String VCARD_INDIVIDUAL
public static final String VCARD_KIND
public static final String VCARD_NAME
public static final String VCARD_URL_CLASS
public static final String VCARD_URL_PROPERTY
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic static Set<String> getEnabledProviders(edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties props)
public static void registerProviders(edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties props)
protected edu.cornell.mannlib.vitro.webapp.auth.requestedAction.AuthorizationRequest requiredActions(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
requiredActions in class edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServletvreq - protected edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues processRequest(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
processRequest in class edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServletvreq - protected void proposeAuthorToLink(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
Citation citation,
String profileUri)
vreq - citation - profileUri - protected org.apache.jena.rdf.model.Model getExistingResource(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String uri)
vreq - uri - protected void processRelationships(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Model model,
String vivoUri,
String userUri,
String relationship)
vreq - model - vivoUri - userUri - relationship - protected void removeAuthorship(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Model model,
String vivoUri,
int rank)
model - rank - protected void removeVCard(org.apache.jena.rdf.model.Model model,
String vcardUri)
model - vcardUri - protected String createVIVOObject(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq, org.apache.jena.rdf.model.Model model, ResourceModel resourceModel, String typeUri)
vreq - model - resourceModel - protected String getPublisherURI(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq, String publisher)
vreq - publisher - protected String getVCardURI(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq, String familyName, String givenName)
vreq - familyName - givenName - protected boolean addDateToResource(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
org.apache.jena.rdf.model.Resource work,
ResourceModel.DateField date)
vreq - work - date - protected String findInVIVO(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq, ExternalIdentifiers ids, String profileUri, Citation citation)
vreq - ids - profileUri - citation - protected boolean isResourceOfType(org.apache.jena.rdf.model.Resource resource,
String typeUri)
resource - typeUri - protected void writeChanges(edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService rdfService,
org.apache.jena.rdf.model.Model existingModel,
org.apache.jena.rdf.model.Model updatedModel)
rdfService - existingModel - updatedModel - Copyright © 2022. All rights reserved.