doc/api/python/integration.quality.PolicyValidator-class.html
changeset 432 f2ddfa555b0f
equal deleted inserted replaced
431:7685cec9fd3c 432:f2ddfa555b0f
       
     1 <?xml version="1.0" encoding="ascii"?>
       
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     3           "DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     5 <head>
       
     6   <title>integration.quality.PolicyValidator</title>
       
     7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
       
     8   <script type="text/javascript" src="epydoc.js"></script>
       
     9 </head>
       
    10 
       
    11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
       
    12       alink="#204080">
       
    13 <!-- ==================== NAVIGATION BAR ==================== -->
       
    14 <table class="navbar" border="0" width="100%" cellpadding="0"
       
    15        bgcolor="#a0c0ff" cellspacing="0">
       
    16   <tr valign="middle">
       
    17 
       
    18   <!-- Tree link -->
       
    19       <th>&nbsp;&nbsp;&nbsp;<a
       
    20         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
    21 
       
    22   <!-- Index link -->
       
    23       <th>&nbsp;&nbsp;&nbsp;<a
       
    24         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
    25 
       
    26   <!-- Help link -->
       
    27       <th>&nbsp;&nbsp;&nbsp;<a
       
    28         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
    29 
       
    30       <th class="navbar" width="100%"></th>
       
    31   </tr>
       
    32 </table>
       
    33 <table width="100%" cellpadding="0" cellspacing="0">
       
    34   <tr valign="top">
       
    35     <td width="100%">
       
    36       <span class="breadcrumbs">
       
    37         <a href="integration-module.html">Package&nbsp;integration</a> ::
       
    38         <a href="integration.quality-module.html">Module&nbsp;quality</a> ::
       
    39         Class&nbsp;PolicyValidator
       
    40       </span>
       
    41     </td>
       
    42     <td>
       
    43       <table cellpadding="0" cellspacing="0">
       
    44         <!-- hide/show private -->
       
    45         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
       
    46     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
       
    47         <tr><td align="right"><span class="options"
       
    48             >[<a href="frames.html" target="_top">frames</a
       
    49             >]&nbsp;|&nbsp;<a href="integration.quality.PolicyValidator-class.html"
       
    50             target="_top">no&nbsp;frames</a>]</span></td></tr>
       
    51       </table>
       
    52     </td>
       
    53   </tr>
       
    54 </table>
       
    55 <!-- ==================== CLASS DESCRIPTION ==================== -->
       
    56 <h1 class="epydoc">Class PolicyValidator</h1><span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator">source&nbsp;code</a></span><br /><br />
       
    57 <pre class="base-tree">
       
    58 object --+
       
    59          |
       
    60         <strong class="uidshort">PolicyValidator</strong>
       
    61 </pre>
       
    62 
       
    63 <hr />
       
    64 Validate policy files on a hierarchy.<br /><br />
       
    65 
       
    66 <!-- ==================== INSTANCE METHODS ==================== -->
       
    67 <a name="section-InstanceMethods"></a>
       
    68 <table class="summary" border="1" cellpadding="3"
       
    69        cellspacing="0" width="100%" bgcolor="white">
       
    70 <tr bgcolor="#70b0f0" class="table-header">
       
    71   <td colspan="2" class="table-header">
       
    72     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
    73       <tr valign="top">
       
    74         <td align="left"><span class="table-header">Instance Methods</span></td>
       
    75         <td align="right" valign="top"
       
    76          ><span class="options">[<a href="#section-InstanceMethods"
       
    77          class="privatelink" onclick="toggle_private();"
       
    78          >hide private</a>]</span></td>
       
    79       </tr>
       
    80     </table>
       
    81   </td>
       
    82 </tr>
       
    83 <tr>
       
    84     <td width="15%" align="right" valign="top" class="summary">
       
    85       <span class="summary-type">&nbsp;</span>
       
    86     </td><td class="summary">
       
    87       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
    88         <tr>
       
    89           <td><span class="summary-sig"><a href="integration.quality.PolicyValidator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
       
    90         <span class="summary-sig-arg">policyfiles</span>=<span class="summary-sig-default">None</span>,
       
    91         <span class="summary-sig-arg">csvfile</span>=<span class="summary-sig-default">None</span>,
       
    92         <span class="summary-sig-arg">ignoreroot</span>=<span class="summary-sig-default">False</span>)</span><br />
       
    93       The constructor</td>
       
    94           <td align="right" valign="top">
       
    95             <span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.__init__">source&nbsp;code</a></span>
       
    96             
       
    97           </td>
       
    98         </tr>
       
    99       </table>
       
   100       
       
   101     </td>
       
   102   </tr>
       
   103 <tr>
       
   104     <td width="15%" align="right" valign="top" class="summary">
       
   105       <span class="summary-type">&nbsp;</span>
       
   106     </td><td class="summary">
       
   107       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   108         <tr>
       
   109           <td><span class="summary-sig"><a href="integration.quality.PolicyValidator-class.html#load_policy_ids" class="summary-sig-name">load_policy_ids</a>(<span class="summary-sig-arg">self</span>,
       
   110         <span class="summary-sig-arg">csvfile</span>)</span><br />
       
   111       Load the icds from the CSV file.</td>
       
   112           <td align="right" valign="top">
       
   113             <span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.load_policy_ids">source&nbsp;code</a></span>
       
   114             
       
   115           </td>
       
   116         </tr>
       
   117       </table>
       
   118       
       
   119     </td>
       
   120   </tr>
       
   121 <tr>
       
   122     <td width="15%" align="right" valign="top" class="summary">
       
   123       <span class="summary-type">&nbsp;</span>
       
   124     </td><td class="summary">
       
   125       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   126         <tr>
       
   127           <td><span class="summary-sig"><a href="integration.quality.PolicyValidator-class.html#validate_content" class="summary-sig-name">validate_content</a>(<span class="summary-sig-arg">self</span>,
       
   128         <span class="summary-sig-arg">filename</span>)</span><br />
       
   129       Validating the policy file content.</td>
       
   130           <td align="right" valign="top">
       
   131             <span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.validate_content">source&nbsp;code</a></span>
       
   132             
       
   133           </td>
       
   134         </tr>
       
   135       </table>
       
   136       
       
   137     </td>
       
   138   </tr>
       
   139 <tr>
       
   140     <td width="15%" align="right" valign="top" class="summary">
       
   141       <span class="summary-type">&nbsp;</span>
       
   142     </td><td class="summary">
       
   143       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   144         <tr>
       
   145           <td><span class="summary-sig"><a name="find_policy"></a><span class="summary-sig-name">find_policy</span>(<span class="summary-sig-arg">self</span>,
       
   146         <span class="summary-sig-arg">path</span>)</span><br />
       
   147       find the policy file under path using filenames under the list.</td>
       
   148           <td align="right" valign="top">
       
   149             <span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.find_policy">source&nbsp;code</a></span>
       
   150             
       
   151           </td>
       
   152         </tr>
       
   153       </table>
       
   154       
       
   155     </td>
       
   156   </tr>
       
   157 <tr>
       
   158     <td width="15%" align="right" valign="top" class="summary">
       
   159       <span class="summary-type">&nbsp;</span>
       
   160     </td><td class="summary">
       
   161       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   162         <tr>
       
   163           <td><span class="summary-sig"><a href="integration.quality.PolicyValidator-class.html#validate" class="summary-sig-name">validate</a>(<span class="summary-sig-arg">self</span>,
       
   164         <span class="summary-sig-arg">path</span>)</span><br />
       
   165       Return a list couple [errortype, location, policy].</td>
       
   166           <td align="right" valign="top">
       
   167             <span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.validate">source&nbsp;code</a></span>
       
   168             
       
   169           </td>
       
   170         </tr>
       
   171       </table>
       
   172       
       
   173     </td>
       
   174   </tr>
       
   175   <tr>
       
   176     <td colspan="2" class="summary">
       
   177     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   178       <code>__delattr__</code>,
       
   179       <code>__getattribute__</code>,
       
   180       <code>__hash__</code>,
       
   181       <code>__new__</code>,
       
   182       <code>__reduce__</code>,
       
   183       <code>__reduce_ex__</code>,
       
   184       <code>__repr__</code>,
       
   185       <code>__setattr__</code>,
       
   186       <code>__str__</code>
       
   187       </p>
       
   188     </td>
       
   189   </tr>
       
   190 </table>
       
   191 <!-- ==================== PROPERTIES ==================== -->
       
   192 <a name="section-Properties"></a>
       
   193 <table class="summary" border="1" cellpadding="3"
       
   194        cellspacing="0" width="100%" bgcolor="white">
       
   195 <tr bgcolor="#70b0f0" class="table-header">
       
   196   <td colspan="2" class="table-header">
       
   197     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   198       <tr valign="top">
       
   199         <td align="left"><span class="table-header">Properties</span></td>
       
   200         <td align="right" valign="top"
       
   201          ><span class="options">[<a href="#section-Properties"
       
   202          class="privatelink" onclick="toggle_private();"
       
   203          >hide private</a>]</span></td>
       
   204       </tr>
       
   205     </table>
       
   206   </td>
       
   207 </tr>
       
   208   <tr>
       
   209     <td colspan="2" class="summary">
       
   210     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   211       <code>__class__</code>
       
   212       </p>
       
   213     </td>
       
   214   </tr>
       
   215 </table>
       
   216 <!-- ==================== METHOD DETAILS ==================== -->
       
   217 <a name="section-MethodDetails"></a>
       
   218 <table class="details" border="1" cellpadding="3"
       
   219        cellspacing="0" width="100%" bgcolor="white">
       
   220 <tr bgcolor="#70b0f0" class="table-header">
       
   221   <td colspan="2" class="table-header">
       
   222     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   223       <tr valign="top">
       
   224         <td align="left"><span class="table-header">Method Details</span></td>
       
   225         <td align="right" valign="top"
       
   226          ><span class="options">[<a href="#section-MethodDetails"
       
   227          class="privatelink" onclick="toggle_private();"
       
   228          >hide private</a>]</span></td>
       
   229       </tr>
       
   230     </table>
       
   231   </td>
       
   232 </tr>
       
   233 </table>
       
   234 <a name="__init__"></a>
       
   235 <div>
       
   236 <table class="details" border="1" cellpadding="3"
       
   237        cellspacing="0" width="100%" bgcolor="white">
       
   238 <tr><td>
       
   239   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   240   <tr valign="top"><td>
       
   241   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
       
   242         <span class="sig-arg">policyfiles</span>=<span class="sig-default">None</span>,
       
   243         <span class="sig-arg">csvfile</span>=<span class="sig-default">None</span>,
       
   244         <span class="sig-arg">ignoreroot</span>=<span class="sig-default">False</span>)</span>
       
   245     <br /><em class="fname">(Constructor)</em>
       
   246   </h3>
       
   247   </td><td align="right" valign="top"
       
   248     ><span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.__init__">source&nbsp;code</a></span>&nbsp;
       
   249     </td>
       
   250   </table>
       
   251   
       
   252   The constructor
       
   253   <dl class="fields">
       
   254     <dt>Overrides:
       
   255       object.__init__
       
   256     </dt>
       
   257   </dl>
       
   258 </td></tr></table>
       
   259 </div>
       
   260 <a name="load_policy_ids"></a>
       
   261 <div>
       
   262 <table class="details" border="1" cellpadding="3"
       
   263        cellspacing="0" width="100%" bgcolor="white">
       
   264 <tr><td>
       
   265   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   266   <tr valign="top"><td>
       
   267   <h3 class="epydoc"><span class="sig"><span class="sig-name">load_policy_ids</span>(<span class="sig-arg">self</span>,
       
   268         <span class="sig-arg">csvfile</span>)</span>
       
   269   </h3>
       
   270   </td><td align="right" valign="top"
       
   271     ><span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.load_policy_ids">source&nbsp;code</a></span>&nbsp;
       
   272     </td>
       
   273   </table>
       
   274   
       
   275   Load the icds from the CSV file.
       
   276 report format by generating array: ['unknownstatus', value, description]
       
   277   <dl class="fields">
       
   278   </dl>
       
   279 </td></tr></table>
       
   280 </div>
       
   281 <a name="validate_content"></a>
       
   282 <div>
       
   283 <table class="details" border="1" cellpadding="3"
       
   284        cellspacing="0" width="100%" bgcolor="white">
       
   285 <tr><td>
       
   286   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   287   <tr valign="top"><td>
       
   288   <h3 class="epydoc"><span class="sig"><span class="sig-name">validate_content</span>(<span class="sig-arg">self</span>,
       
   289         <span class="sig-arg">filename</span>)</span>
       
   290   </h3>
       
   291   </td><td align="right" valign="top"
       
   292     ><span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.validate_content">source&nbsp;code</a></span>&nbsp;
       
   293     </td>
       
   294   </table>
       
   295   
       
   296   Validating the policy file content. If it cannot be decoded,
       
   297 it reports an 'invalidencoding'.
       
   298 Case 'notinidlist': value is not defined under the id list.
       
   299   <dl class="fields">
       
   300   </dl>
       
   301 </td></tr></table>
       
   302 </div>
       
   303 <a name="validate"></a>
       
   304 <div>
       
   305 <table class="details" border="1" cellpadding="3"
       
   306        cellspacing="0" width="100%" bgcolor="white">
       
   307 <tr><td>
       
   308   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   309   <tr valign="top"><td>
       
   310   <h3 class="epydoc"><span class="sig"><span class="sig-name">validate</span>(<span class="sig-arg">self</span>,
       
   311         <span class="sig-arg">path</span>)</span>
       
   312   </h3>
       
   313   </td><td align="right" valign="top"
       
   314     ><span class="codelink"><a href="integration.quality-pysrc.html#PolicyValidator.validate">source&nbsp;code</a></span>&nbsp;
       
   315     </td>
       
   316   </table>
       
   317   
       
   318   Return a list couple [errortype, location, policy].
       
   319 errortype: missing, invalidencoding, notinidlist .
       
   320 missing: location is a directory.
       
   321 otherwise the doggie policy file.
       
   322   <dl class="fields">
       
   323   </dl>
       
   324 </td></tr></table>
       
   325 </div>
       
   326 <br />
       
   327 <!-- ==================== NAVIGATION BAR ==================== -->
       
   328 <table class="navbar" border="0" width="100%" cellpadding="0"
       
   329        bgcolor="#a0c0ff" cellspacing="0">
       
   330   <tr valign="middle">
       
   331 
       
   332   <!-- Tree link -->
       
   333       <th>&nbsp;&nbsp;&nbsp;<a
       
   334         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
   335 
       
   336   <!-- Index link -->
       
   337       <th>&nbsp;&nbsp;&nbsp;<a
       
   338         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
   339 
       
   340   <!-- Help link -->
       
   341       <th>&nbsp;&nbsp;&nbsp;<a
       
   342         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
   343 
       
   344       <th class="navbar" width="100%"></th>
       
   345   </tr>
       
   346 </table>
       
   347 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
       
   348   <tr>
       
   349     <td align="left" class="footer">
       
   350     Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:19 2009
       
   351     </td>
       
   352     <td align="right" class="footer">
       
   353       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
       
   354     </td>
       
   355   </tr>
       
   356 </table>
       
   357 
       
   358 <script type="text/javascript">
       
   359   <!--
       
   360   // Private objects are initially displayed (because if
       
   361   // javascript is turned off then we want them to be
       
   362   // visible); but by default, we want to hide them.  So hide
       
   363   // them unless we have a cookie that says to show them.
       
   364   checkCookie()
       
   365   // -->
       
   366 </script>
       
   367   
       
   368 </body>
       
   369 </html>