<%
int rank = 0;
for ( Individual authorship : authorships ) {
rank = Integer.valueOf(authorship.getDataValue(rankUri));
Individual author = authorship.getRelatedIndividual(linkedAuthorProperty);
if ( author != null ) {
request.setAttribute("author", author);
%>
<%-- RY Should use author short view here instead? --%>
<%
}
}
// A new author will be ranked last when added.
// This doesn't handle gaps in the ranking: vreq.setAttribute("rank", authorships.size()+1);
vreq.setAttribute("rank", rank + 1);
%>
<%
if (authorships.size() == 0) {
%>
This publication currently has no authors specified.
<%
}
%>
" >
Add an Author
${initialHint}
${initialHint}
<%-- RY maybe make this a label and input field. See what looks best. --%>
" />
* required fields
<%!
// We'll just rely on rdfs:label for now. In future, the label will be created by the app from
// last name, first name, and middle name fields, so we don't have to worry about inconsistent
// ordering.
/*
public String getAuthorName(Individual author) {
String name;
String lastName = author.getDataValue("http://xmlns.com/foaf/0.1/lastName");
String firstName = author.getDataValue("http://xmlns.com/foaf/0.1/firstName");
if (lastName != null && firstName != null) {
name = lastName + ", " + firstName;
String middleName = author.getDataValue("http://vivoweb.org/ontology/core#middleName");
if (middleName != null) {
name += " " + middleName;
}
}
else {
name = author.getName();
}
return name;
}
*/
%>