Changeset 8219

Show
Ignore:
Timestamp:
02/11/10 13:57:36 (6 months ago)
Author:
dragisak
Message:

Fix missing collaborative authors in the feed.

Addresses JO-12697

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/struts2/AmbraFeedResult.java

    r8133 r8219  
    22 * $Id::                                                      $ 
    33 * 
    4  * Copyright (c) 2006-2009 by Topaz, Inc. http://topazproject.org 
     4 * Copyright (c) 2006-2010 by Topaz, Inc. http://topazproject.org 
    55 * 
    66 * Licensed under the Apache License, Version 2.0 (the "License"); 
     
    2828import com.sun.syndication.feed.atom.Person; 
    2929import com.sun.syndication.io.WireFeedOutput; 
     30 
     31import java.util.HashSet; 
    3032import java.util.List; 
    3133import java.util.ArrayList; 
     
    699701  private List<Person> newContributorsList(Article article) { 
    700702    List<Person> newContributors = new ArrayList<Person>(); 
     703 
     704    /* 
     705     * FIXME: contributors field exists in DublinCore but it's not being populated on ingest. 
     706     * article.getDublinCore().getContributors() is useless at the moment. 
     707     */ 
    701708    Set<String> contributors = article.getDublinCore().getContributors(); 
     709 
     710    Citation citation = article.getDublinCore().getBibliographicCitation(); 
     711    if (citation != null) { 
     712      // Avoid duplicates 
     713      contributors = new HashSet<String>(contributors);  
     714      contributors.addAll(citation.getCollaborativeAuthors()); 
     715    } 
    702716 
    703717    for (String contributor: contributors) {