# HG changeset patch # User one # Date 1346130286 -32400 # Node ID 2be3358689cb818aaf291d8c40e3fa3cfd44f04a # Parent f9ef906676ebd0e7c81e8f0719fad450954bcef0 add WikiPage.java diff -r f9ef906676eb -r 2be3358689cb src/wikigraph/WikiPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/wikigraph/WikiPage.java Tue Aug 28 14:04:46 2012 +0900 @@ -0,0 +1,53 @@ +package wikigraph; + +import org.neo4j.graphdb.Node; + +public class WikiPage { + + private String title; + private long id; + private long rank; + + WikiPage() { + this.title = ""; + this.id = 0; + this.rank = 0; + } + + WikiPage(Node node) { + this.title = (String) node.getProperty(LinkToNode.PAGE_TITLE); + this.id = node.getId(); + this.rank = (Long) node.getProperty(LinkToNode.PAGE_RANK); + } + + WikiPage(String title, long id, long rank) { + this.title = title; + this.id = id; + this.rank = rank; + } + + String getTitle() { + return title; + } + + long getId() { + return id; + } + + long getRank() { + return rank; + } + + void setTitle(String title) { + this.title = title; + } + + void setId(long id) { + this.id = id; + } + + void setRank(long rank) { + this.rank = rank; + } + +}