Files
hansken-extraction-plugin-s…/0.8.0/_modules/hansken_extraction_plugin/api/tracelet.html
2024-06-18 20:31:33 +02:00

148 lines
7.5 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>hansken_extraction_plugin.api.tracelet &mdash; Hansken Extraction Plugins for plugin developers 0.8.0
documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=649a27d8" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/wider_pages.css?v=32ad70ab" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=486e5634"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home">
Hansken Extraction Plugins for plugin developers
</a>
<div class="version">
0.8.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/concepts.html">General concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/spec.html">Extraction Plugin specifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/java.html">Java</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/python.html">Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/faq.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../contact.html">Contact</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../changes.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">Hansken Extraction Plugins for plugin developers</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
<li class="breadcrumb-item active">hansken_extraction_plugin.api.tracelet</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for hansken_extraction_plugin.api.tracelet</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;This module contains the definition of a Tracelet.&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Mapping</span>
<div class="viewcode-block" id="Tracelet">
<a class="viewcode-back" href="../../../dev/python/api/hansken_extraction_plugin.api.tracelet.html#hansken_extraction_plugin.api.tracelet.Tracelet">[docs]</a>
<span class="k">class</span> <span class="nc">Tracelet</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A tracelet contains the values of a single fvt (Few Valued Type).</span>
<span class="sd"> A few valued type is a trace property type that is a collection of tracelets. A trace can contain multiple few</span>
<span class="sd"> valued types containing one or more tracelets. For example, the `trace.identity`` type may look like this::</span>
<span class="sd"> {emailAddress: &#39;interesting@notreally.com&#39;},</span>
<span class="sd"> {firstName: &#39;piet&#39;},</span>
<span class="sd"> {emailAddress: &#39;anotheremail@notreally.com&#39;},</span>
<span class="sd"> The trace.identity few valued types contains three different tracelets.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">value</span><span class="p">:</span> <span class="n">Mapping</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Initialize a tracelet.</span>
<span class="sd"> :param name: name or type of the tracelet. In the example this would be ``identity``.</span>
<span class="sd"> :param value: Mapping of keys to properties of this tracelet. In the example this could be</span>
<span class="sd"> ``{emailAddress: &#39;anotheremail@notreally.com&#39;}``.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="n">value</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2020-2024 Netherlands Forensic Institute.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>