de.scheisseichfindemalkeinen.keywords
Class Keyword

java.lang.Object
  extended by de.scheisseichfindemalkeinen.keywords.Keyword
All Implemented Interfaces:
java.lang.Comparable<Keyword>

public class Keyword
extends java.lang.Object
implements java.lang.Comparable<Keyword>

A Keyword is an Object with a title, keywords, absolute DownloadPath, relative DownloadPath and a flag which defines if the absolute or relative path is used. With this keywords the user can define a specific path on the harddisk for specific keywords. An example: The user wants that all files containing "Nora Tschirner" in the URL downloaded to C:\Images\Nora Tschirner\ So the user defines a new Keyword. Sets the title to "Nora Tschirner". Then set the keywords for the Keyword. Keywords can be seperator by a space. Groups of keywords can be seperated by a ; Example for keywords: Nora Tschirner or Nora Tschirner; Nora Marie Tschirner Then the user defines an absolute path or a relative path. Example: C:\Images\Nora Tschirner\ or Nora Tschirner\ or N\Nora Tschirner or something else Then the user has the set the flag to use absolute or relative path.


Constructor Summary
Keyword(java.lang.String title, java.lang.String keywords, java.lang.String downloadPath, boolean relativePath, java.lang.String relativeDownloadPath)
          Constructor
 
Method Summary
 int compareTo(Keyword o)
           
 java.lang.String getAdderDownloadPath()
          Returns the target path This method checks the flag an then returns the absolute or relative path
 java.lang.String getDownloadPath()
          Returns the absolute target path
 java.lang.String getKeywords()
          Returns the keywords
 java.lang.String getRelativeDownloadPath()
          Returns the relative target path
 java.lang.String getTitle()
          Returns the title
 boolean isRelativePath()
          Returns if relative path is used
 void setDownloadPath(java.lang.String downloadPath)
          Sets the absolute target path The path is only set when there are no forbidden chars in it! Forbidden chars are: : * ? < > "
 void setKeywords(java.lang.String keywords)
          Sets the keywords
 void setRelativeDownloadPath(java.lang.String relativeDownloadPath)
          Sets the relative target path The path is only set when there are no forbidden chars in it! Forbidden chars are: : * ? < > "
 void setRelativePath(boolean relativePath)
          Sets if relative path is used or not
 void setTitle(java.lang.String title)
          Sets the title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Keyword

public Keyword(java.lang.String title,
               java.lang.String keywords,
               java.lang.String downloadPath,
               boolean relativePath,
               java.lang.String relativeDownloadPath)
Constructor

Parameters:
title - Title
keywords - keywords
downloadPath - absolute Path
relativePath - use relative Path
relativeDownloadPath - relative Path
Method Detail

getAdderDownloadPath

public java.lang.String getAdderDownloadPath()
Returns the target path This method checks the flag an then returns the absolute or relative path

Returns:
Target path

getDownloadPath

public java.lang.String getDownloadPath()
Returns the absolute target path

Returns:
Target path

setDownloadPath

public void setDownloadPath(java.lang.String downloadPath)
Sets the absolute target path The path is only set when there are no forbidden chars in it! Forbidden chars are: : * ? < > "

Parameters:
downloadPath - absolute Path

getKeywords

public java.lang.String getKeywords()
Returns the keywords

Returns:
keywords

setKeywords

public void setKeywords(java.lang.String keywords)
Sets the keywords

Parameters:
keywords - keywords

isRelativePath

public boolean isRelativePath()
Returns if relative path is used

Returns:
Use relative path

setRelativePath

public void setRelativePath(boolean relativePath)
Sets if relative path is used or not

Parameters:
relativePath - Use relative path

getTitle

public java.lang.String getTitle()
Returns the title

Returns:
Title

setTitle

public void setTitle(java.lang.String title)
Sets the title

Parameters:
title - Title

getRelativeDownloadPath

public java.lang.String getRelativeDownloadPath()
Returns the relative target path

Returns:
Relative path

setRelativeDownloadPath

public void setRelativeDownloadPath(java.lang.String relativeDownloadPath)
Sets the relative target path The path is only set when there are no forbidden chars in it! Forbidden chars are: : * ? < > "

Parameters:
relativeDownloadPath - Relative path

compareTo

public int compareTo(Keyword o)
Specified by:
compareTo in interface java.lang.Comparable<Keyword>