Skip to content

Commit

Permalink
Add status property and ResourceStatus class with active and deleted …
Browse files Browse the repository at this point in the history
…individuals

- Add support for individuals to owl2html stylesheet
- Add domain=fcrepo:Resource to status property

Resolves: https://www.pivotaltracker.com/story/show/54611050
  • Loading branch information
escowles authored and Andrew Woods committed Sep 4, 2014
1 parent cba085a commit 53b7664
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
31 changes: 31 additions & 0 deletions owl2html.xsl
Expand Up @@ -37,6 +37,14 @@
</xsl:for-each>
</xsl:if>

<xsl:if test="/rdf:RDF/owl:Individual">
<h3>Individuals</h3>
<xsl:for-each select="/rdf:RDF/owl:Individual">
<xsl:sort select="@rdf:about"/>
<xsl:call-template name="link"/>
</xsl:for-each>
</xsl:if>

<xsl:if test="/rdf:RDF/owl:ObjectProperty">
<h3>Object Properties</h3>
<xsl:for-each select="/rdf:RDF/owl:ObjectProperty">
Expand Down Expand Up @@ -64,6 +72,14 @@
</xsl:for-each>
</xsl:if>

<xsl:if test="/rdf:RDF/owl:Individual">
<h3>Individuals</h3>
<xsl:for-each select="/rdf:RDF/owl:Individual">
<xsl:sort select="@rdf:about"/>
<xsl:call-template name="description"/>
</xsl:for-each>
</xsl:if>

<xsl:if test="/rdf:RDF/owl:ObjectProperty">
<h3>Object Properties</h3>
<xsl:for-each select="/rdf:RDF/owl:ObjectProperty">
Expand Down Expand Up @@ -135,6 +151,21 @@
</xsl:for-each>
</div>
</xsl:if>
<xsl:if test="//*[rdf:type/@rdf:resource=concat($about,$id)]">
<div class="property">instances:
<xsl:for-each select="//*[rdf:type/@rdf:resource=concat($about,$id)]">
<xsl:sort select="@rdf:about"/>
<xsl:call-template name="link"/>
</xsl:for-each>
</div>
</xsl:if>
<xsl:if test="rdf:type">
<div class="property">rdf:type:
<xsl:for-each select="rdf:type">
<xsl:call-template name="link"/>
</xsl:for-each>
</div>
</xsl:if>
<xsl:if test="rdfs:domain">
<div class="property">
domain:
Expand Down
21 changes: 21 additions & 0 deletions rest-api.rdf
Expand Up @@ -50,4 +50,25 @@
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
</owl:DatatypeProperty>

<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/rest-api#status">
<rdfs:label xml:lang="en">status</rdfs:label>
<rdfs:comment xml:lang="en">Describes the status of a resource, such as active or deleted.</rdfs:comment>
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
<rdfs:range rdf:resource="http://fedora.info/definitions/v4/rest-api#ResourceStatus"/>
</owl:ObjectProperty>
<owl:Class rdf:about="http://fedora.info/definitions/v4/rest-api#ResourceStatus">
<rdfs:label xml:lang="en">resource status</rdfs:label>
<rdfs:comment xml:lang="en">Values of the status property. The default values are active and deleted -- but additional values can be created.</rdfs:comment>
</owl:Class>
<owl:Individual rdf:about="http://fedora.info/definitions/v4/rest-api#active">
<rdfs:label xml:lang="en">active</rdfs:label>
<rdfs:comment xml:lang="en">The resource is active.</rdfs:comment>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#ResourceStatus"/>
</owl:Individual>
<owl:Individual rdf:about="http://fedora.info/definitions/v4/rest-api#deleted">
<rdfs:label xml:lang="en">deleted</rdfs:label>
<rdfs:comment xml:lang="en">The resource has been marked for deletion.</rdfs:comment>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#ResourceStatus"/>
</owl:Individual>

</rdf:RDF>

0 comments on commit 53b7664

Please sign in to comment.