Ila

org.topoweb.ila.protocol
Class RequestParser

java.lang.Object
  |
  +--org.topoweb.ila.protocol.RequestParser
All Implemented Interfaces:
NodeConstants, ProtocolConstants, StateConstants

public class RequestParser
extends java.lang.Object
implements ProtocolConstants, NodeConstants, StateConstants

Parses a request.

Author:
Babak Farhang

Field Summary
 
Fields inherited from interface org.topoweb.ila.protocol.ProtocolConstants
PC_BACKLINK_COUNT, PC_BACKLINKS, PC_CO_BACKLINK_COUNT, PC_CO_FORELINK_COUNT, PC_CONTENT_LENGTH, PC_CONTENT_TYPE, PC_ERROR_CODE, PC_EXPIRATION, PC_FAIL, PC_FIRST, PC_FORELINK_COUNT, PC_FORELINKS, PC_GET_KNOWN, PC_GET_LINK_NODE, PC_GET_LINKS, PC_GET_NODE, PC_HI, PC_HTTP, PC_ID, PC_ILA, PC_INCOMMUNICADO, PC_LAST, PC_LAST_MODIFIED, PC_LINK_NODE, PC_LINK_TYPE, PC_LO, PC_MAX_COUNT, PC_NODE, PC_NODE_SET, PC_OKAY, PC_ORI, PC_PAGE, PC_REGISTER, PC_REQUEST, PC_RESPONSE, PC_SIZE, PC_STATE, PC_STATUS, PC_SYNC_VERSION_ID, PC_SYNC_VERSION_TIMESTAMP, PC_TITLE, PC_USER, PC_USER_AGENT, PC_USER_NAMESPACE, PC_VERSION, PC_VERSION_ID, PC_VERSION_TIMESTAMP
 
Fields inherited from interface org.topoweb.ila.NodeConstants
BACK, FIRST_PAGE, FORE, LAST_PAGE, LINK_MASK, PAGE_MASK
 
Fields inherited from interface org.topoweb.ila.StateConstants
NF, NK, NV, OK
 
Constructor Summary
RequestParser()
           
 
Method Summary
protected  void checkVersion(java.lang.String version)
          Checks the protocol version.
 void clear()
           
 org.w3c.dom.Element getEnvelop()
          Returns the "envelop" element.
 org.w3c.dom.Element getFunction()
          Returns the "function" element.
 int getLinkType(org.w3c.dom.Element func)
           
 int getMaxCount(org.w3c.dom.Element func)
           
 org.topoweb.net.Ori getOri(org.w3c.dom.Element func)
           
 int getPage(org.w3c.dom.Element func)
           
 org.topoweb.util.StringRange getRange(org.w3c.dom.Element func)
           
 org.w3c.dom.Element getRequest()
          Returns the "request" element.
 java.lang.String getTxnId()
          Returns the transaction ID.
 java.lang.String getVersion()
          Returns the "version" string.
 void load(org.w3c.dom.Element env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestParser

public RequestParser()
Method Detail

clear

public void clear()

load

public void load(org.w3c.dom.Element env)
          throws IlaProtocolException
IlaProtocolException

getEnvelop

public org.w3c.dom.Element getEnvelop()
Returns the "envelop" element.


getRequest

public org.w3c.dom.Element getRequest()
Returns the "request" element.


getFunction

public org.w3c.dom.Element getFunction()
Returns the "function" element.


getVersion

public java.lang.String getVersion()
Returns the "version" string.


getTxnId

public java.lang.String getTxnId()
Returns the transaction ID.


getRange

public org.topoweb.util.StringRange getRange(org.w3c.dom.Element func)
                                      throws IlaProtocolException
IlaProtocolException

getPage

public int getPage(org.w3c.dom.Element func)
            throws IlaProtocolException
IlaProtocolException

getMaxCount

public int getMaxCount(org.w3c.dom.Element func)
                throws IlaProtocolException
IlaProtocolException

getOri

public org.topoweb.net.Ori getOri(org.w3c.dom.Element func)
                           throws IlaProtocolException
IlaProtocolException

getLinkType

public int getLinkType(org.w3c.dom.Element func)
                throws IlaProtocolException
IlaProtocolException

checkVersion

protected void checkVersion(java.lang.String version)
                     throws IlaProtocolException
Checks the protocol version. The base implementation performs no checks.

Parameters:
version - the version string
Throws:
IlaProtocolException - if this instance cannot handle the protocol version requested by the client

Ila

Copyright (C) 2002 Babak Farhang

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; either version 2 of the License, or (at your option) any later version.

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.