This commit is contained in:
RubenVerborgh
2021-06-29 16:54:45 +00:00
parent e1e35a84d0
commit 8591fda008
525 changed files with 12756 additions and 8659 deletions

View File

@@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SlugParser | Community Solid Server - v0.9.0</title>
<meta name="description" content="Documentation for Community Solid Server - v0.9.0">
<title>SlugParser | Community Solid Server - v1.0.0-beta.0</title>
<meta name="description" content="Documentation for Community Solid Server - v1.0.0-beta.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<script async src="../assets/js/search.js" id="search-script"></script>
@@ -23,7 +23,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">Community Solid Server - v0.9.0</a>
<a href="../index.html" class="title">Community Solid Server - v1.0.0-beta.0</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
@@ -52,7 +52,7 @@
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../modules.html">Community Solid Server - v0.9.0</a>
<a href="../modules.html">Community Solid Server - v1.0.0-beta.0</a>
</li>
<li>
<a href="../modules/ldp_http_metadata_slugparser.html">ldp/http/metadata/SlugParser</a>
@@ -79,24 +79,23 @@
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">SlugParser</span>
<a href="ldp_http_metadata_metadataparser.metadataparser.html" class="tsd-signature-type" data-tsd-kind="Class">MetadataParser</a>
<ul class="tsd-hierarchy">
<li>
<span class="target">SlugParser</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel">
<h3>Implements</h3>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/ldp_http_metadata_metadataparser.metadataparser.html" class="tsd-signature-type" data-tsd-kind="Interface">MetadataParser</a></li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<section class="tsd-index-section tsd-is-inherited">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="ldp_http_metadata_slugparser.slugparser.html#constructor" class="tsd-kind-icon">constructor</a></li>
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="ldp_http_metadata_slugparser.slugparser.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-private-protected">
@@ -108,23 +107,26 @@
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="ldp_http_metadata_slugparser.slugparser.html#parse" class="tsd-kind-icon">parse</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ldp_http_metadata_slugparser.slugparser.html#canhandle" class="tsd-kind-icon">can<wbr>Handle</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ldp_http_metadata_slugparser.slugparser.html#handle" class="tsd-kind-icon">handle</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ldp_http_metadata_slugparser.slugparser.html#handlesafe" class="tsd-kind-icon">handle<wbr>Safe</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">new <wbr>Slug<wbr>Parser<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ldp_http_metadata_slugparser.slugparser.html" class="tsd-signature-type" data-tsd-kind="Class">SlugParser</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="ldp_http_metadata_metadataparser.metadataparser.html">MetadataParser</a>.<a href="ldp_http_metadata_metadataparser.metadataparser.html#constructor">constructor</a></p>
</aside>
<h4 class="tsd-returns-title">Returns <a href="ldp_http_metadata_slugparser.slugparser.html" class="tsd-signature-type" data-tsd-kind="Class">SlugParser</a></h4>
</li>
@@ -139,42 +141,135 @@
<div class="tsd-signature tsd-kind-icon">logger<span class="tsd-signature-symbol">:</span> <a href="logging_logger.logger.html" class="tsd-signature-type" data-tsd-kind="Class">Logger</a><span class="tsd-signature-symbol"> = ...</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/solid/community-server/blob/0a68fbf/src/ldp/http/metadata/SlugParser.ts#L12">src/ldp/http/metadata/SlugParser.ts:12</a></li>
<li>Defined in <a href="https://github.com/solid/community-server/blob/d01382d/src/ldp/http/metadata/SlugParser.ts#L12">src/ldp/http/metadata/SlugParser.ts:12</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="parse" class="tsd-anchor"></a>
<h3>parse</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">parse<span class="tsd-signature-symbol">(</span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span>, metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="canhandle" class="tsd-anchor"></a>
<h3>can<wbr>Handle</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">can<wbr>Handle<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Implementation of MetadataParser.parse</p>
<p>Inherited from <a href="ldp_http_metadata_metadataparser.metadataparser.html">MetadataParser</a>.<a href="ldp_http_metadata_metadataparser.metadataparser.html#canhandle">canHandle</a></p>
<ul>
<li>Defined in <a href="https://github.com/solid/community-server/blob/0a68fbf/src/ldp/http/metadata/SlugParser.ts#L14">src/ldp/http/metadata/SlugParser.ts:14</a></li>
<li>Defined in <a href="https://github.com/solid/community-server/blob/d01382d/src/util/handlers/AsyncHandler.ts#L13">src/util/handlers/AsyncHandler.ts:13</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Potentially adds metadata to the RepresentationMetadata based on the HttpRequest contents.</p>
<p>Checks if the input data can be handled by this class.
Throws an error if it can&#39;t handle the data.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>request: <a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
<li>
<h5>metadata: <a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
<h5>input: <span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span></h5>
<div class="tsd-comment tsd-typography">
<p>Input data that could potentially be handled.</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
</li>
<li class="tsd-parameter">
<h5>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A promise resolving if the input can be handled, rejecting with an Error if not.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="handle" class="tsd-anchor"></a>
<h3>handle</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">handle<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="ldp_http_metadata_metadataparser.metadataparser.html">MetadataParser</a>.<a href="ldp_http_metadata_metadataparser.metadataparser.html#handle">handle</a></p>
<ul>
<li>Defined in <a href="https://github.com/solid/community-server/blob/d01382d/src/ldp/http/metadata/SlugParser.ts#L14">src/ldp/http/metadata/SlugParser.ts:14</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Handles the given input. This should only be done if the <a href="ldp_http_metadata_slugparser.slugparser.html#canhandle">canHandle</a> function returned <code>true</code>.
Therefore, consider using the <a href="ldp_http_metadata_slugparser.slugparser.html#handlesafe">handleSafe</a> function instead.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>input: <span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span></h5>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
</li>
<li class="tsd-parameter">
<h5>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A promise resolving when the handling is finished. Return value depends on the given type.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="handlesafe" class="tsd-anchor"></a>
<h3>handle<wbr>Safe</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">handle<wbr>Safe<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="ldp_http_metadata_metadataparser.metadataparser.html">MetadataParser</a>.<a href="ldp_http_metadata_metadataparser.metadataparser.html#handlesafe">handleSafe</a></p>
<ul>
<li>Defined in <a href="https://github.com/solid/community-server/blob/d01382d/src/util/handlers/AsyncHandler.ts#L35">src/util/handlers/AsyncHandler.ts:35</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Helper function that first runs the canHandle function followed by the handle function.
Throws the error of the <a href="ldp_http_metadata_slugparser.slugparser.html#canhandle">canHandle</a> function if the data can&#39;t be handled,
or returns the result of the <a href="ldp_http_metadata_slugparser.slugparser.html#handle">handle</a> function otherwise.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>input: <span class="tsd-signature-symbol">{ </span>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">; </span>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span></h5>
<div class="tsd-comment tsd-typography">
<p>Input data that will be handled if it can be handled.</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>metadata<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
</li>
<li class="tsd-parameter">
<h5>request<span class="tsd-signature-symbol">: </span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">IncomingMessage</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A promise resolving if the input can be handled, rejecting with an Error if not.
Return value depends on the given type.</p>
</li>
</ul>
</section>
@@ -184,7 +279,7 @@
<nav class="tsd-navigation primary">
<ul>
<li class=" ">
<a href="../modules.html">Exports</a>
<a href="../modules.html">Modules</a>
</li>
<li class="current tsd-kind-module">
<a href="../modules/ldp_http_metadata_slugparser.html">ldp/http/metadata/<wbr>Slug<wbr>Parser</a>
@@ -198,14 +293,20 @@
<li class="current tsd-kind-class tsd-parent-kind-module">
<a href="ldp_http_metadata_slugparser.slugparser.html" class="tsd-kind-icon">Slug<wbr>Parser</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
<a href="ldp_http_metadata_slugparser.slugparser.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected">
<a href="ldp_http_metadata_slugparser.slugparser.html#logger" class="tsd-kind-icon">logger</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="ldp_http_metadata_slugparser.slugparser.html#parse" class="tsd-kind-icon">parse</a>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="ldp_http_metadata_slugparser.slugparser.html#canhandle" class="tsd-kind-icon">can<wbr>Handle</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="ldp_http_metadata_slugparser.slugparser.html#handle" class="tsd-kind-icon">handle</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="ldp_http_metadata_slugparser.slugparser.html#handlesafe" class="tsd-kind-icon">handle<wbr>Safe</a>
</li>
</ul>
</li>
@@ -230,13 +331,16 @@
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
</ul>