org.apache.directory.shared.dsmlv2
Class Dsmlv2Container

java.lang.Object
  extended by org.apache.directory.shared.dsmlv2.Dsmlv2Container
All Implemented Interfaces:
Container

public class Dsmlv2Container
extends java.lang.Object
implements Container

This class represents the DSML Container. It used by the DSML Parser to store information.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
Dsmlv2Container()
           
 
Method Summary
 BatchRequest getBatchRequest()
          Gets the DSML Batch Request
 BatchResponse getBatchResponse()
          Gets the DSML Batch Response
 AbstractGrammar getGrammar()
          Gets the grammar
 org.xmlpull.v1.XmlPullParser getParser()
          Gets the parser
 int getState()
          Get the current grammar state
 IStates getStates()
          Get the states for this container's grammars
 int getTransition()
          Get the transition
 GrammarTransition getTransition(int state, Tag tag)
          Get the transition associated with the state and tag
 void setBatchRequest(BatchRequest batchRequest)
          Sets the DSML Batch Request
 void setBatchResponse(BatchResponse batchResponse)
          Sets the DSML Batch Request
 void setGrammar(AbstractGrammar grammar)
          Sets the Grammar
 void setParser(org.xmlpull.v1.XmlPullParser parser)
          Sets the parser
 void setState(int state)
          Set the new current state
 void setTransition(int transition)
          Update the transition from a state to another
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dsmlv2Container

public Dsmlv2Container()
Method Detail

getBatchRequest

public BatchRequest getBatchRequest()
Gets the DSML Batch Request

Returns:
Returns the Batch Request

setBatchRequest

public void setBatchRequest(BatchRequest batchRequest)
Sets the DSML Batch Request

Parameters:
batchRequest - the Batch Request to set

getBatchResponse

public BatchResponse getBatchResponse()
Gets the DSML Batch Response

Returns:
Returns the Batch Response

setBatchResponse

public void setBatchResponse(BatchResponse batchResponse)
Sets the DSML Batch Request

Parameters:
batchResponse - the Batch Response to set

getParser

public org.xmlpull.v1.XmlPullParser getParser()
Gets the parser

Returns:
the parser

setParser

public void setParser(org.xmlpull.v1.XmlPullParser parser)
Sets the parser

Parameters:
parser - the parser to set

getState

public int getState()
Get the current grammar state

Specified by:
getState in interface Container
Returns:
the current grammar state

setState

public void setState(int state)
Set the new current state

Specified by:
setState in interface Container
Parameters:
state - the new state

getTransition

public int getTransition()
Get the transition

Specified by:
getTransition in interface Container
Returns:
the transition from the previous state to the new state

setTransition

public void setTransition(int transition)
Update the transition from a state to another

Specified by:
setTransition in interface Container
Parameters:
transition - the transition to set

getStates

public IStates getStates()
Get the states for this container's grammars

Specified by:
getStates in interface Container
Returns:
the states.

getGrammar

public AbstractGrammar getGrammar()
Gets the grammar

Returns:
the grammar

setGrammar

public void setGrammar(AbstractGrammar grammar)
Sets the Grammar

Parameters:
grammar - the grammar to set

getTransition

public GrammarTransition getTransition(int state,
                                       Tag tag)
Get the transition associated with the state and tag

Parameters:
state - the current state
tag - the current tag
Returns:
a valid transition if any, or null.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.