view src/wikigraph/WikiPage.java @ 22:2be3358689cb draft

add WikiPage.java
author one
date Tue, 28 Aug 2012 14:04:46 +0900
parents
children 21902773e530
line wrap: on
line source

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;
	}

}