de.rw7.htmltools
Class LinkFile
java.lang.Object
|
+--de.rw7.htmltools.LinkTag
|
+--de.rw7.htmltools.LinkFile
- public class LinkFile
- extends LinkTag
Wraps an url and holds additional information about the url. Each url is associated to exactly one LinkFile.
| Field Summary |
protected java.util.Hashtable |
anchors
Contains all anchors of this url. |
protected java.lang.String |
error
A description of the error, causing the url to be absent. |
(package private) boolean |
external
Whether the url is external to the root url. |
protected java.lang.String |
rootDir
|
protected java.lang.String |
rootHost
|
(package private) int |
state
Holds the status of the url. |
(package private) java.net.URL |
url
The associated url. |
protected java.lang.String |
urlS
The formatted url, relative to the root url. |
| Constructor Summary |
LinkFile(java.lang.String urlS, java.lang.String error)
|
LinkFile(java.net.URL url, java.lang.String rootHost, java.lang.String rootDir)
|
| Methods inherited from class java.lang.Object |
<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
url
java.net.URL url
- The associated url.
state
int state
- Holds the status of the url.
- 0: vakant, yet to be checked
- 1: lookup, currently checking
- 2: found, url is valid
- 3: absent, url is not valid
error
protected java.lang.String error
- A description of the error, causing the url to be absent.
external
boolean external
- Whether the url is external to the root url. External means, that it's not in the same directory or one of the subdirectorys of the root url. Here, the root url given to the constructor is used.
anchors
protected java.util.Hashtable anchors
- Contains all anchors of this url. The Hashtable maps from the anchors name to the anchors LinkAnchor-Object.
-
- See Also:
LinkAnchor
rootHost
protected java.lang.String rootHost
rootDir
protected java.lang.String rootDir
urlS
protected java.lang.String urlS
- The formatted url, relative to the root url.
LinkFile
public LinkFile(java.net.URL url,
java.lang.String rootHost,
java.lang.String rootDir)
LinkFile
public LinkFile(java.lang.String urlS,
java.lang.String error)
getState
public final int getState()
getAnchors
public final java.util.Hashtable getAnchors()
toString
public final java.lang.String toString()
-
- Overrides:
toString in class java.lang.Object
getError
public final java.lang.String getError()
-
- Overrides:
getError in class LinkTag
addReferrer
final void addReferrer(LinkFile referrer)
toLookup
final void toLookup()
toFound
final void toFound(LinkFrontend fe)
toAbsent
final void toAbsent(java.lang.Exception e)
anchorRequired
final LinkAnchor anchorRequired(java.lang.String anchor,
LinkFrontend fe)
anchorFound
final void anchorFound(java.lang.String anchor)