Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 58fab302e5
Fetching contributors…

Cannot retrieve contributors at this time

345 lines (322 sloc) 13.959 kB
<?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>pyRdfa.rdfs.process.MiniOWL</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>&nbsp;&nbsp;&nbsp;<a
href="pyRdfa-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="pyRdfa-module.html">Package&nbsp;pyRdfa</a> ::
<a href="pyRdfa.rdfs-module.html">Package&nbsp;rdfs</a> ::
<a href="pyRdfa.rdfs.process-module.html">Module&nbsp;process</a> ::
Class&nbsp;MiniOWL
</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&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="pyRdfa.rdfs.process.MiniOWL-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MiniOWL</h1><p class="nomargin-top"><span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL">source&nbsp;code</a></span></p>
<p>Class implementing the simple OWL RL Reasoning required by RDFa in
managing vocabulary files. This is done via a forward chaining process
(in the <a href="pyRdfa.rdfs.process.MiniOWL-class.html#closure"
class="link">closure</a> method) using a few simple rules as defined by
the RDF and the OWL Semantics specifications.</p>
<!-- ==================== 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">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">graph</span>,
<span class="summary-sig-arg">schema_semantics</span>=<span class="summary-sig-default">False</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyRdfa.rdfs.process.MiniOWL-class.html#closure" class="summary-sig-name">closure</a>(<span class="summary-sig-arg">self</span>)</span><br />
Generate the closure the graph.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.closure">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyRdfa.rdfs.process.MiniOWL-class.html#store_triple" class="summary-sig-name">store_triple</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">t</span>)</span><br />
In contrast to its name, this does not yet add anything to the graph
itself, it just stores the tuple in an <a
href="pyRdfa.rdfs.process.MiniOWL-class.html#added_triples"
class="link">internal set</a>.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.store_triple">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyRdfa.rdfs.process.MiniOWL-class.html#rules" class="summary-sig-name">rules</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">t</span>)</span><br />
Go through the OWL-RL entailement rules prp-spo1, prp-eqp1, prp-eqp2,
cax-sco, cax-eqc1, and cax-eqc2 by extending the graph.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.rules">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></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 Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceVariables"
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">a set, to ensure the unicity of triples being added</span>
</td><td class="summary">
<a name="added_triples"></a><span class="summary-name">added_triples</span><br />
each cycle collects the triples that are to be added to the graph
eventually.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="graph"></a><span class="summary-name">graph</span><br />
the graph that has to be expanded
</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="closure"></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">closure</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.closure">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Generate the closure the graph. This is the real 'core'.</p>
<p>The processing rules store new triples via the <a
href="pyRdfa.rdfs.process.MiniOWL-class.html#store_triple"
class="link">separate method</a> which stores them in the <a
href="pyRdfa.rdfs.process.MiniOWL-class.html#added_triples"
class="link">added_triples</a> array. If that array is emtpy at the end
of a cycle, it means that the whole process can be stopped.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="store_triple"></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">store_triple</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">t</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.store_triple">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>In contrast to its name, this does not yet add anything to the graph
itself, it just stores the tuple in an <a
href="pyRdfa.rdfs.process.MiniOWL-class.html#added_triples"
class="link">internal set</a>. (It is important for this to be a set:
some of the rules in the various closures may generate the same tuples
several times.) Before adding the tuple to the set, the method checks
whether the tuple is in the final graph already (if yes, it is not added
to the set).</p>
<p>The set itself is emptied at the start of every processing cycle; the
triples are then effectively added to the graph at the end of such a
cycle. If the set is actually empty at that point, this means that the
cycle has not added any new triple, and the full processing can stop.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>t</code></strong> (a 3-element tuple of (s,p,o)) - the triple to be added to the graph, unless it is already there</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="rules"></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">rules</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">t</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyRdfa.rdfs.process-pysrc.html#MiniOWL.rules">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Go through the OWL-RL entailement rules prp-spo1, prp-eqp1, prp-eqp2,
cax-sco, cax-eqc1, and cax-eqc2 by extending the graph.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>t</code></strong> - a triple (in the form of a tuple)</li>
</ul></dd>
</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>&nbsp;&nbsp;&nbsp;<a
href="pyRdfa-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></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 Fri Mar 23 15:08:24 2012
</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>
Jump to Line
Something went wrong with that request. Please try again.