--- a/Test Cases/LDP Test Cases.html Fri Aug 09 12:46:04 2013 +0100
+++ b/Test Cases/LDP Test Cases.html Fri Aug 09 12:48:15 2013 +0100
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
prefix="td: http://www.w3.org/2006/03/test-description# tn: http://ldp.example.org/NewTestDefinitions# ht: http://www.w3.org/2011/http#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- rgarcia: Had to uncomment it so it can read the local image
<base href="http://www.w3.org/TR/ldp/TestCases">-->
<title>Linked Data Platform 1.0 Test Cases</title>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
<script class='remove'>
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "ldp-test-cases",
// TODO: Confirm short name
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2013-03-07",
//previousMaturity: "FPWD",
//previousURI: "http://www.w3.org/TR/2013/WD-ldp-20130307/",
// if there a publicly available Editor's Draft, this is the link
//edDraftURI: "http://www.w3.org/2012/ldp/hg/ldp.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
//extraCSS: ["https://dvcs.w3.org/hg/ldpwg/css/respec.css"],
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Raúl García-Castro", url: "http://delicias.dia.fi.upm.es/~rgarcia/",
company: "Ontology Engineering Group, Universidad Politécnica de Madrid", companyURL: "http://www.oeg-upm.net/" },
//{ name: "John Arwe", url: "https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/allcommunities?userid=120000CAW7",
// company: "IBM Corporation", companyURL: "http://ibm.com/" },
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg: "Linked Data Platform Working Group",
// URI of the public WG page
wgURI: "http://www.w3.org/2012/ldp",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList: "public-ldp-wg",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/55082/status",
doRDFa: "1.1",
};
</script>
</head>
<body>
<section id='abstract'>
To be written.
</section>
<section>
<h2><a id="Introduction">Introduction</a></h2>
<p>This document describes...</p>
</section>
<section>
<h2><a id="DesignIssues">Design issues </a></h2>
<section>
<h3><a id="GenericVsDomain">Generic vs domain-specific servers</a></h3>
<p>There will be two types of systems implementing the LDP specification:</p>
<ul>
<li>Generic RDF storage systems that allow interacting with their resources by means of the LDP specification.
These servers do not impose any restriction on LDPRs.</li>
<li>Systems exposing their data using the LDP specification. These systems impose restrictions on LDPRs since they
have an underlying business logic and data model.</li>
</ul>
<p>In order to cover both types of systems, we do not provide specific input data in the test suite. It is up to the
evaluator to define specific input data for a certain system. Evaluators must include these input data along with
the results when reporting the results of a certain system.</p>
</section>
<section>
<h3><a id="ProtocolVsData">Protocol evaluation vs data evaluation</a></h3>
<p>The LDP specification includes restrictions on LDP servers at the protocol level and at the data level.
Currently, the restrictions at the data level are minimal and servers are not forced to have a certain behaviour
when processing LDPR representations. Therefore, the test suite evaluates LDP servers at a protocol level; the
only exception is in the case of LDPCs, since they are required to include an rdf.type statement in their
representation.</p>
<p>It is out of the scope of the test suite to test LDP servers in terms of the restrictions imposed by their
underlying data models.</p>
</section>
<section>
<h3><a id="Coverage">Test suite coverage</a></h3>
<p>This test suite only covers those absolute requirements present in the LDP specification (as stated by the use of
the MUST key word). This set of absolute requirements identifies the core subset of the LDP specification, <dfn>LDP Core</dfn> from now on, and any LDP server that satisfies these absolute requirements will be an LDP Core conformant
server.</p>
<p>It is out of the scope of this test suite to test other levels of conformance in terms of optional capabilities
(e.g., paging).</p>
</section>
<section>
<h3><a id="ResultVsAssertion">Separation of results and assertions</a></h3>
<p>Instead of defining expected results for tests, which will be dependent on specific implementations, we have
defined the assertions to be made over test results. In order to successfully pass a test, all of the assertions must
be satisfied.</p>
<p>Separating test outputs and assertions has other benefits: it makes simpler to report tool results and assertions
can be made by a third party.</p>
</section>
<section>
<h3><a id="Traceability">Traceability of test cases</a></h3>
<p>Any test case and its produced results and assertions should be related to those documents that are relevant for
it (e.g., specifications, uses cases, etc.).</p>
</section>
</section>
<section>
<h2><a id="TestingProcess">Testing process</a></h2>
<p>The LDP Test Cases are defined in this same page, which is annotated using RDFa so that it can be consumed both by
persons and machines. The testing process is composed of two steps, depicted in the figure below.</p>
<ol>
<li>The person or agent in charge of executing the test cases in a specific LDP server will take the test case definitions and run every test case on the LDP server. It is recommended (but not required) that test execution is automated. The execution of test cases must produce a test execution report for the LDP server, in RDF format, that contains for every test case: the specific inputs used during its execution, the produced outputs, and the assertion of whether the test case is passed. The test execution report must be available in the Web.</li>
<li>A report generator software will take all the LDP server execution reports and will generate an implementation report that includes the results of all the LDP servers.</li>
</ol>
<p>
<object data="TestingProcess.svg" type="image/svg+xml">Your browser does not support SVG.</object>
</p>
</section>
<section>
<h2><a id="DescribingArtifacts">Describing testing artifacts in RDF</a></h2>
<section>
<h3><a id="Namespaces">Namespaces used</a></h3>
<p>The following vocabularies are reused for describing the testing artifacts: DOAP (<code>doap</code>), Dublin Core (<code>dc</code>),
- FOAF (<code>foaf</code>), HTTP Vocabulary in RDF (<code>ht</code>), and W3C Test Metadata (<code>td</code>).</p>
<p>All the new required entities that are not covered by those vocabularies have been defined under a new namespace
(<code>tn</code>). Besides, the LDP test cases have been defined under their own namespace (<code>ldptc</code>).</p>
<p>Next we present the definition of these namespaces and of all the namespaces used in the examples.</p>
<pre>cnt: <http://www.w3.org/2011/content#>
dc: <http://purl.org/dc/terms/>
doap: <http://usefulinc.com/ns/doap#>
earl: <http://www.w3.org/ns/earl#>
foaf: <http://xmlns.com/foaf/0.1/>
ht: <http://www.w3.org/2011/http#>
httph: <http://www.w3.org/2011/http-headers#>
ldptc: <http://www.w3.org/TR/ldp/TestCases#>
td: <http://www.w3.org/2006/03/test-description#>
tn: <http://ldp.example.org/NewTestDefinitions#></pre>
</section>
<section>
<h3><a id="TestSuiteDescription">Test suite description</a></h3>
<p><em>To be completed</em></p>
</section>
<section>
<h3><a id="TestCaseDescription">Test case description</a></h3>
<p>A <dfn id="dfn-test-case" title="test case">test case</dfn> is defined as an instance of the <code>td:TestCase</code> class and it can be further
described using the following properties:</p>
<ul>
<li><code>rdfs:label</code>. The human-readable label of the test.</li>
<li><code>dc:title</code>. The name of the test.</li>
<li><code>dc:description</code>. The description of the test.</li>
<li><code>dc:contributor</code>. The person (<code>foaf:Person</code>) contributing the test.</li>
<li><code>td:reviewStatus</code>. The status of the test; possible status are: <code>td:unreviewed</code>, <code>td:approved</code>
or <code>td:rejected</code>.</li>
<li><code>rdfs:seeAlso</code>. A link to the specification it refers to.</li>
<li><code>td:specificationReference</code>. An <a>excerpt</a> (<code>tn:Excerpt</code>) of the specification that is
relevant to the test.</li>
<li><code>td:input</code>. An <a>input</a> (<code>tn:TestInput</code>) used in the test.</li>
<li><code>td:precondition</code>. A precondition that must be satisfied before running the test.</li>
<li><code>tn:output</code>. An <a href="#dfn-test-output">output</a> (<code>tn:TestOutput</code>) to be produced by the test.</li>
<li><code>tn:testProcess</code>. The list of <a href="#dfn-step">steps</a> (<code>tn:Step</code>) to be performed during the test.</li>
<li><code>tn:testAssertion</code>. An <a href="#dfn-test-assertion">assertion</a> (<code>tn:TestAssertion</code>) to be performed over the test output.</li>
</ul>
<p>An <dfn id="dfn-excerpt" title="excerpt">excerpt</dfn> is defined as an instance of the <code>tn:Excerpt </code>class and it can be
further described using the following properties:</p>
<ul>
<li><code>rdfs:seeAlso</code>: The document where the excerpt is included.</li>
<li><code>tn:includesText</code>. The excerpt from the document.</li>
</ul>
<p>A <dfn id="dfn-test-input" title="test input">test input</dfn> is defined as an instance of the <code>td:TestInput </code>class and it can be
further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test input.</li>
<li><code>dc:description</code>. The description of the test input.</li>
</ul>
<p>A <dfn id="dfn-test-output" title="test output">test output</dfn> is defined as an instance of the <code>td:TestOutput</code>
class and it can be further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test output.</li>
<li><code>dc:description</code>. The description of the test output.</li>
<li><code>tn:fromStep</code>. The <a href="#dfn-step">step</a> in the process in which the output is produced.</li>
</ul>
<p>In the LDP test cases, test outputs are expected to be HTTP responses (<code>ht:Response</code>).</p>
<p>A <dfn id="dfn-step" title="test input">step</dfn> in the test process is defined as an instance of the <code>td:Step</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>dc:description</code>. The description of the step.</li>
<li><code>tn:usesInput</code>. A <a href="#dfn-test-input">test input</a> used in the step.</li>
</ul>
<p>In the LDP test cases, steps are expected to be HTTP requests (<code>ht:Request</code>).</p>
<p>A <dfn id="dfn-test-assertion" title="test assertion">test assertion</dfn> is defined as an instance of the <code>td:TestAssertion</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test assertion.</li>
<li><code>dc:description</code>. The description of the test assertion.</li>
<li><code>tn:outputAsserted</code>. An <a href="#dfn-test-output">output</a> under assertion.</li>
</ul>
<p>The following example contains the description of one of the LDP test cases.</p>
<pre class="example" id="test-case-example">:TCR1 a td:TestCase;
rdfs:label "TC-R1";
dc:title "GET on an LDPR";
dc:description "Tests making a GET request on an existing LDPR";
dc:contributor :RaulGarciaCastro;
td:reviewStatus td:unreviewed;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
td:specificationReference [
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.1.12 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.1 LDPR servers MUST support the HTTP GET Method for LDPRs.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.2 LDPR servers MUST provide a text/turtle representation of the requested LDPR.".
];
td:input :TCR1-I1-LDPR-URI;
td:precondition "The LDP server contains an LDPR at <LDPR URI>";
tn:output :TCR1-RP1-Response-1-GET;
tn:testProcess (:TCR1-RQ1-GET-LDPR-URI);
tn:testAssertion :TCR1-A1-Response-1-GET.
:RaulGarciaCastro a foaf:Person;
rdfs:label "Raúl García-Castro";
owl:sameAs <http://delicias.dia.fi.upm.es/~rgarcia/#me>.
:TCR1-I1-LDPR-URI a tn:TestInput;
dc:title "<LDPR URI>";
dc:description "The URI of an LDPR".
:TCR1-RP1-Response-1-GET a tn:TestOutput;
a ht:Response;
tn:fromStep :TCR1-RQ1-GET-LDPR-URI;
dc:title "<Response 1 GET>";
dc:description "The response of the GET request in step 1".
:TCR1-RQ1-GET-LDPR-URI a tn:Step;
a ht:Request;
dc:description """GET <LDPR URI>
[request-header].Accept = text/turtle""";
tn:usesInput :TCR1-I1-LDPR-URI.
:TCR1-A1-Response-1-GET a tn:TestAssertion;
tn:outputAsserted :TCR1-O1-Response-1-GET;
dc:title "GET correct";
dc:description """[Status-Line].Status-Code = 2xx
[response-header].ETag exists
[entity-header].Content-Type = text/turtle""".
</pre>
</section>
<section>
<h3><a id="ExecutionReportDescription">Execution report description</a></h3>
<p>A <dfn id="dfn-test-execution" title="test execution">test execution</dfn> is defined as an instance of the <code>tn:TestExecution</code> class and it can
be further described using the following properties:</p>
<ul>
<li><code>tn:testExecuted</code>. The <a href="#dfn-test-case">test case</a> (<code>td:TestCase</code>) used in the execution.</li>
<li><code>tn:subjectTested</code>. The subject (<code>doap:Project</code>) tested.</li>
<li><code>dc:date</code>. The date when the test was executed.</li>
<li><code>tn:inputUsed</code>. The <a href="#dfn-test-input-value">input value</a> (<code>tn:TestInputValue</code>) used in the execution.</li>
<li><code>tn:outputProduced</code>. The <a href="#dfn-test-output-value">output value</a> (<code>tn:TestOutputValue</code>) produced in the execution.</li>
</ul>
<p>A <dfn id="dfn-test-input-value" title="test input value">test input value</dfn> is defined as an instance of the <code>tn:TestInputValue</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>tn:relatedInput</code>. The <a href="#dfn-test-input">input</a> in the test definition (<code>tn:TestInput</code>) for which the value is
defined.</li>
<li><code>tn:inputValue</code>. The specific input defined for the execution.</li>
</ul>
<p>A <dfn id="dfn-test-output-value" title="test output value">test output value</dfn> is defined as an instance of the <code>tn:TestOutputValue</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>tn:relatedOutput</code>. The <a href="#dfn-test-output">output</a> in the test definition (<code>tn:TestOutput</code>) for which the value is
defined.</li>
<li><code>tn:outputValue</code>. The specific output defined for the execution.</li>
</ul>
<p>In the LDP test cases, test output values are expected to be HTTP responses (<code>ht:Response</code>).</p>
<p>The following example contains the description of one test execution.</p>
<pre class="example" id="execution-report-example">:TCR1-Execution a tn:TestExecution;
tn:testExecuted ldptc:TCR1;
tn:subjectTested :SomeServer;
dc:date "2013-03-30T09:30:10";
tn:inputUsed [
a tn:TestInputValue ;
tn:relatedInput :TCR1-I1-LDPR-URI ;
tn:inputValue <http://www.example.org/MyResource> .
];
tn:outputProduced [
a tn:TestOutputValue ;
tn:relatedOutput :TCR1-RP1-Response-1-GET ;
tn:outputValue :TCR1-Exec-Response-1-GET .
].
:SomeServer a doap:Project;
doap:name "Sample server".
:TCR1-Exec-Response-1-GET a ht:Response;
ht:httpVersion "1.1";
dc:date "2013-03-30T09:30:10";
ht:sc <http://www.w3.org/2011/http-statusCodes#OK>;
ht:statusCodeValue "200";
ht:reasonPhrase "OK";
ht:headers (
[
a ht:ResponseHeader;
ht:hdrName httph:etag;
ht:fieldName "ETag";
ht:fieldValue "hd73hck43".
]
[
a ht:EntityHeader;
ht:hdrName httph:content-type;
ht:fieldName "Content-Type";
ht:fieldValue "text/turtle; charset=utf-8".
]
);
ht:body [
a cnt:ContentAsText ;
cnt:chars """
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix dc: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<http://example.org/MyResource>
a ldp:Resource;
dc:title "My LDP resource".
""";
cnt:characterEncoding "UTF-8".
].
</pre>
</section>
<section>
<h3><a id="AssertionDescription">Test case assertion description</a></h3>
<p>An <dfn id="dfn-assertion" title="assertion">assertion</dfn> is defined as an instance of the <code>earl:Assertion</code> class and it can be
further described using the following properties:</p>
<ul>
<li><code>earl:subject</code>.The subject (<code>doap:Project</code>) asserted.</li>
<li><code>earl:test</code>. The <a href="#dfn-test-case">test case</a> (<code>td:TestCase</code>) to which the assertion refers to.</li>
<li><code>tn:fromTestExecution</code>. The <a href="#dfn-test-execution">test execution</a> (<code>td:TestExecution</code>) used in the assertion.</li>
<li><code>dc:date</code>. The date when the assertion was performed.</li>
<li><code>earl:assertedBy</code>. The validator (<code>doap:Project</code>) that makes the assertion.</li>
<li><code><code>earl:mode</code>.</code> The execution mode of the validator. In this case it will always be <code>earl:automatic</code>.</li>
<li><code>earl:result</code>. The outcome value (<code>earl:OutcomeValue</code>) of the assertion.</li>
</ul>
<p>The following example contains the description of one test assertion.</p>
<pre class="example" id="test-assertion-example">:TCR1-Assertion-SomeServer a earl:Assertion;
earl:subject sr:SomeServer;
earl:test ldptc:TCR1;
tn:fromTestExecution sr:TCR1-Execution;
dc:date "2013-03-30T09:30:10";
earl:assertedBy :Validator;
earl:mode: earl:automatic;
earl:result [
a earl:OutcomeValue ;
earl:outcome earl:passed .
].
:Validator a doap:Project;
doap:name "Some validator".</pre>
</section>
</section>
<section>
<h2><a id="Tests-LDPRs"></a>Tests for LDPRs</h2>
<p>These tests involve only LDPRs.</p>
<section resource="#TCR1" typeof="td:TestCase">
<h3><a id="TC-R1"><span property="rdfs:label">TC-R1</span>. <span property="dc:title">GET on an LDPR</span></a></h3>
<p property="dc:description">Tests making a GET request on an existing LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong><span property="rdfs:label">Raúl
+ FOAF (<code>foaf</code>), HTTP Vocabulary in RDF (<code>ht</code>), and W3C Test Metadata (<code>td</code>).</p>
<p>All the new required entities that are not covered by those vocabularies have been defined under a new namespace
(<code>tn</code>). Besides, the LDP test cases have been defined under their own namespace (<code>ldptc</code>).</p>
<p>Next we present the definition of these namespaces and of all the namespaces used in the examples.</p>
<pre>cnt: <http://www.w3.org/2011/content#>
dc: <http://purl.org/dc/terms/>
doap: <http://usefulinc.com/ns/doap#>
earl: <http://www.w3.org/ns/earl#>
foaf: <http://xmlns.com/foaf/0.1/>
ht: <http://www.w3.org/2011/http#>
httph: <http://www.w3.org/2011/http-headers#>
ldptc: <http://www.w3.org/TR/ldp/TestCases#>
td: <http://www.w3.org/2006/03/test-description#>
tn: <http://ldp.example.org/NewTestDefinitions#></pre>
</section>
<section>
<h3><a id="TestSuiteDescription">Test suite description</a></h3>
<p><em>To be completed</em></p>
</section>
<section>
<h3><a id="TestCaseDescription">Test case description</a></h3>
<p>A <dfn id="dfn-test-case" title="test case">test case</dfn> is defined as an instance of the <code>td:TestCase</code> class and it can be further
described using the following properties:</p>
<ul>
<li><code>rdfs:label</code>. The human-readable label of the test.</li>
<li><code>dc:title</code>. The name of the test.</li>
<li><code>dc:description</code>. The description of the test.</li>
<li><code>dc:contributor</code>. The person (<code>foaf:Person</code>) contributing the test.</li>
<li><code>td:reviewStatus</code>. The status of the test; possible status are: <code>td:unreviewed</code>, <code>td:approved</code>
or <code>td:rejected</code>.</li>
<li><code>rdfs:seeAlso</code>. A link to the specification it refers to.</li>
<li><code>td:specificationReference</code>. An <a>excerpt</a> (<code>tn:Excerpt</code>) of the specification that is
relevant to the test.</li>
<li><code>td:input</code>. An <a>input</a> (<code>tn:TestInput</code>) used in the test.</li>
<li><code>td:precondition</code>. A precondition that must be satisfied before running the test.</li>
<li><code>tn:output</code>. An <a href="#dfn-test-output">output</a> (<code>tn:TestOutput</code>) to be produced by the test.</li>
<li><code>tn:testProcess</code>. The list of <a href="#dfn-step">steps</a> (<code>tn:Step</code>) to be performed during the test.</li>
<li><code>tn:testAssertion</code>. An <a href="#dfn-test-assertion">assertion</a> (<code>tn:TestAssertion</code>) to be performed over the test output.</li>
</ul>
<p>An <dfn id="dfn-excerpt" title="excerpt">excerpt</dfn> is defined as an instance of the <code>tn:Excerpt </code>class and it can be
further described using the following properties:</p>
<ul>
<li><code>rdfs:seeAlso</code>: The document where the excerpt is included.</li>
<li><code>tn:includesText</code>. The excerpt from the document.</li>
</ul>
<p>A <dfn id="dfn-test-input" title="test input">test input</dfn> is defined as an instance of the <code>td:TestInput </code>class and it can be
further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test input.</li>
<li><code>dc:description</code>. The description of the test input.</li>
</ul>
<p>A <dfn id="dfn-test-output" title="test output">test output</dfn> is defined as an instance of the <code>td:TestOutput</code>
class and it can be further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test output.</li>
<li><code>dc:description</code>. The description of the test output.</li>
<li><code>tn:fromStep</code>. The <a href="#dfn-step">step</a> in the process in which the output is produced.</li>
</ul>
<p>In the LDP test cases, test outputs are expected to be HTTP responses (<code>ht:Response</code>).</p>
<p>A <dfn id="dfn-step" title="test input">step</dfn> in the test process is defined as an instance of the <code>td:Step</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>dc:description</code>. The description of the step.</li>
<li><code>tn:usesInput</code>. A <a href="#dfn-test-input">test input</a> used in the step.</li>
</ul>
<p>In the LDP test cases, steps are expected to be HTTP requests (<code>ht:Request</code>).</p>
<p>A <dfn id="dfn-test-assertion" title="test assertion">test assertion</dfn> is defined as an instance of the <code>td:TestAssertion</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>dc:title</code>: The name of the test assertion.</li>
<li><code>dc:description</code>. The description of the test assertion.</li>
<li><code>tn:outputAsserted</code>. An <a href="#dfn-test-output">output</a> under assertion.</li>
</ul>
<p>The following example contains the description of one of the LDP test cases.</p>
<pre class="example" id="test-case-example">:TCR1 a td:TestCase;
rdfs:label "TC-R1";
dc:title "GET on an LDPR";
dc:description "Tests making a GET request on an existing LDPR";
dc:contributor :RaulGarciaCastro;
td:reviewStatus td:unreviewed;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
td:specificationReference [
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.1.12 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.1 LDPR servers MUST support the HTTP GET Method for LDPRs.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.2 LDPR servers MUST provide a text/turtle representation of the requested LDPR.".
];
td:input :TCR1-I1-LDPR-URI;
td:precondition "The LDP server contains an LDPR at <LDPR URI>";
tn:output :TCR1-O1-Response-1-GET;
tn:testProcess (:TCR1-RQ1-GET-LDPR-URI);
tn:testAssertion :TCR1-A1-Response-1-GET.
:RaulGarciaCastro a foaf:Person;
rdfs:label "Raúl García-Castro";
owl:sameAs <http://delicias.dia.fi.upm.es/~rgarcia/#me>.
:TCR1-I1-LDPR-URI a tn:TestInput;
dc:title "<LDPR URI>";
dc:description "The URI of an LDPR".
:TCR1-O1-Response-1-GET a tn:TestOutput;
a ht:Response;
tn:fromStep :TCR1-RQ1-GET-LDPR-URI;
dc:title "<Response 1 GET>";
dc:description "The response of the GET request in step 1".
:TCR1-RQ1-GET-LDPR-URI a tn:Step;
a ht:Request;
dc:description """GET <LDPR URI>
[request-header].Accept = text/turtle""";
tn:usesInput :TCR1-I1-LDPR-URI.
:TCR1-A1-Response-1-GET a tn:TestAssertion;
tn:outputAsserted :TCR1-O1-Response-1-GET;
dc:title "GET correct";
dc:description """[Status-Line].Status-Code = 2xx
[response-header].ETag exists
[entity-header].Content-Type = text/turtle""".
</pre>
</section>
<section>
<h3><a id="ExecutionReportDescription">Execution report description</a></h3>
<p>A <dfn id="dfn-test-execution" title="test execution">test execution</dfn> is defined as an instance of the <code>tn:TestExecution</code> class and it can
be further described using the following properties:</p>
<ul>
<li><code>tn:testExecuted</code>. The <a href="#dfn-test-case">test case</a> (<code>td:TestCase</code>) used in the execution.</li>
<li><code>tn:subjectTested</code>. The subject (<code>doap:Project</code>) tested.</li>
<li><code>dc:date</code>. The date when the test was executed.</li>
<li><code>tn:inputUsed</code>. The <a href="#dfn-test-input-value">input value</a> (<code>tn:TestInputValue</code>) used in the execution.</li>
<li><code>tn:outputProduced</code>. The <a href="#dfn-test-output-value">output value</a> (<code>tn:TestOutputValue</code>) produced in the execution.</li>
</ul>
<p>A <dfn id="dfn-test-input-value" title="test input value">test input value</dfn> is defined as an instance of the <code>tn:TestInputValue</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>tn:relatedInput</code>. The <a href="#dfn-test-input">input</a> in the test definition (<code>tn:TestInput</code>) for which the value is
defined.</li>
<li><code>tn:inputValue</code>. The specific input defined for the execution.</li>
</ul>
<p>A <dfn id="dfn-test-output-value" title="test output value">test output value</dfn> is defined as an instance of the <code>tn:TestOutputValue</code> class and it
can be further described using the following properties:</p>
<ul>
<li><code>tn:relatedOutput</code>. The <a href="#dfn-test-output">output</a> in the test definition (<code>tn:TestOutput</code>) for which the value is
defined.</li>
<li><code>tn:outputValue</code>. The specific output defined for the execution.</li>
</ul>
<p>In the LDP test cases, test output values are expected to be HTTP responses (<code>ht:Response</code>).</p>
<p>The following example contains the description of one test execution.</p>
<pre class="example" id="execution-report-example">:TCR1-Execution a tn:TestExecution;
tn:testExecuted ldptc:TCR1;
tn:subjectTested :SomeServer;
dc:date "2013-03-30T09:30:10";
tn:inputUsed [
a tn:TestInputValue ;
tn:relatedInput :TCR1-I1-LDPR-URI ;
tn:inputValue <http://www.example.org/MyResource> .
];
tn:outputProduced [
a tn:TestOutputValue ;
tn:relatedOutput :TCR1-O1-Response-1-GET ;
tn:outputValue :TCR1-Exec-Response-1-GET .
].
:SomeServer a doap:Project;
doap:name "Sample server".
:TCR1-Exec-Response-1-GET a ht:Response;
ht:httpVersion "1.1";
dc:date "2013-03-30T09:30:10";
ht:sc <http://www.w3.org/2011/http-statusCodes#OK>;
ht:statusCodeValue "200";
ht:reasonPhrase "OK";
ht:headers (
[
a ht:ResponseHeader;
ht:hdrName httph:etag;
ht:fieldName "ETag";
ht:fieldValue "hd73hck43".
]
[
a ht:EntityHeader;
ht:hdrName httph:content-type;
ht:fieldName "Content-Type";
ht:fieldValue "text/turtle; charset=utf-8".
]
);
ht:body [
a cnt:ContentAsText ;
cnt:chars """
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix dc: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<http://example.org/MyResource>
a ldp:Resource;
dc:title "My LDP resource".
""";
cnt:characterEncoding "UTF-8".
].
</pre>
</section>
<section>
<h3><a id="AssertionDescription">Test case assertion description</a></h3>
<p>An <dfn id="dfn-assertion" title="assertion">assertion</dfn> is defined as an instance of the <code>earl:Assertion</code> class and it can be
further described using the following properties:</p>
<ul>
<li><code>earl:subject</code>.The subject (<code>doap:Project</code>) asserted.</li>
<li><code>earl:test</code>. The <a href="#dfn-test-case">test case</a> (<code>td:TestCase</code>) to which the assertion refers to.</li>
<li><code>tn:fromTestExecution</code>. The <a href="#dfn-test-execution">test execution</a> (<code>td:TestExecution</code>) used in the assertion.</li>
<li><code>dc:date</code>. The date when the assertion was performed.</li>
<li><code>earl:assertedBy</code>. The validator (<code>doap:Project</code>) that makes the assertion.</li>
<li><code><code>earl:mode</code>.</code> The execution mode of the validator. In this case it will always be <code>earl:automatic</code>.</li>
<li><code>earl:result</code>. The outcome value (<code>earl:OutcomeValue</code>) of the assertion.</li>
</ul>
<p>The following example contains the description of one test assertion.</p>
<pre class="example" id="test-assertion-example">:TCR1-Assertion-SomeServer a earl:Assertion;
earl:subject sr:SomeServer;
earl:test ldptc:TCR1;
tn:fromTestExecution sr:TCR1-Execution;
dc:date "2013-03-30T09:30:10";
earl:assertedBy :Validator;
earl:mode: earl:automatic;
earl:result [
a earl:OutcomeValue ;
earl:outcome earl:passed .
].
:Validator a doap:Project;
doap:name "Some validator".</pre>
</section>
</section>
<section>
<h2><a id="Tests-LDPRs"></a>Tests for LDPRs</h2>
<p>These tests involve only LDPRs.</p>
<section resource="#TCR1" typeof="td:TestCase">
<h3><a id="TC-R1"><span property="rdfs:label">TC-R1</span>. <span property="dc:title">GET on an LDPR</span></a></h3>
<p property="dc:description">Tests making a GET request on an existing LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong><span property="rdfs:label">Raúl
García-Castro</span><span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed
-</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.1.12 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.1 LDPR servers MUST support the HTTP GET Method for LDPRs.</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.2 LDPR servers MUST provide a text/turtle representation of the requested LDPR.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR1-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR1-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description"> GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR1-I1-LDPR-URI"> </span></li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR1-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"> <em property="dc:title"><Response
+</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.8 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.3.1 LDPR servers MUST support the HTTP GET Method for LDPRs.</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR1-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR1-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description"> GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR1-I1-LDPR-URI"> </span></li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"> <em property="dc:title"><Response
1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span> <span property="tn:fromStep" resource="#TCR1-RQ1-GET-LDPR-URI"></span></li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR1-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted"
resource="TCR1-O1-Response-1-GET">Assert
- <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR2" typeof="td:TestCase">
<h3><a id="TC-R2"><span property="rdfs:label">TC-R2</span>. <span property="dc:title">GET on an LDPR without content type</span></a></h3>
<p property="dc:description">Tests making a GET request on an existing LDPR without indicating a content type.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl
- García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.3 [...] If the client does not indicate a preference, text/turtle MUST be returned.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR2-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR2-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR2-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR2-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span> <span property="tn:fromStep"
resource="#TCR2-RQ1-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR2-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR3" typeof="td:TestCase">
<h3><a id="TC-R3"><span property="rdfs:label">TC-R3</span>. <span property="dc:title">GET on a non-existing LDPR</span></a></h3>
<p property="dc:description">Tests making a GET request on a non-existing LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR3-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of a non-existing LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server does not contain an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR3-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR3-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR3-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR3-RQ1-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR3-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR3-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET incorrect</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 404 or 410</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR4" typeof="td:TestCase">
<h3><a id="TC-R4"><span property="rdfs:label">TC-R4</span>. <span property="dc:title">PUT on an LDPR</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPR.</p> <p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">3.11 [...] An entity tag MUST be unique across all versions of all entities associated with a particular resource.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCR4-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPR the current representation at <LDPR URI></li>
<li property="td:precondition">The LDP server does not desire that the request be applied to a different URI</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ2-PUT-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPR URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ3-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR4-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR4-RQ1-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR4-RP2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCR4-RQ2-PUT-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR4-RP3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCR4-RQ3-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR4-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A2-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A3-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">LDPR updated</span>):
<div property="dc:description">
<ul>
<li>[response-header].ETag != <Response 1 GET>.[response-header].ETag</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR5" typeof="td:TestCase">
<h3><a id="TC-R5"><span property="rdfs:label">TC-R5</span>. <span property="dc:title">PUT on an LDPR without matching ETags</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPR without matching ETags.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.4.2 [...] LDPR servers MUST respond with status code 412 (Condition Failed) if ETags fail to match if there are no other errors with the request.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCR5-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPR the current representation at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR5-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR5-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR5-RQ2-PUT-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPR URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag + 'M'</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR5-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR5-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR5-RQ1-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR5-RP2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCR5-RQ2-PUT-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR5-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR5-A2-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR5-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 412</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR6" typeof="td:TestCase">
<h3><a id="TC-R6"><span property="rdfs:label">TC-R6</span>. <span property="dc:title">DELETE on an LDPR</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR6-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows DELETE</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR6-RQ1-DELETE-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCR6-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR6-RQ2-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR6-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR6-RP1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCR6-RQ1-DELETE-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR6-RP2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCR6-RQ2-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR6-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR6-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410</li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204) </li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR7" typeof="td:TestCase">
<h3><a id="TC-R7"><span property="rdfs:label">TC-R7</span>. <span property="dc:title">HEAD on an LDPR</span></a></h3>
<p property="dc:description">Tests making a HEAD request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST support the HTTP HEAD method.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.2 LDPR servers MUST indicate their support for HTTP Methods by responding to a HTTP HEAD request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header “Allow”. </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR7-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR7-RQ1-HEAD-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCR7-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR7-RP1-Response-1-HEAD" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 HEAD></em>. <span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCR7-RQ1-HEAD-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR7-A1-Response-1-HEAD" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR7-O1-Response-1-HEAD">Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx<strong> </strong></li>
<li>[entity-header].Allow exists</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div></li>
</ul>
</section>
</section>
<section>
<h2><a id="Tests-LDPCs"></a>Tests for LDPCs</h2>
<p>These tests involve LDPCs and LDPRs.</p>
<section resource="#TCC1" typeof="td:TestCase">
<h3><a id="TC-C1"><span property="rdfs:label">TC-C1</span>. <span property="dc:title">GET on an LDPC</span></a></h3>
<p property="dc:description">Tests making a GET request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.1.12 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.1 LDPR servers MUST support the HTTP GET Method for LDPRs.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.2 LDPR servers MUST provide a text/turtle representation of the requested LDPR.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.2.7 The representation of a LDPC MUST have rdf:type of ldp:Container, but it MAY have additional rdf:types.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC1-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC1-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC1-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC1-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC1-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC1-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC1-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC1-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC1-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC2" typeof="td:TestCase">
<h3><a id="TC-C2"><span property="rdfs:label">TC-C2</span>. <span property="dc:title">GET on an LDPC without content type</span></a></h3>
<p property="dc:description">Tests making a GET request on an LDPC without content type.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.3 [...] If the client does not indicate a preference, text/turtle MUST be returned.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC2-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC2-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC2-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC2-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC2-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC2-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC2-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC3" typeof="td:TestCase">
<h3><a id="TC-C3"><span property="rdfs:label">TC-C3</span>. <span property="dc:title">GET on a non-existing LDPC</span></a></h3>
<p property="dc:description">Tests making a GET request on an non-existing LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC3-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of a non-existing LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server does not contain an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC3-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC3-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC3-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC3-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC3-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC3-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET incorrect</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 404 or 410</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC4" typeof="td:TestCase">
<h3><a id="TC-C4"><span property="rdfs:label">TC-C4</span>. <span property="dc:title">PUT on an LDPC</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">3.11 [...] An entity tag MUST be unique across all versions of all entities associated with a particular resource.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCC4-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPC the current representation at <LDPC URI></li>
<li property="td:precondition">The LDP server does not desire that the request be applied to a different URI</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ2-PUT-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPC URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC4-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC4-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC4-RP2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCC4-RQ2-PUT-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC4-RP3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC4-RQ3-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC4-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A3-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A5-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A6-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">LDPC updated</span>):
<div property="dc:description">
<ul>
<li>[response-header].ETag != <Response 1 GET>.[response-header].ETag</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC5" typeof="td:TestCase">
<h3><a id="TC-C5"><span property="rdfs:label">TC-C5</span>. <span property="dc:title">PUT on an LDPC without matching ETags</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPC without matching ETags.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.4.2 [...] LDPR servers MUST respond with status code 412 (Condition Failed) if ETags fail to match if there are no other errors with the request.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC5-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPC the current representation at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC5-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC5-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC5-RQ2-PUT-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPC URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag + 'M'</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC5-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC5-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC5-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC5-RP2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCC5-RQ2-PUT-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC5-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC5-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC5-A3-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 412</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC6" typeof="td:TestCase">
<h3><a id="TC-C6"><span property="rdfs:label">TC-C6</span>. <span property="dc:title">DELETE on an LDPC</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC6-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows DELETE</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC6-RQ1-DELETE-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC6-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC6-RQ2-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC6-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC6-RP1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCC6-RQ1-DELETE-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC6-RP2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCC6-RQ2-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC6-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC6-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410</li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204)</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC7" typeof="td:TestCase">
<h3><a id="TC-C7"><span property="rdfs:label">TC-C7</span>. <span property="dc:title">DELETE on an LDPR in an LDPC</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPR in an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.6.1 When a LDPC member resource originally created by the LDPC (for example, one referenced by a membership triple) is deleted, and the LDPC server is aware of the member's deletion (for example, the member is managed by the same server), the LDPC server MUST also remove it from the LDPC by removing the corresponding membership triple.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC7-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
<li property="td:input" resource="#TCC7-I2-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR that is a member of the LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR is a member of the LDPC</li>
<li property="td:precondition">The LDPR at <LDPR URI> allows DELETE</li>
<li property="td:precondition">The LDPR was originally created by the LDPC</li>
<li property="td:precondition">The LDPC is aware of the member's deletion</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ1-DELETE-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCC7-I2-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ2-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC7-I2-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC7-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC7-RP1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCC7-RQ1-DELETE-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCC7-RP2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCC7-RQ2-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCC7-RP3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC7-RQ3-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC7-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410<strong> </strong></li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204)</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A2-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A3-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">member removed from container</span>)
<div property="dc:description">
<ul>
<li>[message-body] not contains the member identified by <LDPR URI></li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC8" typeof="td:TestCase">
<h3><a id="TC-C8"><span property="rdfs:label">TC-C8</span>. <span property="dc:title">HEAD on an LDPC</span></a></h3>
<p property="dc:description">Tests making a HEAD request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST support the HTTP HEAD method.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.2 LDPR servers MUST indicate their support for HTTP Methods by responding to a HTTP HEAD request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header “Allow”.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso"><em>Hypertext Transfer Protocol -- HTTP/1.1</em></a>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC8-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC8-RQ1-HEAD-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC8-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC8-RP1-Response-1-HEAD" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 HEAD></em>. <span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCC8-RQ1-HEAD-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC8-A1-Response-1-HEAD" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC8-O1-Response-1-HEAD">Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx<strong> </strong></li>
<li>[entity-header].Allow exists</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC9" typeof="td:TestCase">
<h3><a id="TC-C9"><span property="rdfs:label">TC-C9</span>. <span property="dc:title">POST an LDPR on an LDPC</a></h3>
<p property="dc:description">Tests making a POST request of an LDPR on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.1 [...] If the resource was created successfully, LDPC servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL. [...] </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.2 After a successful HTTP POST request to a LDPC, the new resource MUST appear as a member of the LDPC until the new resource is deleted or removed by other methods. [...] </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.4 For servers that support create, LDPC servers MUST create an LDPR from a RDF representation in the request entity body. [...]</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.5 LDPC servers MUST accept a request entity body with a request header of Content-Type with value of text/turtle. </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC9-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
<li property="td:input" resource="#TCC9-I2-LDPR-REP" typeof="tn:TestInput"><em property="dc:title"><LDPR representation></em>. <span property="dc:description">The representation of the LDPR to be created</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows POST</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource</li>
<li property="td:precondition"><LDPR representation> is in text/turtle</li>
<li property="td:precondition"><LDPR representation> is a valid representation for a resource to be created in the LDPC</li>
<li property="td:precondition"><LDPR representation> uses null relative URI as the entity in the request body</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDPC URI>
<ul>
<li>[entity-header].Content-type = text/turtle</li>
<li>[message-body] = <LDPR representation></li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCC9-I2-LDPR-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location
<ul>
<li>[request-header].Accept = text/turtle</li>
</ul>
</div>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC9-RP1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC9-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-RP2-Response-2-POST" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 POST></em>. <span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCC9-RQ2-POST-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-RP3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC9-RQ3-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-RP4-Response-4-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 4 GET></em>. <span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCC9-RQ4-GET-LOC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC9-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A3-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">container does not have member</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain a member identified by <Response 2
POST>.[response-header].Location</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A4-Response-2-POST" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O2-Response-2-POST">Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A5-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A6-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A7-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">container has member</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains a member identified by <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A8-Response-4-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O4-Response-4-GET">Assert <Response 4 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
</ul>
</section>
</section>
<section class="appendix">
<h2>Recommendation coverage</h2>
<p>The following absolute requirements in the specification for <a>LDP Core</a> are not covered by the current test suite. </p>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li>4.4.1 If HTTP PUT is performed on an existing resource, LDPR servers
MUST replace the entire persistent state of the identified resource with
the entity representation in the body of the request. </li>
<li>5.4.7 In RDF representations, LDPC servers MUST interpret the null
relative URI for the subject of triples in the LDPR representation in
the request entity body as referring to the entity in the request body.
[...]</li>
</ul>
</section>
<section class="appendix">
<h2><a id="ChangeHistory">Change history</a></h2>
<ul>
<li>2013-06-03 Updated to use ReSpec (RGC)</li>
<li>2013-06-03 Implemented <a href="http://lists.w3.org/Archives/Public/public-ldp-wg/2013May/0153.html">changes suggested by Eric Prud'hommeaux</a> (RGC)</li>
</ul>
</section>
<section class="appendix">
<h2><a id="EditorNotes">Editor TODOs and notes</a></h2>
<ul>
<li>Add tests for MUSTs related to containers when the issue about aggregation and composition is solved</li>
<li>Choose a namespace for the new vocabulary terms and for the test cases</li>
<li>Include the RDF description of the test suite</li>
<li>Write abstract and introduction</li>
<li>Provide sample inputs and expected outputs for generic LDP servers</li>
<li>Add references</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file
+ <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
</ul>
</section>
<!-- RGC: Test removed since 4.3.4 is no longer an absolute requirement
<section resource="#TCR2" typeof="td:TestCase">
<h3><a id="TC-R2"><span property="rdfs:label">TC-R2</span>. <span property="dc:title">GET on an LDPR without content type</span></a></h3>
<p property="dc:description">Tests making a GET request on an existing LDPR without indicating a content type.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl
+ García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.3.4 [...] If the client does not indicate a preference, text/turtle SHOULD be returned.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR2-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR2-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR2-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR2-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span> <span property="tn:fromStep"
resource="#TCR2-RQ1-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR2-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
</ul>
</section>
-->
<section resource="#TCR3" typeof="td:TestCase">
<h3><a id="TC-R3"><span property="rdfs:label">TC-R3</span>. <span property="dc:title">GET on a non-existing LDPR</span></a></h3>
<p property="dc:description">Tests making a GET request on a non-existing LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR3-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of a non-existing LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server does not contain an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR3-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR3-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR3-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR3-RQ1-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR3-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR3-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET incorrect</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 404 or 410</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR4" typeof="td:TestCase">
<h3><a id="TC-R4"><span property="rdfs:label">TC-R4</span>. <span property="dc:title">PUT on an LDPR</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPR.</p> <p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">3.11 [...] An entity tag MUST be unique across all versions of all entities associated with a particular resource.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCR4-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPR the current representation at <LDPR URI></li>
<li property="td:precondition">The LDP server does not desire that the request be applied to a different URI</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ2-PUT-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPR URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR4-RQ3-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR4-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR4-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR4-RQ1-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR4-O2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCR4-RQ2-PUT-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR4-O3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCR4-RQ3-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR4-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A2-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A3-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR4-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">LDPR updated</span>):
<div property="dc:description">
<ul>
<li>[response-header].ETag != <Response 1 GET>.[response-header].ETag</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR5" typeof="td:TestCase">
<h3><a id="TC-R5"><span property="rdfs:label">TC-R5</span>. <span property="dc:title">PUT on an LDPR without matching ETags</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPR without matching ETags.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.2 [...] LDPR servers MUST respond with status code 412 (Condition Failed) if ETags fail to match when there are no other errors with the request. [...]</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCR5-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPR the current representation at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR5-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR5-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR5-RQ2-PUT-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPR URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag + 'M'</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCR5-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR5-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR5-RQ1-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR5-O2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCR5-RQ2-PUT-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR5-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR5-A2-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR5-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT incorrect</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 412</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR6" typeof="td:TestCase">
<h3><a id="TC-R6"><span property="rdfs:label">TC-R6</span>. <span property="dc:title">DELETE on an LDPR</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR6-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR at <LDPR URI> allows DELETE</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR6-RQ1-DELETE-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCR6-I1-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCR6-RQ2-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR6-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR6-O1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCR6-RQ1-DELETE-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCR6-O2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCR6-RQ2-GET-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR6-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR6-O1-Response-1-DELETE">Assert <Response 1 DELETE> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCR6-A2-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR6-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE resource correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410</li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204) </li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCR7" typeof="td:TestCase">
<h3><a id="TC-R7"><span property="rdfs:label">TC-R7</span>. <span property="dc:title">HEAD on an LDPR</span></a></h3>
<p property="dc:description">Tests making a HEAD request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.7.1 LDPR servers MUST support the HTTP HEAD method.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR7-I1-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR7-RQ1-HEAD-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCR7-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR7-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 HEAD></em>. <span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCR7-RQ1-HEAD-LDPR-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR7-A1-Response-1-HEAD" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCR7-O1-Response-1-HEAD">Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div></li>
</ul>
</section>
</section>
<section>
<h2><a id="Tests-LDPCs"></a>Tests for LDPCs</h2>
<p>These tests involve LDPCs and LDPRs.</p>
<section resource="#TCC1" typeof="td:TestCase">
<h3><a id="TC-C1"><span property="rdfs:label">TC-C1</span>. <span property="dc:title">GET on an LDPC</span></a></h3>
<p property="dc:description">Tests making a GET request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.8 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.3.1 LDPR servers MUST support the HTTP GET Method for LDPRs.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.2.7 The representation of a LDPC MUST have rdf:type of ldp:Container, but it MAY have additional rdf:types.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC1-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC1-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC1-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC1-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC1-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC1-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC1-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC1-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
</ul>
</section>
<!-- RGC: Test removed since 4.3.4 is no longer an absolute requirement
<section resource="#TCC2" typeof="td:TestCase">
<h3><a id="TC-C2"><span property="rdfs:label">TC-C2</span>. <span property="dc:title">GET on an LDPC without content type</span></a></h3>
<p property="dc:description">Tests making a GET request on an LDPC without content type.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.3.4 [...] If the client does not indicate a preference, text/turtle SHOULD be returned.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC2-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC2-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC2-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC2-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC2-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC2-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[entity-header].Content-Type = text/turtle</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC2-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC2-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
</ul>
</section>
-->
<section resource="#TCC3" typeof="td:TestCase">
<h3><a id="TC-C3"><span property="rdfs:label">TC-C3</span>. <span property="dc:title">GET on a non-existing LDPC</span></a></h3>
<p property="dc:description">Tests making a GET request on an non-existing LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC3-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of a non-existing LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server does not contain an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC3-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC3-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC3-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC3-RQ1-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC3-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC3-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET incorrect</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 404 or 410</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC4" typeof="td:TestCase">
<h3><a id="TC-C4"><span property="rdfs:label">TC-C4</span>. <span property="dc:title">PUT on an LDPC</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol -- HTTP/1.1</a>:</em></p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">3.11 [...] An entity tag MUST be unique across all versions of all entities associated with a particular resource.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input </h4>
<ul>
<li property="td:input" resource="#TCC4-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPC the current representation at <LDPC URI></li>
<li property="td:precondition">The LDP server does not desire that the request be applied to a different URI</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ2-PUT-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPC URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC4-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC4-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC4-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC4-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC4-O2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCC4-RQ2-PUT-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC4-O3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC4-RQ3-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC4-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A3-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A5-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC4-A6-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC4-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">LDPC updated</span>):
<div property="dc:description">
<ul>
<li>[response-header].ETag != <Response 1 GET>.[response-header].ETag</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC5" typeof="td:TestCase">
<h3><a id="TC-C5"><span property="rdfs:label">TC-C5</span>. <span property="dc:title">PUT on an LDPC without matching ETags</span></a></h3>
<p property="dc:description">Tests making a PUT request on an LDPC without matching ETags.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.5.2 [...] LDPR servers MUST respond with status code 412 (Condition Failed) if ETags fail to match when there are no other errors with the request. [...]</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC5-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows PUT</li>
<li property="td:precondition">The LDP server allows updating in the LDPC the current representation at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC5-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC5-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC5-RQ2-PUT-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">PUT <LDPC URI>
<ul>
<li>[request-header].If-Match = <Response GET 1>.[response-header].ETag + 'M'</li>
<li>[message-body] = <Response GET 1>.[message-body]</li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC5-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC5-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC5-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC5-O2-Response-2-PUT" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 PUT></em>. <span property="dc:description">The response of the PUT request in step 2.</span>
<span property="tn:fromStep" resource="#TCC5-RQ2-PUT-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC5-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC5-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC5-A3-Response-2-PUT" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC5-O2-Response-2-PUT">Assert <Response 2 PUT> (<span property="dc:title">PUT correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 412</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC6" typeof="td:TestCase">
<h3><a id="TC-C6"><span property="rdfs:label">TC-C6</span>. <span property="dc:title">DELETE on an LDPC</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.6.1 LDPR servers MUST remove the resource identified by the Request-URI. After a successful HTTP DELETE, a subsequent HTTP GET on the same Request-URI MUST result in a 404 (Not found) or 410 (Gone) status code.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC6-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows DELETE</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC6-RQ1-DELETE-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC6-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC6-RQ2-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC6-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC6-O1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCC6-RQ1-DELETE-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC6-O2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCC6-RQ2-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC6-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC6-O1-Response-1-DELETE">Assert <Response 1 DELETE> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC6-A2-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC6-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE resource correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410</li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204)</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC7" typeof="td:TestCase">
<h3><a id="TC-C7"><span property="rdfs:label">TC-C7</span>. <span property="dc:title">DELETE on an LDPR in an LDPC</span></a></h3>
<p property="dc:description">Tests making a DELETE request on an LDPR in an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.6.1 When a LDPC member resource originally created by the LDPC (for example, one whose representation was HTTP POSTed to the LDPC and then referenced by a membership triple) is deleted, and the LDPC server is aware of the member's deletion (for example, the member is managed by the same server), the LDPC server MUST also remove it from the LDPC by removing the corresponding membership triple.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC7-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
<li property="td:input" resource="#TCC7-I2-LDPR-URI" typeof="tn:TestInput"><em property="dc:title"><LDPR URI></em>. <span property="dc:description">The URI of an LDPR that is a member of the LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
<li property="td:precondition">The LDPR is a member of the LDPC</li>
<li property="td:precondition">The LDPR at <LDPR URI> allows DELETE</li>
<li property="td:precondition">The LDPR was originally created by the LDPC</li>
<li property="td:precondition">The LDPC is aware of the member's deletion</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ1-DELETE-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">DELETE <LDPR URI>
</div>
<span property="tn:usesInput" resource="#TCC7-I2-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ2-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCC7-I2-LDPR-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC7-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC7-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC7-O1-Response-1-DELETE" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 DELETE></em>. <span property="dc:description">The response of the DELETE request in step 1.</span>
<span property="tn:fromStep" resource="#TCC7-RQ1-DELETE-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCC7-O2-Response-2-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 GET></em>. <span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCC7-RQ2-GET-LDPR-URI">
</span>
</li>
<li property="td:output" resource="#TCC7-O3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC7-RQ3-GET-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC7-A1-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O1-Response-1-DELETE">Assert <Response 1 DELETE> (<span property="dc:title">DELETE correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A2-Response-1-DELETE" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O1-Response-1-DELETE">Assert <Response 1 DELETE> <Response 2 GET> (<span property="dc:title">DELETE resource correct</span>):
<div property="dc:description">
<ul>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 200 or 204 and <Response 2 GET>.[Status-Line].Status-Code = 404 or 410</li>
<li>or </li>
<li><Response 1 DELETE>.[Status-Line].Status-Code = 2xx (except 200 and 204)</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A3-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A4-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC7-A5-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC7-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">member removed from container</span>)
<div property="dc:description">
<ul>
<li>[message-body] not contains the member identified by <LDPR URI></li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC8" typeof="td:TestCase">
<h3><a id="TC-C8"><span property="rdfs:label">TC-C8</span>. <span property="dc:title">HEAD on an LDPC</span></a></h3>
<p property="dc:description">Tests making a HEAD request on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.7.1 LDPR servers MUST support the HTTP HEAD method.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<p><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso"><em>Hypertext Transfer Protocol -- HTTP/1.1</em></a>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span><span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC8-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC8-RQ1-HEAD-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDPC URI>
</div>
<span property="tn:usesInput" resource="#TCC8-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC8-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 HEAD></em>. <span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCC8-RQ1-HEAD-LDPC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC8-A1-Response-1-HEAD" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC8-O1-Response-1-HEAD">Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div></li>
</ul>
</section>
<section resource="#TCC9" typeof="td:TestCase">
<h3><a id="TC-C9"><span property="rdfs:label">TC-C9</span>. <span property="dc:title">POST an LDPR on an LDPC</a></h3>
<p property="dc:description">Tests making a POST request of an LDPR on an LDPC.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person"><strong>Contributor: </strong> <span property="rdfs:label">Raúl García-Castro</span> <span property="owl:sameAs" href="http://delicias.dia.fi.upm.es/%7Ergarcia/#me"></span></p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus"><strong>Status: </strong>Unreviewed</p>
<h4>Related specification</h4>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]</span><span
property="rdfs:seeAlso"
href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.1 [...] If the resource was created successfully, LDPC servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL. [...] </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.2 After a successful HTTP POST request to a LDPC, the new resource MUST appear as a member of the LDPC until the new resource is deleted or removed by other methods. [...] </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.4 For servers that support create, LDPC servers MUST create an LDPR from a RDF representation in the request entity body. [...]</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div><span property="tn:includesText">5.4.5 LDPC servers MUST accept a request entity body with a request header of Content-Type with value of text/turtle. </span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span></div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCC9-I1-LDPC-URI" typeof="tn:TestInput"><em property="dc:title"><LDPC URI></em>. <span property="dc:description">The URI of an LDPC.</span></li>
<li property="td:input" resource="#TCC9-I2-LDPR-REP" typeof="tn:TestInput"><em property="dc:title"><LDPR representation></em>. <span property="dc:description">The representation of the LDPR to be created</span></li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPC at <LDPC URI></li>
<li property="td:precondition">The LDPC at <LDPC URI> allows POST</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource</li>
<li property="td:precondition"><LDPR representation> is in text/turtle</li>
<li property="td:precondition"><LDPR representation> is a valid representation for a resource to be created in the LDPC</li>
<li property="td:precondition"><LDPR representation> uses null relative URI as the entity in the request body</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDPC URI>
<ul>
<li>[entity-header].Content-type = text/turtle</li>
<li>[message-body] = <LDPR representation></li>
</ul>
</div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCC9-I2-LDPR-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPC URI></div>
<span property="tn:usesInput" resource="#TCC9-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCC9-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCC9-O1-Response-1-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 1 GET></em>. <span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCC9-RQ1-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-O2-Response-2-POST" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 2 POST></em>. <span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCC9-RQ2-POST-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-O3-Response-3-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 3 GET></em>. <span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCC9-RQ3-GET-LDPC-URI">
</span>
</li>
<li property="td:output" resource="#TCC9-O4-Response-4-GET" typeof="tn:TestOutput ht:Response"><em property="dc:title"><Response 4 GET></em>. <span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCC9-RQ4-GET-LOC-URI">
</span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCC9-A1-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A2-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A3-Response-1-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O1-Response-1-GET">Assert <Response 1 GET> (<span property="dc:title">container does not have member</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain a member identified by <Response 2
POST>.[response-header].Location</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A4-Response-2-POST" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O2-Response-2-POST">Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A5-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A6-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">GET container correct</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains rdf:type ldp:Container</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A7-Response-3-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O3-Response-3-GET">Assert <Response 3 GET> (<span property="dc:title">container has member</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains a member identified by <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div></li>
<li property="tn:testAssertion" resource="#TCC9-A8-Response-4-GET" typeof="tn:TestAssertion"><div property="tn:outputAsserted" resource="TCC9-O4-Response-4-GET">Assert <Response 4 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link = ldp:Resource; rel="type"</li>
</ul>
</div>
</div></li>
</ul>
</section>
</section>
<section class="appendix">
<h2>Recommendation coverage</h2>
<p>The following absolute requirements in the specification for <a>LDP Core</a> are not covered by the current test suite. </p>
<p><em><a target="_blank" href="http://www.w3.org/TR/ldp/">Linked Data Platform 1.0</a></em>:</p>
<ul>
<li>4.4.1 If HTTP PUT is performed on an existing resource, LDPR servers
MUST replace the entire persistent state of the identified resource with
the entity representation in the body of the request. </li>
<li>5.4.7 In RDF representations, LDPC servers MUST interpret the null
relative URI for the subject of triples in the LDPR representation in
the request entity body as referring to the entity in the request body.
[...]</li>
</ul>
</section>
<section class="appendix">
<h2><a id="ChangeHistory">Change history</a></h2>
<ul>
<li>2013-06-03 Updated to use ReSpec (RGC)</li>
<li>2013-06-03 Implemented <a href="http://lists.w3.org/Archives/Public/public-ldp-wg/2013May/0153.html">changes suggested by Eric Prud'hommeaux</a> (RGC)</li>
</ul>
</section>
<section class="appendix">
<h2><a id="EditorNotes">Editor TODOs and notes</a></h2>
<ul>
<li>Add tests for MUSTs related to containers when the issue about aggregation and composition is solved</li>
<li>Choose a namespace for the new vocabulary terms and for the test cases</li>
<li>Include the RDF description of the test suite</li>
<li>Write abstract and introduction</li>
<li>Refer to Primer for sample inputs and expected outputs for generic LDP servers</li>
<li>Update RDF examples</li>
<li>Add references</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file
--- a/ldp-primer/ldp-primer.html Fri Aug 09 12:46:04 2013 +0100
+++ b/ldp-primer/ldp-primer.html Fri Aug 09 12:48:15 2013 +0100
@@ -1,1 +1,1 @@
-<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
prefix="td: http://www.w3.org/2006/03/test-description# tn: http://ldp.example.org/NewTestDefinitions# ht: http://www.w3.org/2011/http#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Linked Data Platform 1.0 Primer</title>
<style type="text/css">
div.syntaxmenu {
border: 1px dotted black;
padding:0 0 0 0.5em;
margin: 0em;
}
td.col1 {
width: 300px;
vertical-align: top;
padding: 30px 0 0 0;
}
</style>
<script type="text/javascript">
var displayed = [];
displayed["turtle"] = 1;
displayed["jsonld"] = 0;
function primerOnLoad() {
setTimeout(function(){
display('turtle', ''); set_display_by_id('hide-ts', ''); set_display_by_id('show-ts', 'none');
display('jsonld', 'none'); set_display_by_id('hide-js', 'none'); set_display_by_id('show-js', '');
},500)
}
function display(syntax,status) {
var howmany = 0;
if (status=='none') {
displayed[syntax] = 0;
} else {
displayed[syntax] = 1;
}
for ( i in displayed ) {
howmany = howmany + displayed[i];
}
set_display_by_class('div',syntax,status);
if ( howmany == 1 ) {
set_display_by_class('b','syntax-head','none');
} else {
set_display_by_class('b','syntax-head','');
}
}
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (! (! (strTagName == "*") || ! (oElm.all)))? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; !(i>=oClassNames.length); i++){ /*>*/
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
}
}
else{
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
}
var oElement;
var bMatchesAll;
for(var j=0; !(j>=arrElements.length); j++){ /*>*/
oElement = arrElements[j];
bMatchesAll = true;
for(var k=0; !(k>=arrRegExpClassNames.length); k++){ /*>*/
if(!arrRegExpClassNames[k].test(oElement.className)){
bMatchesAll = false;
break;
}
}
if(bMatchesAll){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
function set_display_by_class(el, cls, newValue) {
var e = getElementsByClassName(document, el, cls);
if (e != null) {
for (var i=0; !(i>=e.length); i++) {
e[i].style.display = newValue;
}
}
}
function set_display_by_id(id, newValue) {
var e = document.getElementById(id);
if (e != null) {
e.style.display = newValue;
}
}
</script>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
<script class='remove'>
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "ldp-primer",
// TODO: Confirm short name
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2013-03-07",
//previousMaturity: "FPWD",
//previousURI: "http://www.w3.org/TR/2013/WD-ldp-20130307/",
// if there a publicly available Editor's Draft, this is the link
//edDraftURI: "http://www.w3.org/2012/ldp/hg/ldp.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
//extraCSS: ["https://dvcs.w3.org/hg/ldpwg/css/respec.css"],
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Nandana Mihindukulasooriya",
url: "http://mayor2.dia.fi.upm.es/oeg-upm/index.php/en/universitystaff/290-nandana",
company: "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL: "http://www.oeg-upm.net/"},
{ name: "Roger Menday",
url: "#",
company: "Fujitsu Laboratories of Europe Limited, London",
companyURL: "#" },
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg: "Linked Data Platform Working Group",
// URI of the public WG page
wgURI: "http://www.w3.org/2012/ldp",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList: "public-ldp-wg",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/55082/status",
doRDFa: "1.1",
};
// Replaces HTML characters (brackets and quotes) with legal HTML representations
// The following example would include a code example from another file and then
// call this function to make the included code renderable in a browser.
//
// <pre class='example' data-include='include-rdf-type.ttl' data-oninclude='fixCode'></pre>
function fixCode(r, content) {
var result = content;
result = result.replace(/</g, "<").replace(/>/g, ">");
result = result.replace(/'/g, "'").replace(/"/g, """);
var ss = result.split('---')
var s1 = "<div class='turtle' style='font-family: sans-serif;'>Turtle:</div><div class='turtle'><pre>"+ss[0]+"</pre></div>";
var s2 = "<div class='jsonld' style='font-family: sans-serif;'>JSON-LD:</div><div class='jsonld'><pre>"+ss[1]+"</pre></div>";
return s1+s2;
}
function highlight(r, content) {
return '<span style="background-color:#ccffcc">' + content + '</span>';
}
</script>
</head>
<body onLoad="primerOnLoad()">
<section id='abstract'>
This primer provides an introduction to Linked Data Platform (LDP), including the basic concepts
of LDP including Linked Data Platform Resource (LDPR) and Linked Data Platform Container (LDPC)
and their affordances, and a running example showing how an LDP client can interact with a LDP server
in the context of read-write Linked Data application i.e. how to HTTP for accessing, updating,
creating and deleting resources from servers that expose their resources as Linked Data.
</section>
<section id="intro-section">
<h1><a id="Introduction">Introduction</a></h1>
<p>Linked Data is a universal approach for handling data which fundamentally includes the notion linking between data items.
Much like the Web is giant network of interlinked documents for a human reader, the graph of Linked Data in the Web is a
data layer on top of which applications are delivered, information is modified, processed, visualized and shared.
</p>
<p> Linked Data Platform specification discusses standard HTTP and RDF techniques and best practices that you should use, and
anti-patterns you should avoid, when constructing clients and servers that read and write Linked Data resources. The LDP
consists of two main building blocks: Linked Data Platform Resource (LDPR) and
Linked Data Platform Container (LDPC).
</p>
<p> Any HTTP resource whose state is represented in RDF that conforms to the simple lifecycle patterns and conventions in LDP
specification is an LDPR. It is recommended that LDPRs reuse existing vocabularies instead of creating their own duplicate
vocabulary terms. It is also recommended that LDPRs have at least one rdf:type set explicitly to make the representations
more useful to client applications that don’t support inferencing. For example, a FOAF file of a person as shown in Example 1
can be an example of an LDPR . It uses terms from Dublin Core [[DC-TERMS]], Friend of a Friend [[FOAF]] vocabularies.
</p>
<pre title="An example LDPR" class='example' data-include='ldpr_ex.txt' data-oninclude='fixCode'></pre>
<p> Linked Data Platform Container (LDPC) is a specialization of an LDPR. An LDPC is a collection of same-subject, same-predicate
triples which is uniquely identified by a URI that responds to client requests for creation, modification, and enumeration of its members.
For example, a set of friends of a person can be a represented as an LDPC as shown in Example 2 that contains a collection of triples
with the pattern <code><#friends, foaf:member, ?friend> </code>.
</p>
<div>
<pre title="An example LDPC" class='example' data-include='ldpc_ex.txt' data-oninclude='fixCode'></pre>
</div>
<div>
<pre title="A member resource of LDPC in Example 2" class='example' data-include='ldpc_ex_m.txt' data-oninclude='fixCode'></pre>
</div>
<p>
Elements of the collection of same-subject, same-predicate triples are called Membership triples or simply members of the LDPC. Several predicates
of the LDPC ldp:membershipSubject, ldp:membershipPredicate, ldp:membershipObject defines the different aspects of the membership relation.
</p>
<p> Members of an LDPC does not have to be LDPRs. Any HTTP resource can be a member for an LDPC. For example,
</p>
<pre title="An example LDPC with non-LDPRs" class='example' data-include='ldpc_ex_non_ldpr.txt' data-oninclude='fixCode'></pre>
<p>
Use cases that motivated LDP specification varies from just publishing a dataset as Linked Data with advanced features as pagination,
providing read/write access to using Linked Data for application integration. The Linked Data Platform Use Cases and Requirements document provides
a more detailed information on the use cases that motivated the LDP specification.
</p>
<p>There will be several categories of systems implementing the LDP specification. Two main categories of the LDP servers include:</p>
<dl class="glossary">
<dt>Generic / vanilla LDP servers</dt>
<dd>RDF storage systems that allow interacting with their resources by means of the LDP specification. These servers do not impose any restriction on LDPRs.</dd>
<dt>Application specific LDP severs </dt>
<dd>Systems exposing their data using the LDP specification. These systems impose restrictions on LDPRs since they have an underlying business logic and data model.</dd>
</dl>
</section>
<section id="org-section">
<h1 id="orgnization">Organization of this Document</h1>
<p>This document is organized as follows:</p>
<h2 id="conventions">Conventions Used in This Document</h2>
<div class="syntaxmenu">
<p>The buttons below can be used to show or hide the available syntaxes.</p>
<form><p>
<input id="hide-ts" onclick="display('turtle', 'none'); set_display_by_id('hide-ts', 'none'); set_display_by_id('show-ts', ''); return false;" type="button" value="Hide Turtle Syntax" />
<input id="show-ts" onclick="display('turtle', ''); set_display_by_id('hide-ts', ''); set_display_by_id('show-ts', 'none'); return false;" style="display:none" type="button" value="Show Turtle Syntax" />
<input id="hide-js" onclick="display('jsonld','none'); set_display_by_id('hide-js', 'none'); set_display_by_id('show-js', ''); return false;" type="button" value="Hide JSON-LD Syntax" />
<input id="show-js" onclick="display('jsonld',''); set_display_by_id('hide-js', ''); set_display_by_id('show-js', 'none'); return false;" style="display:none" type="button" value="Show JSON-lD Syntax" />
</p>
</form>
</div>
<p>Commonly used namespace prefixes:</p>
<pre style="word-wrap: break-word; white-space: pre-wrap;"> @prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.</pre>
</section>
<section id="examples">
<h1>Examples</h1>
<p>
This section provides a set of examples to show the Linked Data Platform interactions. Note, this is a primer and should
not be considered as a canonical example of ideal LDP modeling.
The examples in this section will revolve around a very simple Bug Tracker application. Bug Tracker application records
the bugs of several products allowing reporting, updating and deleting bugs and products. We can re-use simple domain vocabulary,
e.g. has_bug or related, to express our data. LDP provides the additional interaction capability in the protocol to perform dynamic
evolution of knowledge representation.
</p>
<p>RESTful API of the example Bug Tracker system.</p>
<table class="simple">
<thead>
<th>Path</th>
<th>Method</th>
<th>Description</th>
</thead>
<tbody>
<!--tr>
<td rowspan="5">/app/</td>
<td>GET</td>
<td>Lists all the product descriptions.</td>
</tr>
<tr>
<td>POST</td>
<td>Create a new product description.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the app description and/or list of product descriptions</td>
</tr>
<tr>
<td>PATCH</td>
<td>Update the app description and/or list of product descriptions</td>
</tr>
<tr>
<td>DELETE</td>
<td>Not allowed.</td>
</tr-->
<tr>
<td rowspan="5"><code>/app/{product-id}/</code></td>
<td>GET</td>
<td>Lists the bug reports associated with a product.</td>
</tr>
<tr>
<td>POST</td>
<td>Create a new bug report associated with a product.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the project description.</td>
</tr>
<tr>
<td>PATCH</td>
<td>Not supported.</td>
</tr>
<tr>
<td>DELETE</td>
<td>Delete the project description and associated bug reports.</td>
</tr>
<tr>
<td rowspan="5">/app/{product-id}/{bug-id}</td>
<td>GET</td>
<td>Gets the bug report.</td>
</tr>
<tr>
<td>POST</td>
<td>Not allowed.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the bug report.</td>
</tr>
<tr>
<td>PATCH</td>
<td>Not supported.</td>
</tr>
<tr>
<td>DELETE</td>
<td>Delete the bug report.</td>
</tr>
<tr>
<td rowspan="2">/*/*</td>
<td>OPTIONS</td>
<td>Discover the allowed operations over a resource</td>
</tr>
<tr>
<td>HEAD</td>
<td>Only retrieve metainformation about a resource</td>
</tr>
</tbody>
</table>
<section id="simple-ex">
<h2 >Simple scenarios</h2>
<h3 id="ProductLookup">Lookup a Product</h3>
<p> One of the main use cases of the example bug tracker is to list of the bugs of a given product. Assuming
that a user got a URL of a product by out of band means, one can look it up to get more information including
the bugs associated with it.</p>
<table>
<tr>
<td class="col1"><img src="product_lookup.png" /></td>
<td>
<p>To get the description of the product, a client can do a GET request on the URI of the known product resource. LDPR
servers should provide text/turtle representations of the requested LDPRs and may provide RDF format representations
using standard HTTP content negotiation. </p>
<pre class="example">GET /app/product1/ HTTP/1.1
Host: example.org
Accept: text/turtle; charset=UTF-8
</pre>
<p>If the product resource is available, the server responds with the representation of the resource using the requested media type,
<code>text/turtle</code> in this case.</p>
<pre title="HTTP response for product lookup" class='example' data-include='product_lookup_resp.txt' data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<p>
The project description resource contains both information about the project such as the title and the information about members of the product LDPC
i.e. the bugs associated with the product.
</p>
<h3 id="BugLookup">Lookup a Bug</h3>
<p>Looking up a bug is similar to looking up a product. </p>
<table>
<tr>
<td class="col1"><img src="bug_lookup.png" /></td>
<td>
<p>Based on links in the representation of the Product, the client uses GET to navigate to a known Bug resource.</p>
<pre class="example">GET /app/product1/bug3 HTTP/1.1
Host: example.org
Accept: text/turtle
</pre>
<p>The server responds with the representation of the bug.</p>
<pre title="The response of bug lookup"
class='example' data-include='bug_look_up_resp.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<h3 id="ProductLookup">Discovering operations of a product</h3>
<p>
Assuming that a user got the URL of the product by out of band means, a starting point would be to discover
which operations can be performed on the product resource.
</p>
<table>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client does an OPTIONS with the URI of a known product description resource.</p>
<pre class="example">OPTIONS /app/product1/ HTTP/1.1
Host: example.org
</pre>
<p>If the product description resource is available, the server responds with the allowed HTTP operations on the product
resource along with some other metadata.</p>
<div class="turtle">
<pre title="HTTP response for OPTIONS on a product" class='example' data-include='product_options_res.tx' data-oninclude='fixCode'></pre>
</div>
</td>
</tr>
</table>
<p> According to the response, HTTP operations {OPTIONS,GET,POST,PUT,PATCH} are allowed on the product description resource.
In addition to the allowed operations, Accept-Post and Accept-Patch provides which media types are supported by respective operations.
The rel="type" Link header advertises that this is resource supports LDP protocol and the the rel="ldp:nonMemberResource" provides a link
to the non-member resource of this product description.
</p>
<h3 id="BugCreate">Create a new Bug</h3>
<p>Continuing from the previous example, we can report a Bug against 'product1' by creating a Bug LDPR under the 'Product' LDPC.
The client POSTs a representation of a Bug to the Bug Tracker LDPC. </p>
<table>
<tr>
<td class="col1"><img src="bug_create.png" /></td>
<td>
<p>The client POSTs a representation of a Bug to the Bug Tracker LDPC.</p>
<pre title="A resquest for creating a bug"
class='example' data-include='bug_create_req.txt'
data-oninclude='fixCode'></pre>
<p>If the create is successful, the server responds with location of the newly created resource.</p>
<pre title="A response of creating new a bug"
class='example' data-include='bug_create_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>If the creation fails, the server will respond with an appropriate status code depending on the error.
After the resource is creation, the Product A LDPC will have the following representation.</p>
<pre title="The state of the product LDPC after the bug creation"
class='example' data-include='bug_create_s1.txt'
data-oninclude='fixCode'></pre>
<p>And the created Bug resource will have the following representation. Note that server has added a
server managed property, creation date (dcterms:created), and a default value for the state (bt:isInState)
to the Bug in addition to what was being POSTed.</p>
<pre title="The state of the bug LDPR"
class='example' data-include='bug_create_s2.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<h3 id="BugUpdate">Update a Bug</h3>
<p> TODO - Description </p>
<table>
<tr>
<td class="col1"><img src="bug_update.png" /></td>
<td>
<p>TODO - Description</p>
<pre title="A resquest for updating a bug"
class='example' data-include='bug_update_req.txt'
data-oninclude='fixCode'></pre>
<p>If the update is successful, the server will respond with a success status and a new etag.</p>
<pre class="example">
HTTP/1.1 204 No Content
ETag: W/"123456790"
</pre>
</td>
</tr>
</table>
</section>
<section id="basic-ex">
<h2>Basic scenarios</h2>
<h3 id="ProductCreate">Create a Product</h3>
<p>If the bug tracker allows creating new Products in the tracker, that can done by posting a representation of a new Product to the
Bug Tracker container.</p>
<table>
<tr>
<td colspan="2">
<p>The status of the bug tracker before creating the new product.</p>
<pre title="The state of the Bug Tracker LDPC"
class='example' data-include='product_create_s1.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client POSTs a representation of a Product to the Bug Tracker LDPC.</p>
<pre title="A resquest for creating a product"
class='example' data-include='product_create_req.txt'
data-oninclude='fixCode'></pre>
<p>If the create is successful, the server responds with location of the newly created resource.</p>
<pre title="A response after creating new a b"
class='example' data-include='product_create_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>After creation of this new container, 'Product A', the representation of the 'Tracker' container will be</p>
<pre title="The state of the Bug Tracker after the product creation"
class='example' data-include='product_create_s2.txt'
data-oninclude='fixCode'></pre>
<p>and the 'Product A' will have the following representation.</p>
<pre title="The state of the new Product"
class='example' data-include='product_create_s3.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<h3 id="ProductUpdate">Update a product description</h3>
<p>If the bug tracker allows updating new product in the tracker, that can done by posting a representation of a new Product to the
Bug Tracker container.</p>
</section>
<h3 id="ProductDelete">Delete a product description</h3>
<p>The bug tracker allows deleting products. TODO</p>
</section>
<section id="advanced-ex">
<h2>Advanced scenarios</h2>
<section id="ldp-membership">
<h3>Advanced use of ldp:membershipX predicates</h3>
</section>
<section id="paging">
<h3>Pagination</h3>
</section>
<section id="odering">
<h3>Ordering</h3>
</section>
<section id="inlining">
<h3>In-lining</h3>
</section>
<section id="binary-res">
<h3>Handling binary resources</h3>
<h4>Creating a binary resource</h4>
<table>
<tr>
<td colspan="2">
<p>We have an LDPC which we can use to create binary resources</p>
<pre title="The state of the attachments LDPC"
class='example' data-include='attachments_s1.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client POSTs POST a binary resource to the LDPC</p>
<pre title="A resquest for creating a product"
class='example' data-include='attachments_post_req.txt'
data-oninclude='fixCode'></pre>
<p>If the create is successful, the server it responds with a Location header and a Link header to
the automatically created metadata LDPR.</p>
<pre title="A response after creating new a b"
class='example' data-include='attachments_post_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>After the creation, LDPC representation looks like</p>
<pre title="The state of the attachments LDPC after creation"
class='example' data-include='attachments_s2.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<h4>Accessing the binary resource</h4>
<h4>Accessing the metadata about the binary resource</h4>
<h4>Updating the metadata about the binary resource</h4>
<h4>Deleting the binary resource</h4>
</section>
</section>
<section>
<h2 id="ldpc">LDP Implementations</h2>
A list of implementations that plan to be LDP compliant is available in the LDP Implementations wiki page.
LDP Implementation report provides the coverage of the specification by each LDP implementation.
</section>
<section class='appendix informative' id="history">
<h1>Change History</h1>
<p>The change history is up to the editors to insert a brief summary of
changes, ordered by most recent changes first and with heading from which
public draft it has been changed from.
</p>
<ul>
<li>2013-07-03 - Moving the content from the wiki to the note.</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
prefix="td: http://www.w3.org/2006/03/test-description# tn: http://ldp.example.org/NewTestDefinitions# ht: http://www.w3.org/2011/http#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Linked Data Platform 1.0 Primer</title>
<style type="text/css">
div.syntaxmenu {
border: 1px dotted black;
padding:0 0 0 0.5em;
margin: 0em;
}
td.col1 {
width: 300px;
vertical-align: top;
padding: 30px 0 0 0;
}
</style>
<script type="text/javascript">
var displayed = [];
displayed["turtle"] = 1;
displayed["jsonld"] = 0;
function primerOnLoad() {
setTimeout(function(){
display('turtle', ''); set_display_by_id('hide-ts', ''); set_display_by_id('show-ts', 'none');
display('jsonld', 'none'); set_display_by_id('hide-js', 'none'); set_display_by_id('show-js', '');
},500)
}
function display(syntax,status) {
var howmany = 0;
if (status=='none') {
displayed[syntax] = 0;
} else {
displayed[syntax] = 1;
}
for ( i in displayed ) {
howmany = howmany + displayed[i];
}
set_display_by_class('div',syntax,status);
if ( howmany == 1 ) {
set_display_by_class('b','syntax-head','none');
} else {
set_display_by_class('b','syntax-head','');
}
}
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (! (! (strTagName == "*") || ! (oElm.all)))? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; !(i>=oClassNames.length); i++){ /*>*/
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
}
}
else{
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
}
var oElement;
var bMatchesAll;
for(var j=0; !(j>=arrElements.length); j++){ /*>*/
oElement = arrElements[j];
bMatchesAll = true;
for(var k=0; !(k>=arrRegExpClassNames.length); k++){ /*>*/
if(!arrRegExpClassNames[k].test(oElement.className)){
bMatchesAll = false;
break;
}
}
if(bMatchesAll){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
function set_display_by_class(el, cls, newValue) {
var e = getElementsByClassName(document, el, cls);
if (e != null) {
for (var i=0; !(i>=e.length); i++) {
e[i].style.display = newValue;
}
}
}
function set_display_by_id(id, newValue) {
var e = document.getElementById(id);
if (e != null) {
e.style.display = newValue;
}
}
</script>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
<script class='remove'>
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "ldp-primer",
// TODO: Confirm short name
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2013-03-07",
//previousMaturity: "FPWD",
//previousURI: "http://www.w3.org/TR/2013/WD-ldp-20130307/",
// if there a publicly available Editor's Draft, this is the link
//edDraftURI: "http://www.w3.org/2012/ldp/hg/ldp.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
//extraCSS: ["https://dvcs.w3.org/hg/ldpwg/css/respec.css"],
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Nandana Mihindukulasooriya",
url: "http://mayor2.dia.fi.upm.es/oeg-upm/index.php/en/universitystaff/290-nandana",
company: "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL: "http://www.oeg-upm.net/"},
{ name: "Roger Menday",
url: "#",
company: "Fujitsu Laboratories of Europe Limited, London",
companyURL: "#" },
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg: "Linked Data Platform Working Group",
// URI of the public WG page
wgURI: "http://www.w3.org/2012/ldp",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList: "public-ldp-wg",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/55082/status",
doRDFa: "1.1",
};
// Replaces HTML characters (brackets and quotes) with legal HTML representations
// The following example would include a code example from another file and then
// call this function to make the included code renderable in a browser.
//
// <pre class='example' data-include='include-rdf-type.ttl' data-oninclude='fixCode'></pre>
function fixCode(r, content) {
var result = content;
result = result.replace(/</g, "<").replace(/>/g, ">");
result = result.replace(/'/g, "'").replace(/"/g, """);
var ss = result.split('---')
var s1 = "<div class='turtle' style='font-family: sans-serif;'>Turtle:</div><div class='turtle'><pre>"+ss[0]+"</pre></div>";
var s2 = "<div class='jsonld' style='font-family: sans-serif;'>JSON-LD:</div><div class='jsonld'><pre>"+ss[1]+"</pre></div>";
return s1+s2;
}
function highlight(r, content) {
return '<span style="background-color:#ccffcc">' + content + '</span>';
}
</script>
</head>
<body onLoad="primerOnLoad()">
<section id='abstract'>
This primer provides an introduction to Linked Data Platform (LDP), including the basic concepts
of LDP including Linked Data Platform Resource (LDPR) and Linked Data Platform Container (LDPC)
and their affordances, and a running example showing how an LDP client can interact with a LDP server
in the context of read-write Linked Data application i.e. how to HTTP for accessing, updating,
creating and deleting resources from servers that expose their resources as Linked Data.
</section>
<section id="intro-section">
<h1><a id="Introduction">Introduction</a></h1>
<p>Linked Data is a universal approach for handling data which fundamentally includes the notion linking between data items.
Much like the Web is giant network of interlinked documents for a human reader, the graph of Linked Data in the Web is a
data layer on top of which applications are delivered, information is modified, processed, visualized and shared.
</p>
<p> Linked Data Platform specification discusses standard HTTP and RDF techniques and best practices that you should use, and
anti-patterns you should avoid, when constructing clients and servers that read and write Linked Data resources. The LDP
consists of two main building blocks: Linked Data Platform Resource (LDPR) and
Linked Data Platform Container (LDPC).
</p>
<p> Any HTTP resource whose state is represented in RDF that conforms to the simple lifecycle patterns and conventions in LDP
specification is an LDPR. It is recommended that LDPRs reuse existing vocabularies instead of creating their own duplicate
vocabulary terms. It is also recommended that LDPRs have at least one rdf:type set explicitly to make the representations
more useful to client applications that don’t support inferencing. For example, a FOAF file of a person as shown in Example 1
can be an example of an LDPR . It uses terms from Dublin Core [[DC-TERMS]], Friend of a Friend [[FOAF]] vocabularies.
</p>
<pre title="An example LDPR" class='example' data-include='ldpr_ex.txt' data-oninclude='fixCode'></pre>
<p> Linked Data Platform Container (LDPC) is a specialization of an LDPR. An LDPC is a collection of same-subject, same-predicate
triples which is uniquely identified by a URI that responds to client requests for creation, modification, and enumeration of its members.
For example, a set of friends of a person can be a represented as an LDPC as shown in Example 2 that contains a collection of triples
with the pattern <code><#friends, foaf:member, ?friend> </code>.
</p>
<div>
<pre title="An example LDPC" class='example' data-include='ldpc_ex.txt' data-oninclude='fixCode'></pre>
</div>
<div>
<pre title="A member resource of LDPC in Example 2" class='example' data-include='ldpc_ex_m.txt' data-oninclude='fixCode'></pre>
</div>
<p>
Elements of the collection of same-subject, same-predicate triples are called Membership triples or simply members of the LDPC. Several predicates
of the LDPC ldp:membershipSubject, ldp:membershipPredicate, ldp:membershipObject defines the different aspects of the membership relation.
</p>
<p> Members of an LDPC does not have to be LDPRs. Any HTTP resource can be a member for an LDPC. For example,
</p>
<pre title="An example LDPC with non-LDPRs" class='example' data-include='ldpc_ex_non_ldpr.txt' data-oninclude='fixCode'></pre>
<p>
Use cases that motivated LDP specification varies from just publishing a dataset as Linked Data with advanced features as pagination,
providing read/write access to using Linked Data for application integration. The Linked Data Platform Use Cases and Requirements document provides
a more detailed information on the use cases that motivated the LDP specification.
</p>
<p>There will be several categories of systems implementing the LDP specification. Two main categories of the LDP servers include:</p>
<dl class="glossary">
<dt>Generic / vanilla LDP servers</dt>
<dd>RDF storage systems that allow interacting with their resources by means of the LDP specification. These servers do not impose any restriction on LDPRs.</dd>
<dt>Application specific LDP severs </dt>
<dd>Systems exposing their data using the LDP specification. These systems impose restrictions on LDPRs since they have an underlying business logic and data model.</dd>
</dl>
</section>
<section id="org-section">
<h1 id="orgnization">Organization of this Document</h1>
<p>This document is organized as follows:</p>
<h2 id="conventions">Conventions Used in This Document</h2>
<div class="syntaxmenu">
<p>The buttons below can be used to show or hide the available syntaxes.</p>
<form><p>
<input id="hide-ts" onclick="display('turtle', 'none'); set_display_by_id('hide-ts', 'none'); set_display_by_id('show-ts', ''); return false;" type="button" value="Hide Turtle Syntax" />
<input id="show-ts" onclick="display('turtle', ''); set_display_by_id('hide-ts', ''); set_display_by_id('show-ts', 'none'); return false;" style="display:none" type="button" value="Show Turtle Syntax" />
<input id="hide-js" onclick="display('jsonld','none'); set_display_by_id('hide-js', 'none'); set_display_by_id('show-js', ''); return false;" type="button" value="Hide JSON-LD Syntax" />
<input id="show-js" onclick="display('jsonld',''); set_display_by_id('hide-js', ''); set_display_by_id('show-js', 'none'); return false;" style="display:none" type="button" value="Show JSON-lD Syntax" />
</p>
</form>
</div>
<p>Commonly used namespace prefixes:</p>
<pre style="word-wrap: break-word; white-space: pre-wrap;"> @prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.</pre>
</section>
<section id="examples">
<h1>Examples</h1>
<p>
This section provides a set of examples to show the Linked Data Platform interactions. Note, this is a primer and should
not be considered as a canonical example of ideal LDP modeling.
The examples in this section will revolve around a very simple Bug Tracker application. Bug Tracker application records
the bugs of several products allowing reporting, updating and deleting bugs and products. We can re-use simple domain vocabulary,
e.g. has_bug or related, to express our data. LDP provides the additional interaction capability in the protocol to perform dynamic
evolution of knowledge representation.
</p>
<p>RESTful API of the example Bug Tracker system.</p>
<table class="simple">
<thead>
<th>Path</th>
<th>Method</th>
<th>Description</th>
</thead>
<tbody>
<!--tr>
<td rowspan="5">/app/</td>
<td>GET</td>
<td>Lists all the product descriptions.</td>
</tr>
<tr>
<td>POST</td>
<td>Create a new product description.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the app description and/or list of product descriptions</td>
</tr>
<tr>
<td>PATCH</td>
<td>Update the app description and/or list of product descriptions</td>
</tr>
<tr>
<td>DELETE</td>
<td>Not allowed.</td>
</tr-->
<tr>
<td rowspan="5"><code>/app/{product-id}/</code></td>
<td>GET</td>
<td>Lists the bug reports associated with a product.</td>
</tr>
<tr>
<td>POST</td>
<td>Create a new bug report associated with a product.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the project description.</td>
</tr>
<tr>
<td>PATCH</td>
<td>Not supported.</td>
</tr>
<tr>
<td>DELETE</td>
<td>Delete the project description and associated bug reports.</td>
</tr>
<tr>
<td rowspan="5">/app/{product-id}/{bug-id}</td>
<td>GET</td>
<td>Gets the bug report.</td>
</tr>
<tr>
<td>POST</td>
<td>Not supported.</td>
</tr>
<tr>
<td>PUT</td>
<td>Update the bug report.</td>
</tr>
<tr>
<td>PATCH</td>
<td>Not supported.</td>
</tr>
<tr>
<td>DELETE</td>
<td>Delete the bug report.</td>
</tr>
<tr>
<td rowspan="2">/*/*</td>
<td>OPTIONS</td>
<td>Discover the allowed operations over a resource</td>
</tr>
<tr>
<td>HEAD</td>
<td>Only retrieve metainformation about a resource</td>
</tr>
</tbody>
</table>
<section id="simple-ex">
<h2 >Simple scenarios</h2>
<section>
<h3 id="ProductLookup">Lookup a Product (LDPC?)</h3>
<p> One of the main use cases of the example bug tracker is to list of the bugs of a given product. Assuming
that a user got a URL of a product by out of band means, one can look it up to get more information including
the bugs associated with it.</p>
<table>
<tr>
<td class="col1"><img src="product_lookup.png" /></td>
<td>
<p>To get the description of the product, a client can do a GET request on the URI of the known product resource. LDPR
servers should provide text/turtle representations of the requested LDPRs and may provide RDF format representations
using standard HTTP content negotiation. </p>
<pre class="example">GET /app/product1/ HTTP/1.1
Host: example.org
Accept: text/turtle; charset=UTF-8
</pre>
<p>If the product resource is available, the server responds with the representation of the resource using the requested media type,
<code>text/turtle</code> in this case.</p>
<pre title="HTTP response for product lookup" class='example' data-include='product_lookup_resp.txt' data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
<p>
The project description resource contains both information about the project such as the title and the information about members of the product LDPC
i.e. the bugs associated with the product.
</p>
</section>
<section>
<h3 id="BugLookup">Lookup a Bug (LDPR?)</h3>
<p>Looking up a bug is similar to looking up a product. </p>
<table>
<tr>
<td class="col1"><img src="bug_lookup.png" /></td>
<td>
<p>Based on links in the representation of the Product, the client uses GET to navigate to a known Bug resource.</p>
<pre class="example">GET /app/product1/bug3 HTTP/1.1
Host: example.org
Accept: text/turtle
</pre>
<p>The server responds with the representation of the bug.</p>
<pre title="The response of bug lookup"
class='example' data-include='bug_look_up_resp.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
</section>
<section>
<h3 id="ProductLookup">Discovering operations of a product</h3>
<p>
Assuming that a user got the URL of the product by out of band means, a starting point would be to discover
which operations can be performed on the product resource.
</p>
<table>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client does an OPTIONS with the URI of a known product description resource.</p>
<pre class="example">OPTIONS /app/product1/ HTTP/1.1
Host: example.org
</pre>
<p>If the product description resource is available, the server responds with the allowed HTTP operations on the product
resource along with some other metadata.</p>
<div class="turtle">
<pre title="HTTP response for OPTIONS on a product" class='example' data-include='product_options_res.tx' data-oninclude='fixCode'></pre>
</div>
</td>
</tr>
</table>
<p> According to the response, HTTP operations {OPTIONS,GET,POST,PUT,PATCH} are allowed on the product description resource.
In addition to the allowed operations, Accept-Post and Accept-Patch provides which media types are supported by respective operations.
The rel="type" Link header advertises that this is resource supports LDP protocol and the the rel="ldp:nonMemberResource" provides a link
to the non-member resource of this product description.
</p>
</section>
<section>
<h3 id="BugCreate">Create a new Bug</h3>
<p>Continuing from the previous example, we can report a Bug against 'product1' by creating a Bug LDPR under the 'Product' LDPC.
The client POSTs a representation of a Bug to the Bug Tracker LDPC. </p>
<table>
<tr>
<td class="col1"><img src="bug_create.png" /></td>
<td>
<p>The client POSTs a representation of a Bug to the Bug Tracker LDPC.</p>
<pre title="A resquest for creating a bug"
class='example' data-include='bug_create_req.txt'
data-oninclude='fixCode'></pre>
<p>If the create is successful, the server responds with location of the newly created resource.</p>
<pre title="A response of creating new a bug"
class='example' data-include='bug_create_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>If the creation fails, the server will respond with an appropriate status code depending on the error.
After the resource is creation, the Product A LDPC will have the following representation.</p>
<pre title="The state of the product LDPC after the bug creation"
class='example' data-include='bug_create_s1.txt'
data-oninclude='fixCode'></pre>
<p>And the created Bug resource will have the following representation. Note that server has added a
server managed property, creation date (dcterms:created), and a default value for the state (bt:isInState)
to the Bug in addition to what was being POSTed.</p>
<pre title="The state of the bug LDPR"
class='example' data-include='bug_create_s2.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
</section>
<section>
<h3 id="BugUpdate">Update a Bug</h3>
<p> TODO - Description </p>
<table>
<tr>
<td class="col1"><img src="bug_update.png" /></td>
<td>
<p>TODO - Description</p>
<pre title="A resquest for updating a bug"
class='example' data-include='bug_update_req.txt'
data-oninclude='fixCode'></pre>
<p>If the update is successful, the server will respond with a success status and a new etag.</p>
<pre class="example">
HTTP/1.1 204 No Content
ETag: W/"123456790"
</pre>
</td>
</tr>
</table>
</section>
<section>
<h3 id="BugDelete">Delete a bug</h3>
<p> TODO - Description </p>
<table>
<tr>
<td><img src="replace.png" /></td>
<td>
<p>TODO - Description</p>
<pre class="example">
DELETE /app/product1/bug3 HTTP/1.1
Host: example.org
</pre>
<p>If the update is successful, the server will respond with a success status and a new etag.</p>
<pre class="example">
HTTP/1.1 204 No Content
ETag: W/"123456790"
</pre>
</td>
</tr>
</table>
</section>
</section>
<section id="basic-ex">
<h2>Basic scenarios</h2>
<section>
<h3 id="ProductCreate">Create a Product</h3>
<p>If the bug tracker allows creating new Products in the tracker, that can done by posting a representation of a new Product to the
Bug Tracker container.</p>
<table>
<tr>
<td colspan="2">
<p>The status of the bug tracker before creating the new product.</p>
<pre title="The state of the Bug Tracker LDPC"
class='example' data-include='product_create_s1.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client POSTs a representation of a Product to the Bug Tracker LDPC.</p>
<pre title="A resquest for creating a product"
class='example' data-include='product_create_req.txt'
data-oninclude='fixCode'></pre>
<p>If the create is successful, the server responds with location of the newly created resource.</p>
<pre title="A response after creating new a b"
class='example' data-include='product_create_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>After creation of this new container, 'Product A', the representation of the 'Tracker' container will be</p>
<pre title="The state of the Bug Tracker after the product creation"
class='example' data-include='product_create_s2.txt'
data-oninclude='fixCode'></pre>
<p>and the 'Product A' will have the following representation.</p>
<pre title="The state of the new Product"
class='example' data-include='product_create_s3.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
</section>
<section>
<h3 id="ProductUpdate">Update a product description</h3>
<p>If the bug tracker allows updating new product in the tracker, that can done by posting a representation of a new Product to the
Bug Tracker container.</p>
</section>
</section>
<h3 id="ProductDelete">Delete a product description</h3>
<p>The bug tracker allows deleting products. TODO</p>
</section>
<section id="advanced-ex">
<h2>Advanced scenarios</h2>
<section id="ldp-membership">
<h3>Advanced use of ldp:membershipX predicates</h3>
</section>
<section id="paging">
<h3>Pagination</h3>
</section>
<section id="odering">
<h3>Ordering</h3>
</section>
<section id="inlining">
<h3>In-lining</h3>
</section>
<section id="binary-res">
<h3>Handling binary resources</h3>
<section>
<h4>Creating a binary resource</h4>
<table>
<tr>
<td colspan="2">
<p>We have an LDPC which we can use to create binary resources</p>
<pre title="The state of the attachments LDPC"
class='example' data-include='attachments_s1.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
<tr>
<td class="col1"><img src="replace.png" /></td>
<td>
<p>The client POSTs a binary resource to the LDPC</p>
<pre title="A resquest for creating a product"
class='example'>POST /app/product1/bug3/attachments/ HTTP/1.1
Host: example.org
Content-Type: image/png
Slug: login-page.png
Content-Length: 1254
#### binary data #####
</pre>
<p>If the create is successful, the server it responds with a Location header and a Link header to
the automatically created metadata LDPR.</p>
<pre title="A response after creating new a binary resource" class='example'>HTTP/1.1 201 Created
Location: /app/product1/bug3/attachments/login-page.png
Link: </app/product1/bug3/attachments/1>; rel="meta"
Content-Length: 0
</pre>
</td>
</tr>
<tr>
<td colspan="2">
<p>After the creation, LDPC representation looks like</p>
<pre title="The state of the attachments LDPC after creation"
class='example' data-include='attachments_s2.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
</section>
<section>
<h4>Accessing the binary resource</h4>
<table>
<tr>
<td><img src="replace.png" /></td>
<td>
<p>The client can retrive the binary resource by doing a GET on the binary resource URI.</p>
<pre class="example">GET /app/product1/bug3/attachments/login-page.png HTTP/1.1
Host: example.org
Accept: image/png
</pre>
<p>LDPR server responds with</p>
<pre title="HTTP response for getting the binary resource"
class='example'>HTTP/1.1 200 OK
Content-Type: image/png
Link: </app/product1/bug3/attachments/1>; rel="meta"
ETag: W/"123456789"
#### binary data #####
</pre>
</td>
</tr>
</table>
</section>
<section>
<h4>Accessing the metadata about the binary resource</h4>
<table>
<tr>
<td><img src="replace.png" /></td>
<td>
<p>The client can retrive the metadata of the binary resource by doing a GET on the metadata-LDPR URI.</p>
<pre class="example">GET /app/product1/bug3/attachments/1
Host: example.org
Accept: text/turtle
</pre>
<p>LDPR server responds with</p>
<pre title="HTTP response for getting the binary resource"
class='example' data-include='attachments_m_get_res.txt'
data-oninclude='fixCode'></pre>
</td>
</tr>
</table>
</section>
<section>
<h4>Updating the metadata about the binary resource</h4>
<table>
<tr>
<td><img src="replace.png" /></td>
<td>
<p>TODO</p>
<pre title="HTTP response for getting the binary resource"
class='example' data-include='attachments_m_get_res.txt'
data-oninclude='fixCode'></pre>
<p>LDPR server responds with</p>
<pre class="example">HTTP/1.1 204 No Content
ETag: W/"123456790"
</pre>
</td>
</tr>
</table>
</section>
<section>
<h4>Deleting the binary resource</h4>
<table>
<tr>
<td><img src="replace.png" /></td>
<td>
<p>TODO</p>
<pre class="example"> DELETE /app/product1/bug3/attachments/login-page.png HTTP/1.1
Host: example.org
</pre>
<pre class="example">HTTP/1.1 204 No Content
ETag: W/"123456790"
</pre>
<pre class="example">GET /app/product1/bug3/attachments/login-page.png HTTP/1.1
Host: example.org
</pre>
<pre class="example">HTTP/1.1 410 Gone
</pre>
<pre class="example"> GET /app/product1/bug3/attachments/1
Host: example.org
</pre>
<pre class="example">HTTP/1.1 410 Gone
</pre>
</td>
</tr>
</table>
</section>
</section>
</section>
<section>
<h2 id="ldpc">LDP Implementations</h2>
A list of implementations that plan to be LDP compliant is available in the LDP Implementations wiki page.
LDP Implementation report provides the coverage of the specification by each LDP implementation.
</section>
<section class='appendix informative' id="history">
<h1>Change History</h1>
<p>The change history is up to the editors to insert a brief summary of
changes, ordered by most recent changes first and with heading from which
public draft it has been changed from.
</p>
<ul>
<li>2013-08-05 - Providing JSON-LD representations of the examples.</li>
<li>2013-07-03 - Moving the content from the wiki to the note.</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file