JavaDoc changes required to prevent the release process breaking.

This commit is contained in:
Graham Triggs 2016-06-23 20:03:22 +01:00
parent c364dec722
commit 20ab5259c0
24 changed files with 89 additions and 142 deletions

View file

@ -5,9 +5,6 @@ public class BaseObject {
/**
* Simple JavaBean domain object with an id property.
* Used as a base class for objects needing this property.
*
* @author Ken Krebs
* @author Juergen Hoeller
*/
private Integer id;

View file

@ -17,9 +17,9 @@ public class SemanticServicesError {
/**
* @param exception
* @param message
* @param severity
* @param exception Exception description
* @param message Error message
* @param severity Severity
*/
public SemanticServicesError(String exception, String message, String severity) {
super();

View file

@ -9,21 +9,18 @@ import edu.cornell.mannlib.semservices.bo.Concept;
public interface ExternalConceptService {
/**
* @param term
* @return
* @param term Term
*/
List<Concept> processResults(String term) throws Exception;
/**
* @param term
* @return
* @param term Term
* @throws Exception
*/
List<Concept> getConcepts(String term) throws Exception;
/**
* @param uri
* @return
* @param uri URI
*/
List<Concept> getConceptsByURIWithSparql(String uri) throws Exception;

View file

@ -481,8 +481,7 @@ public class AgrovocService implements ExternalConceptService {
}
/**
* @param uri
* @return
* @param uri The URI
*/
protected String stripConceptId(String uri) {
String conceptId = new String();
@ -492,8 +491,7 @@ public class AgrovocService implements ExternalConceptService {
}
/**
* @param str
* @return
* @param str The String
*/
protected String extractConceptId(String str) {
try {

View file

@ -75,8 +75,7 @@ public class GemetService implements ExternalConceptService {
}
/**
* @param results
* @return
* @param results Results to process
*/
private List<Concept> processOutput(String results) throws Exception {
@ -145,9 +144,8 @@ public class GemetService implements ExternalConceptService {
/**
* Get a string from a json object or an empty string if there is no value for the given key
* @param obj
* @param key
* @return
* @param obj JSON Object
* @param key Key to retrieve
*/
protected String getJsonValue(JSONObject obj, String key) {
if (obj.has(key)) {
@ -159,8 +157,7 @@ public class GemetService implements ExternalConceptService {
/**
* @param concept_uri
* @return
* @param concept_uri Concept URI
* @throws Exception
*/
protected String getAvailableLangs(String concept_uri) throws Exception {
@ -177,8 +174,7 @@ public class GemetService implements ExternalConceptService {
}
/**
* @param concept_uri
* @return
* @param concept_uri concept URI
* @throws Exception
*/
protected String getConcept(String concept_uri) throws Exception {
@ -196,9 +192,8 @@ public class GemetService implements ExternalConceptService {
}
/**
* @param concept_uri
* @param property
* @return
* @param concept_uri Concept URI
* @param property Property
* @throws Exception
*/
protected String getAllTranslationsForConcept(String concept_uri, String property) throws Exception {
@ -235,9 +230,8 @@ public class GemetService implements ExternalConceptService {
/**
* @param concept_uri
* @param relation
* @return
* @param concept_uri Concept URI
* @param relation Relations
* @throws Exception
*/
protected String getRelatedConcepts(String concept_uri, String relation) throws Exception {
@ -266,8 +260,7 @@ public class GemetService implements ExternalConceptService {
/**
* @param keyword
* @return
* @param keyword Keyword
* @throws Exception
*/
protected String getConceptsMatchingKeyword(String keyword) throws Exception {
@ -288,8 +281,7 @@ public class GemetService implements ExternalConceptService {
}
/**
* @param url
* @return
* @param url URI
*/
protected String getGemetResults(String url) throws Exception {
String results = new String();

View file

@ -221,8 +221,7 @@ public class LCSHService implements ExternalConceptService {
}
/**
* @param uri
* @return
* @param uri URI
*/
protected String stripConceptId(String uri) {
String conceptId = new String();
@ -232,8 +231,7 @@ public class LCSHService implements ExternalConceptService {
}
/**
* @param str
* @return
* @param str String with concept id
*/
protected String extractConceptId(String str) {
try {

View file

@ -97,8 +97,7 @@ public class UMLSService implements ExternalConceptService {
}
/**
* @param uri
* @return
* @param uri URI
*/
public List<Concept> getConceptsByURIWithSparql(String uri)
throws Exception {
@ -108,8 +107,7 @@ public class UMLSService implements ExternalConceptService {
}
/**
* @param results
* @return
* @param results Results to process
*/
private List<Concept> processOutput(String results) throws Exception {
@ -193,9 +191,8 @@ public class UMLSService implements ExternalConceptService {
/**
* Get a string from a json object or an empty string if there is no value for the given key
* @param obj
* @param key
* @return
* @param obj JSON Object
* @param key Key to retrieve
*/
protected String getJsonValue(JSONObject obj, String key) {
if (obj.has(key)) {

View file

@ -50,7 +50,6 @@ public class XMLUtils {
/**
* @return
* @throws ParserConfigurationException
*/
public static DocumentBuilder getDocumentBuilder()
@ -68,8 +67,7 @@ public class XMLUtils {
}
/**
* @param xmlString
* @return
* @param xmlString XML String
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
@ -82,8 +80,7 @@ public class XMLUtils {
}
/**
* @param stream
* @return
* @param stream Input stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
@ -94,9 +91,8 @@ public class XMLUtils {
}
/**
* @param document
* @param name
* @return
* @param document DOM Document
* @param name Name
*/
public static String getElementByName(Document document, String name) {
NodeList nodes = document.getElementsByTagName(name);
@ -109,7 +105,7 @@ public class XMLUtils {
}
/**
* @param doc
* @param doc DOM Document
* @throws IOException
*/
@SuppressWarnings("deprecation")
@ -130,7 +126,7 @@ public class XMLUtils {
}
/**
* @param xml
* @param xml XML String
*/
public static void prettyPrint(String xml) {
Source xmlInput = new StreamSource(new StringReader(xml));
@ -160,7 +156,7 @@ public class XMLUtils {
}
/**
* @param xml
* @param xml XML String
*/
public static String prettyPrintToString(String xml) {
Source xmlInput = new StreamSource(new StringReader(xml));
@ -190,7 +186,7 @@ public class XMLUtils {
}
/**
* @param node
* @param node DOM Node
*/
public static void displayNodeInfo(Node node) {
switch (node.getNodeType()) {
@ -222,7 +218,7 @@ public class XMLUtils {
}
/**
* @param node
* @param node DOM Node
* @throws IOException
*/
public static void serializeNode(Node node) throws IOException {
@ -308,7 +304,7 @@ public class XMLUtils {
}
/**
* @param s
* @param s String
* @throws IOException
*/
private static void print(String s) throws IOException {
@ -336,8 +332,8 @@ public class XMLUtils {
}
/**
* @param doc (either a Document or a Node)
* @param expression
* @param obj (either a Document or a Node)
* @param expression Expression
* @return string contents
*/
public static Node getNodeWithXpath(Object obj, String expression) {

View file

@ -19,8 +19,7 @@ public class VisualizationsDependencyInjector {
* This method is used to inject vis dependencies i.e. the vis algorithms that are
* being implemented into the vis controller. Modified Dependency Injection pattern is
* used here. XML file containing the location of all the vis is saved in accessible folder.
* @param servletContext
* @return
* @param servletContext Servlet context
*/
private synchronized static Map<String, VisualizationRequestHandler> initVisualizations(
ServletContext servletContext) {

View file

@ -556,9 +556,9 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator
/**
* Prepare edit configuration for update
* @param vreq
* @param session
* @param editConfiguration
* @param vreq - current VitroRequest
* @param session - the HTTP session
* @param editConfiguration - Edit configuration
*/
private void prepareForUpdate(VitroRequest vreq, HttpSession session, EditConfigurationVTwo editConfiguration) {

View file

@ -436,7 +436,6 @@ public abstract class AddRoleToPersonTwoStageGenerator extends BaseEditConfigura
/**
* Utility method for subclasses to make a query for type from a ChildVClassesOptions object.
* @throws Exception
*/
protected String getActivityTypeQueryForChildVClassOptions(VitroRequest vreq, ChildVClassesOptions opts){
log.debug("objectClassUri = " + opts.getClassUri());
@ -447,7 +446,6 @@ public abstract class AddRoleToPersonTwoStageGenerator extends BaseEditConfigura
/**
* Utility method for subclasses to make a query for type from a IndividualsViaClassGroupOptions object.
* @throws Exception
*/
protected String getActivityTypeQueryForIndividualsViaClassGroupOptions(VitroRequest vreq, IndividualsViaClassGroupOptions opts){
log.debug("ClassGroupUri = " + opts.getClassGroupUri());

View file

@ -177,8 +177,7 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
/**
* Provides response when a csv file containing number & names of unique co-authors per
* year is requested.
* @param authorNodesAndEdges
* @param response
* @param authorNodesAndEdges Author nodes and edges
*/
private Map<String, String> prepareCoauthorsCountPerYearDataResponse(
CollaborationData authorNodesAndEdges) {
@ -214,8 +213,7 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
/**
* Provides response when a csv file containing number & names of unique co-authors per
* year is requested.
* @param authorNodesAndEdges
* @param response
* @param coAuthorshipData Co authorship data
*/
private Map<String, String> prepareCoauthorsListDataResponse(
CollaborationData coAuthorshipData) {
@ -246,8 +244,7 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
/**
* Provides a response when graphml formatted co-authorship network is requested, typically by
* the flash vis.
* @param authorNodesAndEdges
* @param response
* @param authorNodesAndEdges Author nodes and edges
*/
private Map<String, String> prepareNetworkStreamDataResponse(
CollaborationData authorNodesAndEdges) {

View file

@ -62,8 +62,8 @@ public class CoAuthorshipVisCodeGenerator {
/**
* This method is used to setup parameters for the sparkline value object. These parameters
* will be used in the template to construct the actual html/javascript code.
* @param visMode
* @param visContainer
* @param visMode Visualization mode
* @param providedVisContainerID Container ID
*/
private SparklineData setupSparklineParameters(String visMode,
String providedVisContainerID) {

View file

@ -174,8 +174,7 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
/**
* Provides response when a csv file containing number & names of unique co-pis per
* year is requested.
* @param piNodesAndEdges
* @param response
* @param piNodesAndEdges PI nodes and edges
*/
private Map<String, String> prepareCoPIsCountPerYearDataResponse(
CollaborationData piNodesAndEdges) {
@ -211,8 +210,7 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
/**
* Provides response when a csv file containing number & names of unique co-pis per
* year is requested.
* @param coPIData
* @param response
* @param coPIData Co Principal Investigator Data
*/
private Map<String, String> prepareCoPIsListDataResponse(CollaborationData coPIData) {
@ -242,8 +240,7 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
/**
* Provides a response when graphml formatted co-pi network is requested, typically by
* the flash vis.
* @param coPIData
* @param response
* @param coPIData Co Investigator data
*/
private Map<String, String> prepareNetworkStreamDataResponse(CollaborationData coPIData) {

View file

@ -69,8 +69,8 @@ public class CoPIVisCodeGenerator {
/**
* This method is used to setup parameters for the sparkline value object. These parameters
* will be used in the template to construct the actual html/javascript code.
* @param visMode
* @param visContainer
* @param visMode Visualization mode
* @param providedVisContainerID Container ID
*/
private SparklineData setupSparklineParameters(String visMode,
String providedVisContainerID) {

View file

@ -199,9 +199,8 @@ public class PersonGrantCountRequestHandler implements VisualizationRequestHandl
/**
* Provides response when csv file containing the grant count over the years
* is requested.
* @param investigator
* @param yearToGrantCount
* @return
* @param investigator Investigator entiry
* @param yearToGrantCount Year / grant counts
*/
private Map<String, String> prepareDataResponse(
SubEntity investigator,
@ -225,9 +224,8 @@ public class PersonGrantCountRequestHandler implements VisualizationRequestHandl
/**
* Provides response when an entire page dedicated to grant sparkline is requested.
* @param vreq
* @param valueObjectContainer
* @return
* @param vreq Vitro Request
* @param valueObjectContainer Sparkline data
*/
private TemplateResponseValues prepareStandaloneResponse(VitroRequest vreq,
SparklineData valueObjectContainer) {
@ -245,10 +243,9 @@ public class PersonGrantCountRequestHandler implements VisualizationRequestHandl
/**
* Provides response when the grant sparkline has to be rendered in already existing
* page, e.g. profile page.
* @param vreq
* @param valueObjectContainer
* @param shouldVIVOrenderVis
* @return
* @param vreq Vitro Request
* @param valueObjectContainer Sparkline data
* @param shouldVIVOrenderVis Flag to render visualization
*/
private TemplateResponseValues prepareDynamicResponse(
VitroRequest vreq,

View file

@ -60,10 +60,8 @@ public class PersonGrantCountVisCodeGenerator {
/**
* This method is used to setup parameters for the sparkline value object. These parameters
* will be used in the template to construct the actual html/javascript code.
* @param visMode
* @param visContainer
* @param authorDocuments
* @return
* @param visMode Visualisation mode
* @param providedVisContainerID Container ID
*/
private SparklineData setupSparklineParameters(String visMode,
String providedVisContainerID) {

View file

@ -217,10 +217,8 @@ VisualizationRequestHandler {
* Provides response when csv file containing the publication count over the
* years is requested.
*
* @param author
* @param authorDocuments
* @param yearToPublicationCount
* @return
* @param authorName Name of author
* @param yearToPublicationCount Year / publication counts
*/
private Map<String, String> prepareDataResponse(String authorName,
Map<String, Integer> yearToPublicationCount) {
@ -251,9 +249,8 @@ VisualizationRequestHandler {
* Provides response when an entire page dedicated to publication sparkline
* is requested.
*
* @param vreq
* @param valueObjectContainer
* @return
* @param vreq Vitro Request
* @param valueObjectContainer Sparkline Data
*/
private TemplateResponseValues prepareStandaloneResponse(VitroRequest vreq,
SparklineData valueObjectContainer) {
@ -272,10 +269,10 @@ VisualizationRequestHandler {
* Provides response when the publication sparkline has to be rendered in
* already existing page, e.g. profile page.
*
* @param vreq
* @param valueObjectContainer
* @param yearToPublicationCount
* @return
* @param vreq Vitro Request
* @param valueObjectContainer Sparkline data
* @param shouldVIVOrenderVis Flag to render visualization
* @param requestingTemplate Requesting template name
*/
private TemplateResponseValues prepareDynamicResponse(VitroRequest vreq,
SparklineData valueObjectContainer, boolean shouldVIVOrenderVis, String requestingTemplate) {

View file

@ -62,9 +62,8 @@ public class PersonPublicationCountVisCodeGenerator {
/**
* This method is used to setup parameters for the sparkline value object. These parameters
* will be used in the template to construct the actual html/javascript code.
* @param visMode
* @param visContainer
* @return
* @param visMode Visualization mode
* @param providedVisContainerID container id
*/
private SparklineData setupSparklineParameters(String visMode,
String providedVisContainerID) {

View file

@ -59,7 +59,6 @@ public class CachingRDFServiceExecutor<T> {
* Will wait for completion if the cache is not already populated, otherwise the refresh will happen in the background.
*
* @param rdfService an RDF service to use, in foreground mode, if the background service is missing
* @return
*/
public synchronized T get(RDFService rdfService) {
// First, check if there are results from the previous background task, and update the cache
@ -171,7 +170,7 @@ public class CachingRDFServiceExecutor<T> {
/**
* Create and start a background thread using the configured task
* @param rdfService
* @param rdfService An RDFService
*/
private void startBackgroundTask(RDFService rdfService) {
// Ensure that there isn't already a task
@ -271,7 +270,7 @@ public class CachingRDFServiceExecutor<T> {
/**
* Set the RDF service to be used for background threads (called from a startup servlet)
* @param rdfService
* @param rdfService An RDFService
*/
public static void setBackgroundRDFService(RDFService rdfService) {
backgroundRDFService = rdfService;
@ -299,13 +298,13 @@ public class CachingRDFServiceExecutor<T> {
/**
* Constructor that allows an affinity object to be supplied
* @param affinity
* @param affinity Affinity
*/
public RDFServiceCallable(Affinity affinity) { this.affinity = affinity; }
/**
* Set the RDF service to be used
* @param rdfService
* @param rdfService An RDFService
*/
final void setRDFService(RDFService rdfService) {
this.rdfService = rdfService;
@ -313,7 +312,6 @@ public class CachingRDFServiceExecutor<T> {
/**
* Entry point for the background threads, ensuring the right start / cleanup is done
* @return
* @throws Exception
*/
@Override
@ -349,8 +347,7 @@ public class CachingRDFServiceExecutor<T> {
/**
* Method for users to implement, to return the results
* @param rdfService
* @return
* @param rdfService An RDFService
* @throws Exception
*/
protected abstract T callWithService(RDFService rdfService) throws Exception;
@ -358,8 +355,7 @@ public class CachingRDFServiceExecutor<T> {
/**
* Method to determine if the cache should be invalidated for the current results
* Default implementation dynamically adjusts the cache time based on the efficiency of creating results
* @param timeCached
* @return
* @param timeCached The time of caching
*/
boolean invalidateCache(long timeCached) {
if (executionTime > -1) {
@ -416,8 +412,8 @@ public class CachingRDFServiceExecutor<T> {
/**
* Adds a thread to the map, returns whether the thread needs to wait
* @param thread
* @param time
* @param thread The thread to add
* @param time start time of the thread
* @return true if the thread needs to wait, false if it can continue
*/
private synchronized boolean queueThis(Thread thread, Long time) {

View file

@ -82,7 +82,7 @@ final public class VisualizationCaches {
/**
* Rebuild the specifield caches
* @param executors
* @param executors Caching RDF executors
*/
public static void rebuild(CachingRDFServiceExecutor... executors) {
if (executors != null) {

View file

@ -36,7 +36,6 @@ public class Activity extends Individual {
* The 2 choices, in order, are,
* 1. parsed year from xs:DateTime object saved in core:dateTimeValue
* 2. Default Publication Year
* @return
*/
public String getParsedActivityYear() {
@ -47,7 +46,6 @@ public class Activity extends Individual {
/**
* This method should be used to get the raw date & not the parsed publication year.
* For the later use getParsedPublicationYear.
* @return
*/
public String getActivityDate() {
return activityDate;

View file

@ -155,9 +155,9 @@ public class PDFDocument {
/**
* Prints a square and fills half of it with a gray rectangle.
* @param x
* @param y
* @param cb
* @param x X coordinate
* @param y Y coordinate
* @param cb Content byte
* @throws Exception
*/
public void pictureBackdrop(float x, float y, PdfContentByte cb) throws Exception {
@ -172,9 +172,9 @@ public class PDFDocument {
/**
* Prints 3 circles in different colors that intersect with eachother.
* @param x
* @param y
* @param cb
* @param x X coordinate
* @param y Y coordinate
* @param cb Content byte
* @throws Exception
*/
public void pictureCircles(float x, float y, PdfContentByte cb) throws Exception {

View file

@ -77,8 +77,7 @@ public class UtilityFunctions {
/**
* This method is used to return a mapping between activity year & all the collaborators
* that published with ego in that year.
* @param collaborationData
* @return
* @param collaborationData Collaboration data
*/
public static Map<String, Set<Collaborator>> getActivityYearToCollaborators(
CollaborationData collaborationData) {
@ -121,8 +120,7 @@ public class UtilityFunctions {
/**
* Currently the approach for slugifying filenames is naive. In future if there is need,
* we can write more sophisticated method.
* @param textToBeSlugified
* @return
* @param textToBeSlugified Text to process
*/
public static String slugify(String textToBeSlugified) {
String textBlockSeparator = "-";
@ -186,7 +184,6 @@ public class UtilityFunctions {
* The 2 choices, in order, are,
* 1. parsed year from core:DateTime object saved in core:dateTimeValue
* 2. Default Entity Year
* @return
*/
public static String getValidYearFromCoreDateTimeString(String inputDate,
String defaultYearInCaseOfError) {
@ -279,9 +276,8 @@ public class UtilityFunctions {
*
* This method will test whether the current uri is based off of default namespace. If so,
* go ahead & provide local name.
* @param givenURI
* @param vitroRequest
* @return
* @param givenURI URI
* @param vitroRequest Vitro Request
*/
public static String getIndividualLocalName(String givenURI, VitroRequest vitroRequest) {