Ila

org.topoweb.ila.protocol
Class PState

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

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

The XML respresentation of a State instance.

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
PState()
           
 
Method Summary
 org.w3c.dom.Element toElement(State state, org.w3c.dom.Document factory)
          Translates the specified state using the given factory.
protected  org.w3c.dom.Element toHttpStateElement(HttpState state, org.w3c.dom.Document factory)
          Returns the XML representation of an HttpState instance.
protected  org.w3c.dom.Element toIncommunicadoStateElement(IncommunicadoState state, org.w3c.dom.Document factory)
          Returns the XML representation of an IncommunicadoState instance.
 State toState(org.w3c.dom.Element element)
          Translates the given element to a State instance.
protected  org.w3c.dom.Element toStateElement(State state, org.w3c.dom.Document factory)
          Returns the XML representation of a generic State instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PState

public PState()
Method Detail

toState

public State toState(org.w3c.dom.Element element)
              throws IlaProtocolException
Translates the given element to a State instance.

Parameters:
element - the XML representation of a State
Returns:
a State instance
Throws:
IlaProtocolException - if there is an error in the XML representation

toElement

public org.w3c.dom.Element toElement(State state,
                                     org.w3c.dom.Document factory)
Translates the specified state using the given factory. The element returned is not appended to the factory as its child.

Parameters:
state - the instance to be translated
factory - the Document from which Element instances are created
Returns:
the XML representation of the instance
See Also:
toStateElement(State,Document), toHttpStateElement(HttpState,Document), toIncommunicadoStateElement(IncommunicadoState,Document)

toStateElement

protected org.w3c.dom.Element toStateElement(State state,
                                             org.w3c.dom.Document factory)
Returns the XML representation of a generic State instance.


toHttpStateElement

protected org.w3c.dom.Element toHttpStateElement(HttpState state,
                                                 org.w3c.dom.Document factory)
Returns the XML representation of an HttpState instance.


toIncommunicadoStateElement

protected org.w3c.dom.Element toIncommunicadoStateElement(IncommunicadoState state,
                                                          org.w3c.dom.Document factory)
Returns the XML representation of an IncommunicadoState instance.


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.