mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
459 lines
29 KiB
HTML
459 lines
29 KiB
HTML
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>DataAccessor | Community Solid Server</title>
|
|
<meta name="description" content="Documentation for Community Solid Server">
|
|
<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>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
<input id="tsd-search-field" type="text" />
|
|
</div>
|
|
<ul class="results">
|
|
<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</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
<input type="checkbox" id="tsd-filter-externals" checked />
|
|
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<ul class="tsd-breadcrumb">
|
|
<li>
|
|
<a href="../modules.html">Community Solid Server</a>
|
|
</li>
|
|
<li>
|
|
<a href="../modules/index.html">index</a>
|
|
</li>
|
|
<li>
|
|
<a href="index.dataaccessor.html">DataAccessor</a>
|
|
</li>
|
|
</ul>
|
|
<h1>Interface DataAccessor</h1>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-8 col-content">
|
|
<section class="tsd-panel tsd-comment">
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>A DataAccessor is the building block closest to the actual data storage.
|
|
It should not worry about most Solid logic, most of that will be handled before it is called.
|
|
There are a few things it still needs to do, and it is very important every implementation does this:</p>
|
|
<ul>
|
|
<li>If the input identifier ends with a slash, it should be assumed the identifier is targeting a container.</li>
|
|
<li>Similarly, if there is no trailing slash it should assume a document.</li>
|
|
<li>It should always throw a NotFoundHttpError if it does not have data matching the input identifier.</li>
|
|
<li>DataAccessors are responsible for generating the relevant containment triples for containers.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-hierarchy">
|
|
<h3>Hierarchy</h3>
|
|
<ul class="tsd-hierarchy">
|
|
<li>
|
|
<span class="target">DataAccessor</span>
|
|
</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 ">
|
|
<h3>Properties</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#canhandle" class="tsd-kind-icon">can<wbr>Handle</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#deleteresource" class="tsd-kind-icon">delete<wbr>Resource</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#getdata" class="tsd-kind-icon">get<wbr>Data</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#getmetadata" class="tsd-kind-icon">get<wbr>Metadata</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#writecontainer" class="tsd-kind-icon">write<wbr>Container</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="index.dataaccessor.html#writedocument" class="tsd-kind-icon">write<wbr>Document</a></li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Properties</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="canhandle" class="tsd-anchor"></a>
|
|
<h3>can<wbr>Handle</h3>
|
|
<div class="tsd-signature tsd-kind-icon">can<wbr>Handle<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>representation<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representation.representation.html" class="tsd-signature-type" data-tsd-kind="Interface">Representation</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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/c7dd6db/src/storage/accessors/DataAccessor.ts#L24">src/storage/accessors/DataAccessor.ts:24</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Should throw a NotImplementedHttpError if the DataAccessor does not support storing the given Representation.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Incoming Representation.</p>
|
|
</dd>
|
|
<dt>throws</dt>
|
|
<dd><p>BadRequestHttpError
|
|
If it does not support the incoming data.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>representation<span class="tsd-signature-symbol">: </span><a href="ldp_representation_representation.representation.html" class="tsd-signature-type" data-tsd-kind="Interface">Representation</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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>representation: <a href="ldp_representation_representation.representation.html" class="tsd-signature-type" data-tsd-kind="Interface">Representation</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="deleteresource" class="tsd-anchor"></a>
|
|
<h3>delete<wbr>Resource</h3>
|
|
<div class="tsd-signature tsd-kind-icon">delete<wbr>Resource<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/c7dd6db/src/storage/accessors/DataAccessor.ts#L62">src/storage/accessors/DataAccessor.ts:62</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Deletes the resource and its corresponding metadata.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Resource to delete.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>identifier: <a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="getdata" class="tsd-anchor"></a>
|
|
<h3>get<wbr>Data</h3>
|
|
<div class="tsd-signature tsd-kind-icon">get<wbr>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/c7dd6db/src/storage/accessors/DataAccessor.ts#L31">src/storage/accessors/DataAccessor.ts:31</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Returns a data stream stored for the given identifier.
|
|
It can be assumed that the incoming identifier will always correspond to a document.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Identifier for which the data is requested.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>identifier: <a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><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"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="getmetadata" class="tsd-anchor"></a>
|
|
<h3>get<wbr>Metadata</h3>
|
|
<div class="tsd-signature tsd-kind-icon">get<wbr>Metadata<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><a href="../classes/ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</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/c7dd6db/src/storage/accessors/DataAccessor.ts#L37">src/storage/accessors/DataAccessor.ts:37</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Returns the metadata corresponding to the identifier.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Identifier for which the metadata is requested.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</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"><</span><a href="../classes/ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>identifier: <a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="writecontainer" class="tsd-anchor"></a>
|
|
<h3>write<wbr>Container</h3>
|
|
<div class="tsd-signature tsd-kind-icon">write<wbr>Container<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a>, metadata<span class="tsd-signature-symbol">: </span><a href="../classes/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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/c7dd6db/src/storage/accessors/DataAccessor.ts#L56">src/storage/accessors/DataAccessor.ts:56</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Writes metadata for a container.
|
|
If the container does not exist yet it should be created,
|
|
if it does its metadata should be overwritten, except for the containment triples.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Identifier of the container.</p>
|
|
</dd>
|
|
<dt>param</dt>
|
|
<dd><p>Metadata to store.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a>, metadata<span class="tsd-signature-symbol">: </span><a href="../classes/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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>identifier: <a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a></h5>
|
|
</li>
|
|
<li>
|
|
<h5>metadata: <a href="../classes/ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
<a name="writedocument" class="tsd-anchor"></a>
|
|
<h3>write<wbr>Document</h3>
|
|
<div class="tsd-signature tsd-kind-icon">write<wbr>Document<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a>, data<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"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span>, metadata<span class="tsd-signature-symbol">: </span><a href="../classes/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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/c7dd6db/src/storage/accessors/DataAccessor.ts#L46">src/storage/accessors/DataAccessor.ts:46</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Writes data and metadata for a document.
|
|
If any data and/or metadata exist for the given identifier, it should be overwritten.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>param</dt>
|
|
<dd><p>Identifier of the resource.</p>
|
|
</dd>
|
|
<dt>param</dt>
|
|
<dd><p>Data to store.</p>
|
|
</dd>
|
|
<dt>param</dt>
|
|
<dd><p>Metadata to store.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-signature">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>identifier<span class="tsd-signature-symbol">: </span><a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a>, data<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"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span>, metadata<span class="tsd-signature-symbol">: </span><a href="../classes/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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>identifier: <a href="ldp_representation_resourceidentifier.resourceidentifier.html" class="tsd-signature-type" data-tsd-kind="Interface">ResourceIdentifier</a></h5>
|
|
</li>
|
|
<li>
|
|
<h5>data: <a href="../modules/util_guardedstream.html#guarded" class="tsd-signature-type" data-tsd-kind="Type alias">Guarded</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>metadata: <a href="../classes/ldp_representation_representationmetadata.representationmetadata.html" class="tsd-signature-type" data-tsd-kind="Class">RepresentationMetadata</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation primary">
|
|
<ul>
|
|
<li class=" ">
|
|
<a href="../modules.html">Exports</a>
|
|
</li>
|
|
<li class="current tsd-kind-module">
|
|
<a href="../modules/index.html">index</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
</ul>
|
|
<ul class="current">
|
|
<li class="current tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="index.dataaccessor.html" class="tsd-kind-icon">Data<wbr>Accessor</a>
|
|
<ul>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#canhandle" class="tsd-kind-icon">can<wbr>Handle</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#deleteresource" class="tsd-kind-icon">delete<wbr>Resource</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#getdata" class="tsd-kind-icon">get<wbr>Data</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#getmetadata" class="tsd-kind-icon">get<wbr>Metadata</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#writecontainer" class="tsd-kind-icon">write<wbr>Container</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
<a href="index.dataaccessor.html#writedocument" class="tsd-kind-icon">write<wbr>Document</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="after-current">
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
<div class="container">
|
|
<h2>Legend</h2>
|
|
<div class="tsd-legend-group">
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</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>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
</ul>
|
|
<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>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<div class="overlay"></div>
|
|
<script src="../assets/js/main.js"></script>
|
|
</body>
|
|
</html> |