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.
 
Fields inherited from class de.rw7.htmltools.LinkTag
referrers
 
Constructor Summary
LinkFile(java.lang.String urlS, java.lang.String error)
           
LinkFile(java.net.URL url, java.lang.String rootHost, java.lang.String rootDir)
           
 
Method Summary
(package private)  void addReferrer(LinkFile referrer)
           
(package private)  void anchorFound(java.lang.String anchor)
           
(package private)  LinkAnchor anchorRequired(java.lang.String anchor, LinkFrontend fe)
           
 java.util.Hashtable getAnchors()
           
 java.lang.String getError()
           
 int getState()
           
(package private)  void toAbsent(java.lang.Exception e)
           
(package private)  void toFound(LinkFrontend fe)
           
(package private)  void toLookup()
           
 java.lang.String toString()
           
 
Methods inherited from class de.rw7.htmltools.LinkTag
getReferrers, replaceBackslashes
 
Methods inherited from class java.lang.Object
<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

url

java.net.URL url
The associated url.

state

int state
Holds the status of the url.

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.
Constructor Detail

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)
Method Detail

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)