<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>pyxb.binding.content.ChoiceState</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="pyxb-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" >PyXB hosted on <a href="http://sourceforge.net/projects/pyxb"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=263147&type=9" width="80" height="15" alt="Get PyXB: Python XML Schema Bindings at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a></th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="pyxb-module.html">Package pyxb</a> :: <a href="pyxb.binding-module.html">Package binding</a> :: <a href="pyxb.binding.content-module.html">Module content</a> :: Class ChoiceState </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >] | <a href="pyxb.binding.content.ChoiceState-class.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class ChoiceState</h1><p class="nomargin-top"><span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState">source code</a></span></p> <pre class="base-tree"> object --+ | <a href="pyxb.cscRoot-class.html">cscRoot</a> --+ | <a href="pyxb.binding.content.ContentState_mixin-class.html">ContentState_mixin</a> --+ | <strong class="uidshort">ChoiceState</strong> </pre> <hr /> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Instance Methods</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-InstanceMethods" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="pyxb.binding.content.ChoiceState-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">group</span>, <span class="summary-sig-arg">parent_particle_state</span>)</span><br /> x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td> <td align="right" valign="top"> <span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.__init__">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="pyxb.binding.content.ChoiceState-class.html#accepts" class="summary-sig-name">accepts</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">particle_state</span>, <span class="summary-sig-arg">instance</span>, <span class="summary-sig-arg">value</span>, <span class="summary-sig-arg">element_use</span>)</span><br /> Determine whether the provided value can be added to the instance without violating state validation.</td> <td align="right" valign="top"> <span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.accepts">source code</a></span> </td> </tr> </table> </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="pyxb.binding.content.ChoiceState-class.html#_verifyComplete" class="summary-sig-name" onclick="show_private();">_verifyComplete</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">parent_particle_state</span>)</span><br /> Determine whether the deep state is complete without further elements.</td> <td align="right" valign="top"> <span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState._verifyComplete">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="pyxb.binding.content.ChoiceState-class.html#notifyFailure" class="summary-sig-name">notifyFailure</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">sub_state</span>, <span class="summary-sig-arg">particle_ok</span>)</span><br /> Invoked by a sub-state to indicate that validation cannot proceed in the current state.</td> <td align="right" valign="top"> <span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.notifyFailure">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__delattr__</code>, <code>__format__</code>, <code>__getattribute__</code>, <code>__hash__</code>, <code>__new__</code>, <code>__reduce__</code>, <code>__reduce_ex__</code>, <code>__repr__</code>, <code>__setattr__</code>, <code>__sizeof__</code>, <code>__str__</code>, <code>__subclasshook__</code> </p> </td> </tr> </table> <!-- ==================== PROPERTIES ==================== --> <a name="section-Properties"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Properties</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Properties" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__class__</code> </p> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Method Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-MethodDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">group</span>, <span class="sig-arg">parent_particle_state</span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.__init__">source code</a></span> </td> </tr></table> <p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p> <dl class="fields"> <dt>Overrides: object.__init__ <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="accepts"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">accepts</span>(<span class="sig-arg">self</span>, <span class="sig-arg">particle_state</span>, <span class="sig-arg">instance</span>, <span class="sig-arg">value</span>, <span class="sig-arg">element_use</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.accepts">source code</a></span> </td> </tr></table> <p>Determine whether the provided value can be added to the instance without violating state validation.</p> <p>This method must not throw any non-catastrophic exceptions; general failures should be transformed to a <code>False</code> return value.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>particle_state</code></strong> - The <a href="pyxb.binding.content.ParticleState-class.html" class="link">ParticleState</a> instance serving as the parent to this state. The implementation must inform that state when the proposed value completes the content model.</li> <li><strong class="pname"><code>instance</code></strong> - An instance of a subclass of {basis.complexTypeDefinition}, into which the provided value will be stored if it is consistent with the current model state.</li> <li><strong class="pname"><code>value</code></strong> - The value that is being validated against the state.</li> <li><strong class="pname"><code>element_use</code></strong> - An optional <a href="pyxb.binding.content.ElementUse-class.html" class="link">ElementUse</a> instance that specifies the element to which the value corresponds. This will be available when the value is extracted by parsing a document, but will be absent if the value was passed as a constructor positional parameter.</li> </ul></dd> <dt>Returns:</dt> <dd><code>True</code> if the value was successfully matched against the state. <code>False</code> if the value did not match against the state.</dd> <dt>Overrides: <a href="pyxb.binding.content.ContentState_mixin-class.html#accepts">ContentState_mixin.accepts</a> <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="_verifyComplete"></a> <div class="private"> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">_verifyComplete</span>(<span class="sig-arg">self</span>, <span class="sig-arg">parent_particle_state</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState._verifyComplete">source code</a></span> </td> </tr></table> <p>Determine whether the deep state is complete without further elements.</p> <p>No-op for non-aggregate state. For aggregate state, all contained particles should be checked to see whether the overall model can be satisfied if no additional elements are provided.</p> <p>This method does not have a meaningful return value; violations of the content model should produce the corresponding exception (generally, <a href="pyxb.exceptions_.MissingContentError-class.html" class="link">MissingContentError</a>).</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>parent_particle_state</code></strong> - the <a href="pyxb.binding.content.ParticleState-class.html" class="link">ParticleState</a> for which this state is the term.</li> </ul></dd> <dt>Overrides: <a href="pyxb.binding.content.ContentState_mixin-class.html#_verifyComplete" onclick="show_private();">ContentState_mixin._verifyComplete</a> <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="notifyFailure"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">notifyFailure</span>(<span class="sig-arg">self</span>, <span class="sig-arg">sub_state</span>, <span class="sig-arg">particle_ok</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="pyxb.binding.content-pysrc.html#ChoiceState.notifyFailure">source code</a></span> </td> </tr></table> <p>Invoked by a sub-state to indicate that validation cannot proceed in the current state.</p> <p>Normally this is used when an intermediate content model must reset itself to permit alternative models to be evaluated.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>sub_state</code></strong> - the state that was unable to accept a value</li> <li><strong class="pname"><code>particle_ok</code></strong> - <code>True</code> if the particle that rejected the value is in an accepting terminal state</li> </ul></dd> <dt>Overrides: <a href="pyxb.binding.content.ContentState_mixin-class.html#notifyFailure">ContentState_mixin.notifyFailure</a> <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="pyxb-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" >PyXB hosted on <a href="http://sourceforge.net/projects/pyxb"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=263147&type=9" width="80" height="15" alt="Get PyXB: Python XML Schema Bindings at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a></th> </tr></table></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Sun May 30 12:40:28 2010 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>