public class UtilityFunctions extends Object
| Constructor and Description |
|---|
UtilityFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Set<Collaborator>> |
getActivityYearToCollaborators(CollaborationData collaborationData)
This method is used to return a mapping between activity year & all the collaborators
that published with ego in that year.
|
static String |
getCollaboratorshipNetworkLink(String individualURI,
String visType,
String visMode) |
static String |
getCSVDownloadURL(String individualURI,
String visType,
String visMode) |
static String |
getIndividualLabelFromDAO(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vitroRequest,
String entityURI) |
static String |
getIndividualLocalName(String givenURI,
edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vitroRequest)
This method will test whether the current uri is based off of default namespace.
|
static org.joda.time.DateTime |
getValidParsedDateTimeObject(String unparsedDateTime) |
static String |
getValidYearFromCoreDateTimeString(String inputDate,
String defaultYearInCaseOfError)
This method will be called to get the inferred end year for the entity.
|
static Map<String,Integer> |
getYearToActivityCount(Collection<Activity> activities) |
static Map<String,Integer> |
getYearToActivityCount(Set<Activity> activities) |
static void |
handleMalformedParameters(String errorMessage,
javax.servlet.http.HttpServletResponse response,
org.apache.commons.logging.Log log) |
static edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues |
handleMalformedParameters(String errorPageTitle,
String errorMessage,
edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vitroRequest) |
static boolean |
isEntityAPerson(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String individualURI) |
static String |
slugify(String textToBeSlugified)
Currently the approach for slugifying filenames is naive.
|
public static Map<String,Integer> getYearToActivityCount(Set<Activity> activities)
public static Map<String,Integer> getYearToActivityCount(Collection<Activity> activities)
public static Map<String,Set<Collaborator>> getActivityYearToCollaborators(CollaborationData collaborationData)
collaborationData - Collaboration datapublic static String slugify(String textToBeSlugified)
textToBeSlugified - Text to processpublic static edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues handleMalformedParameters(String errorPageTitle, String errorMessage, edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vitroRequest)
public static void handleMalformedParameters(String errorMessage, javax.servlet.http.HttpServletResponse response, org.apache.commons.logging.Log log) throws IOException
IOExceptionpublic static org.joda.time.DateTime getValidParsedDateTimeObject(String unparsedDateTime)
public static String getValidYearFromCoreDateTimeString(String inputDate, String defaultYearInCaseOfError)
public static String getCSVDownloadURL(String individualURI, String visType, String visMode)
public static String getCollaboratorshipNetworkLink(String individualURI, String visType, String visMode)
public static boolean isEntityAPerson(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq,
String individualURI)
throws MalformedQueryParametersException
public static String getIndividualLocalName(String givenURI, edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vitroRequest)
givenURI - URIvitroRequest - Vitro RequestCopyright © 2022. All rights reserved.