NIHVIVO-646 Comments
This commit is contained in:
parent
1ce57c6f01
commit
239ee45d46
1 changed files with 10 additions and 5 deletions
|
@ -257,7 +257,9 @@ SPARQL queries for existing values. --%>
|
||||||
String vivoCore = "http://vivoweb.org/ontology/core#";
|
String vivoCore = "http://vivoweb.org/ontology/core#";
|
||||||
|
|
||||||
List<Individual> authorships = infoResource.getRelatedIndividuals(predicateUri);
|
List<Individual> authorships = infoResource.getRelatedIndividuals(predicateUri);
|
||||||
|
// We could do this instead, then iterate through the statements, but we still can't use PropertyRanker because
|
||||||
|
// it compares Property objects rather than statements.
|
||||||
|
// List<ObjectPropertyStatement> authorshipStmts = infoResource.getObjectPropertyStatements(vivoCore + "informationResourceInAuthorship");
|
||||||
vreq.setAttribute("infoResourceName", infoResource.getName());
|
vreq.setAttribute("infoResourceName", infoResource.getName());
|
||||||
|
|
||||||
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
||||||
|
@ -299,15 +301,18 @@ SPARQL queries for existing values. --%>
|
||||||
<%
|
<%
|
||||||
String rankPredicateUri = vivoCore + "authorRank";
|
String rankPredicateUri = vivoCore + "authorRank";
|
||||||
|
|
||||||
// RY Should get authorRank object property stmts rather than Authorship individuals; then can use
|
// RY Would be nice to use PropertyRanker, which is used on the Individual page to sort properties,
|
||||||
// existing PropertyRanker. But since PropertyRanker is a private class of EntityMergedPropertyListController,
|
// but the types are wrong. We could get the ObjectPropertyStatements instead of the Authorships, but
|
||||||
// this isn't so straightforward.
|
// PropertyRanker.compare uses a list of Property objects.
|
||||||
DataPropertyComparator comp = new DataPropertyComparator(rankPredicateUri);
|
DataPropertyComparator comp = new DataPropertyComparator(rankPredicateUri);
|
||||||
Collections.sort(authorships, comp);
|
Collections.sort(authorships, comp);
|
||||||
|
|
||||||
int maxRank = 0;
|
int maxRank = 0;
|
||||||
int authorshipCount = 0;
|
int authorshipCount = 0;
|
||||||
|
|
||||||
|
// for ( ObjectPropertyStatement stmt : authorshipStmts) {
|
||||||
|
// Individual authorship = stmt.getObject();
|
||||||
|
|
||||||
for ( Individual authorship : authorships ) {
|
for ( Individual authorship : authorships ) {
|
||||||
Individual author = authorship.getRelatedIndividual(vivoCore + "linkedAuthor");
|
Individual author = authorship.getRelatedIndividual(vivoCore + "linkedAuthor");
|
||||||
if ( author != null ) {
|
if ( author != null ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue