Mercurial > hg > Members > nobuyasu > TestNeo4j
changeset 22:2be3358689cb draft
add WikiPage.java
author | one |
---|---|
date | Tue, 28 Aug 2012 14:04:46 +0900 (2012-08-28) |
parents | f9ef906676eb |
children | 21902773e530 |
files | src/wikigraph/WikiPage.java |
diffstat | 1 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /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; + } + +}