Package net.relatedwork.shared.dto

Examples of net.relatedwork.shared.dto.Author


        if (n == null) {
            System.out.println("URI INDEX ERROR. uri " + uri + " has more than one associated node.");
            return result;
        }

        Author author = authorAccessHandler.authorFromNode(n);

        if (author == null) {
            System.out.println("Cannot render Author page for node: "+n.toString() +", uri: " + uri);
            return result;
        }
View Full Code Here


    /**
     * Construct the Author object from node.
     */
    public Author authorFromNode(Node n) {
        Author author = authorFromNode(n, (Double)null);
        if (author == null) return null;
        Double pageRank = (Double) n.getProperty(DBNodeProperties.PAGE_RANK_VALUE);
        author.setScore(pageRank);
        return author;
    }
View Full Code Here

    public Author authorFromNode(Node n, Double score) {
        if (n == null ||  !NodeType.isAuthorNode(n) || !n.hasProperty(DBNodeProperties.PAGE_RANK_VALUE) ){
            return null;
        }

        Author author = new Author();
        author.setDisplayName((String) n.getProperty(DBNodeProperties.AUTHOR_NAME));
        author.setUri((String)n.getProperty(DBNodeProperties.URI));
        author.setScore(score);
        return author;
    }
View Full Code Here

        Paper p = (Paper)r;
        panel.add(paperLabel);
        panel.add(p.getAuthorLink());
        getView().addResultElement(panel);
      }else if (r instanceof Author){
        Author a = (Author)r;
        panel.add(authorLabel);
        panel.add(a.getAuthorLink());
        getView().addResultElement(panel);
      }
    } 
  }
View Full Code Here

      }
     
      @Override
      public void onSuccess(DisplayAuthorResult result) {
                Author author = new Author();
                author.setDisplayName(result.getName());
                author.setUri(result.getUri());

        getView().setAuthorName(result.getName());
       
        similarAuthorsListPresenter.setTitle("Similar authors");
        similarAuthorsListPresenter.setList(result.getSimilarAuthors(25),5);
       
        citedAuthorsListPresenter.setTitle("cites:");
        citedAuthorsListPresenter.setList(result.getCitedAuthors(25),5);
       
        citedByAuthorsListPresenter.setTitle("cited by:");
        citedByAuthorsListPresenter.setList(result.getCitedByAuthors(25),5);
       
        coAuthorsListPresenter.setTitle("Coauthors");
        coAuthorsListPresenter.setList(result.getCoAuthors(25),5);
       
        paperListPresenter.setTitle("Articles");
        paperListPresenter.setList(result.getWrittenPapers(30),10);
       
        // hide Loading overlay
        getEventBus().fireEvent(new LoadingOverlayEvent(false));

        getEventBus().fireEvent(new SidebarReloadedEvent(result.getSidebar(), author_url));
       
        getEventBus().fireEvent(new DiscussionsReloadedEvent(author.getUri(), result.getComments()));
      }
    });
   
  }
View Full Code Here

TOP

Related Classes of net.relatedwork.shared.dto.Author

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.