clothing_search_engine.crawler
Class Url

java.lang.Object
  extended by clothing_search_engine.crawler.Url

public class Url
extends java.lang.Object

Author:
Sara

Constructor Summary
Url(java.lang.String m_url)
          Constructor
Url(java.lang.String m_url, java.lang.String m_name)
          Constructor
Url(java.lang.String m_url, java.lang.String m_name, java.lang.String m_image, int m_degree)
          Constructor
 
Method Summary
 int getDegree()
          get the degree (this is number of times visited)
 java.lang.String getImage()
          get the url of the image associated with the url for:
 java.lang.String getName()
          get the name associated with the url
 java.lang.String getUrl()
          get the url as a string
static void main(java.lang.String[] args)
           
static Url parseLink(java.lang.String link, int m_degree)
          Parse the link to extract url, and name or image
 void setImage(java.lang.String m_image)
          Set the image
 void setName(java.lang.String m_name)
          Set the name
 void setUrl(java.lang.String m_url)
          Set the url
 java.lang.String toString()
          Print all the url info
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Url

public Url(java.lang.String m_url,
           java.lang.String m_name,
           java.lang.String m_image,
           int m_degree)
Constructor

Parameters:
m_url -
m_name -
m_image -
m_degree -

Url

public Url(java.lang.String m_url)
Constructor

Parameters:
m_url -

Url

public Url(java.lang.String m_url,
           java.lang.String m_name)
Constructor

Parameters:
m_url -
m_name -
Method Detail

setUrl

public void setUrl(java.lang.String m_url)
Set the url

Parameters:
m_url -

setImage

public void setImage(java.lang.String m_image)
Set the image

Parameters:
m_image -

setName

public void setName(java.lang.String m_name)
Set the name

Parameters:
m_name -

getUrl

public java.lang.String getUrl()
get the url as a string

Returns:
String - url

getName

public java.lang.String getName()
get the name associated with the url

Returns:
String - name

getImage

public java.lang.String getImage()
get the url of the image associated with the url for:

Returns:
String - image url

getDegree

public int getDegree()
get the degree (this is number of times visited)

Returns:
int - degree

parseLink

public static Url parseLink(java.lang.String link,
                            int m_degree)
Parse the link to extract url, and name or image

Parameters:
link -
m_degree -
Returns:

toString

public java.lang.String toString()
Print all the url info

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
Parameters:
args -