|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.claudio.pediacache.data.Source
public class Source
Each of the wilipedia sites is represented by a source. This object remebers the URL, if it is selected by the user and when it was last seen online.
Copyright (C) 2006 Claudio Nieder <private@claudio.ch>, CH-8610 Uster
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Field Summary | |
---|---|
static long |
onlineLimit
Time limit in which a page is assumed online without rechecking. |
Constructor Summary | |
---|---|
Source(java.net.URL urlArg)
Create a source item. |
Method Summary | |
---|---|
void |
checkIfOnline()
Request an active check to see if the source can be reached. |
java.lang.String |
getLanguage()
|
java.lang.String |
getLocalLanguage()
|
java.net.URL |
getUrl()
|
boolean |
isSelected()
|
static void |
main(java.lang.String[] args)
Print license. |
boolean |
maybeOnline()
Return a good guess wether this source is reachable by comparing the current time with the last time the site was online. |
void |
notOnline()
This methode can be called when the site is not seen online, so it will update the time when it was last tested. |
void |
seenOnline()
This methode can be called when the site is seen online, so it will update the time when it was last detected online. |
void |
setLanguage(java.lang.String languageArg)
|
void |
setLocalLanguage(java.lang.String localLanguageArg)
|
void |
setSelected(boolean selectedArg)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long onlineLimit
Constructor Detail |
---|
public Source(java.net.URL urlArg)
urlArg
- Method Detail |
---|
public java.net.URL getUrl()
public void seenOnline()
public void notOnline()
public void checkIfOnline()
public boolean maybeOnline()
public java.lang.String getLanguage()
public void setLanguage(java.lang.String languageArg)
languageArg
- the language to setpublic java.lang.String getLocalLanguage()
public void setLocalLanguage(java.lang.String localLanguageArg)
localLanguageArg
- the localLanguage to setpublic boolean isSelected()
public void setSelected(boolean selectedArg)
selectedArg
- the selected to setpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static void main(java.lang.String[] args)
args
- ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |