de.scheisseichfindemalkeinen.hoster
Class URLParseObject

java.lang.Object
  extended by de.scheisseichfindemalkeinen.hoster.URLParseObject

public class URLParseObject
extends java.lang.Object

This class is used as arguments for parsing the urls


Constructor Summary
URLParseObject(java.lang.String containerURL, java.lang.String thumbURL, Pic pic)
          Constructor
 
Method Summary
protected  void addHoster(Hoster hoster)
          Set the last Host which parsed the URL
 void addInfo(java.lang.String name, java.lang.Object value)
          Add an Object to the info-array
 boolean checkExistInfo(java.lang.String name)
          Check if an object exists for a key
protected  void finalize()
           
 java.lang.String getContainerURL()
          Returns the last container URL
 java.util.Vector<java.lang.String> getContainerURLs()
          Returns the array with the container-URLs.
 java.lang.String getCorrectedFilename()
          Returns the corrected filename
 java.lang.String getDirectLink()
          Returns the parsed URL
 java.lang.String getFirstContainerURL()
          Returns the first container URL
 java.lang.String getHosterStackTrace()
          Returns the HosterStackTrace
 java.lang.Object getInfo(java.lang.String name)
          Get the object for a key
 Host getLastHost()
          Returns the last Host which parsed the URL or null if there isn't any
 Hoster getLastHoster()
          Returns the last Host which parsed the URL
 Rule getLastRule()
          Returns the last Host which parsed the URL or null if there isn't any
 Pic getPic()
          Returns the pic
 java.lang.String getThumbURL()
          Return the thumbnail URL
protected  boolean isLoop()
          Method to detect if this object is in a loop when parsing.
 void setContainerURL(java.lang.String containerURL)
          Set the container URL
 void setCorrectedFilename(java.lang.String correctedFilename)
          Set the corrected filename
 void setDirectLink(java.lang.String directLink)
          Set the parsed URL
 void setThumbURL(java.lang.String thumbURL)
          Set the thumbnail URL
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLParseObject

public URLParseObject(java.lang.String containerURL,
                      java.lang.String thumbURL,
                      Pic pic)
Constructor

Parameters:
containerURL - Container-URL
thumbURL - Thumbnail-URL
pic - The Pic
Method Detail

addInfo

public void addInfo(java.lang.String name,
                    java.lang.Object value)
Add an Object to the info-array

Parameters:
name - Key
value - Object

checkExistInfo

public boolean checkExistInfo(java.lang.String name)
Check if an object exists for a key

Parameters:
name - Key
Returns:
TRUE/FALSE

getInfo

public java.lang.Object getInfo(java.lang.String name)
Get the object for a key

Parameters:
name - Key
Returns:
Object

getPic

public Pic getPic()
Returns the pic

Returns:
the pic

getDirectLink

public java.lang.String getDirectLink()
Returns the parsed URL

Returns:
the directLink

setDirectLink

public void setDirectLink(java.lang.String directLink)
Set the parsed URL

Parameters:
directLink - the directLink to set

getCorrectedFilename

public java.lang.String getCorrectedFilename()
Returns the corrected filename

Returns:
the correctedFilename

setCorrectedFilename

public void setCorrectedFilename(java.lang.String correctedFilename)
Set the corrected filename

Parameters:
correctedFilename - the correctedFilename to set

getLastHoster

public Hoster getLastHoster()
Returns the last Host which parsed the URL

Returns:
the lastHost

getLastHost

public Host getLastHost()
Returns the last Host which parsed the URL or null if there isn't any

Returns:
the lastHost

getLastRule

public Rule getLastRule()
Returns the last Host which parsed the URL or null if there isn't any

Returns:
the lastHost

addHoster

protected void addHoster(Hoster hoster)
Set the last Host which parsed the URL

Parameters:
lastHost - the lastHost to set

getHosterStackTrace

public java.lang.String getHosterStackTrace()
Returns the HosterStackTrace

Returns:
HosterStackTrace

getContainerURLs

public java.util.Vector<java.lang.String> getContainerURLs()
Returns the array with the container-URLs. It returns just a copy, not the real internal array, because it should not be possible for outside objects changing the array.

Returns:
Container-URLs

getFirstContainerURL

public java.lang.String getFirstContainerURL()
Returns the first container URL

Returns:
the first containerURL

getContainerURL

public java.lang.String getContainerURL()
Returns the last container URL

Returns:
the last containerURL

setContainerURL

public void setContainerURL(java.lang.String containerURL)
Set the container URL

Parameters:
containerURL - the containerURL to set

getThumbURL

public java.lang.String getThumbURL()
Return the thumbnail URL

Returns:
the thumbURL

setThumbURL

public void setThumbURL(java.lang.String thumbURL)
Set the thumbnail URL

Parameters:
thumbURL - the thumbURL to set

isLoop

protected boolean isLoop()
Method to detect if this object is in a loop when parsing. Loop means, that this object is parsed, by the same hostclass or rule over and over. This method is not yet implemented, i don't know how i will make this. There could also be a loop between to hostclasses. Example: HostClass1 parses the Object and let it parsed again by the hostmanager, now the url is parsed by HostClass2 and this class let it parse again by the hostmanager. Now the url matches again the HostClass1. And so on... But this could also be a required by a hostclass, to parse an object a few times by hisself.

Returns:
True if object is parsed in a loop

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable