/*
 * Created on 10.Ağu.2005
 */
package com.isoft.mmcd.application.handlers.controllers;

import src.utils.htmlUtils;

public class AyetInfo2 
{
	//S.94     (30) Rum          17-27   
	//S.40     (30) Rum          17, 18
	//S.25, 26 (9) Tevbe       111  
	//S.458   (98) Beyyine     6… (iktibasen)
	
	private String pageStrings ;
	private String info ;
	private int bookno;
	private int id ;
	/*private String ayetNoAyet;
	private String locationInAyet ;
	private String text ;
	*/
	public AyetInfo2 (String text ,int curentBook ,int enumeration)
	{
		//System.out.println("text:"+text);
		htmlUtils hut = new htmlUtils();
		String cleaned = 	hut.removeTags( text );
		cleaned = cleaned.replaceAll("&nbsp;","");
		int parantezIndex = cleaned.indexOf("(");
		this.pageStrings = cleaned.substring( 0 , parantezIndex );
		cleaned = cleaned.substring( parantezIndex );
		this.info = cleaned;
		this.bookno = curentBook;
		this.id =  enumeration ;
		/*
		int rightParantezIndex = cleaned.indexOf("(");
		
		for( int i =rightParantezIndex ; i < cleaned.length() ; i++)
		{
			char ch = cleaned.charAt( i );
			if( Character.isDigit( ch ) )
			{
				this.ayetNoAyet = cleaned.substring( 0 , i );
				cleaned = cleaned.substring( i );
				break;
			}
		}*/
		
		
	}
	
	public String getDumpText()
	{
		String dumpText = "<p id="+this.id+"x "+" bookno="+this.bookno +"x  "+"pages="+this.pageStrings+"x >"+this.info+"</p>";
		return dumpText;
	}

	public int getBookno() {
		return bookno;
	}
	public void setBookno(int bookno) {
		this.bookno = bookno;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
}
