|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.resources.LookupState
public class LookupState
This object keeps the state info around while looking up an entity.
Constructor Summary | |
---|---|
LookupState(RequestInterface request)
Create a lookup state to handle the given request on behalf of client. |
|
LookupState(java.lang.String uri)
Construct a lookup state to be resolved internnaly by the server. |
Method Summary | |
---|---|
int |
countRemainingComponents()
How much components have not yet been looked up in this state. |
java.lang.String |
getFragment()
Get the fragment part of the URL, if any. |
java.lang.String |
getNextComponent()
Get next part of the URL to be look for. |
java.lang.String |
getQuery()
Get the query part of the URL, if any. |
java.lang.String |
getRemainingPath()
Get the remaiing path, without consuming it. |
java.lang.String |
getRemainingPath(boolean consume)
Get the remaining path. |
RequestInterface |
getRequest()
Get this lookup state request. |
java.lang.String |
getType()
Get the type part of the URL, if any. |
java.lang.String |
getURI()
Get this lookpu state full URI. |
boolean |
hasMoreComponents()
Does this look up state has more components to be looked for. |
boolean |
hasRequest()
Is this lookup state object associated with a request ? |
boolean |
isDirectory()
Is the requested URI a directory URI ? |
boolean |
isInternal()
Is this lookup state internal to the server. |
void |
markInternal()
Mark this lookup state as being done internally. |
protected void |
parseURI()
Parse the given URI into an array of hierarchical components. |
java.lang.String |
peekNextComponent()
Get the next component, without consuming it. |
static java.lang.String |
unescape(java.lang.String s)
Unescape a escaped string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LookupState(RequestInterface request) throws ProtocolException
client
- The client that issued the request.request
- The request whose URI is to bee looked up.
ProtocolException
- if an error relative to the protocol occurspublic LookupState(java.lang.String uri) throws ProtocolException
uri
- The URI to be looked up.
ProtocolException
- if an error relative to the protocol occursMethod Detail |
---|
public static java.lang.String unescape(java.lang.String s)
s
- The string to be unescaped
protected void parseURI() throws ProtocolException
The query string and the fragment are recorded into the request as the query and frag attributes.
ProtocolException
- if unable to parsepublic java.lang.String getFragment()
public java.lang.String getQuery()
public java.lang.String getType()
public boolean isDirectory()
public java.lang.String getURI()
public final java.lang.String getNextComponent()
public final java.lang.String peekNextComponent()
public final java.lang.String getRemainingPath(boolean consume)
consume
- If true, consume the components,
otherwise, just peek them.
public final java.lang.String getRemainingPath()
public boolean hasMoreComponents()
public int countRemainingComponents()
public final RequestInterface getRequest()
public boolean hasRequest()
public void markInternal()
public boolean isInternal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |