New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add an indexing# namespace for indexing-related values in fedora #13
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
00cdc49
add a config: namespace for user-defined values in fedora
acoburn 708b47f
updated PR in response to suggestions from @escowles
acoburn 2f903a0
defined an indexing# namespace
acoburn a12322a
implemented indexing# namespace document in RDFS
acoburn 9151adf
reimplemented indexing ontology in RDFS without RDF:Description block…
acoburn b38beb6
updated HTML header rendering to make it consistent with owl2html
acoburn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<index title="Fedora Ontologies"> | ||
<page id="rels-ext"/> | ||
<page id="repository"/> | ||
<page id="rest-api"/> | ||
<page id="indexing"/> | ||
</index> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:dcterms="http://purl.org/dc/terms/" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
<xsl:output method="html"/> | ||
<xsl:template match="/index"> | ||
<html> | ||
<head> | ||
<title><xsl:value-of select="@title"/></title> | ||
<style> | ||
h1 { font-size: large; } | ||
body { font-family: sans-serif; } | ||
</style> | ||
</head> | ||
<body> | ||
<h1><xsl:value-of select="@title"/></h1> | ||
<ul> | ||
<xsl:for-each select="page"> | ||
<xsl:variable name="page_id" select="@id"/> | ||
<xsl:for-each select="document(concat($page_id,'.rdf'))"> | ||
<xsl:choose> | ||
<xsl:when test="rdf:RDF/owl:Ontology/rdfs:label"> | ||
<li> | ||
<a href="{$page_id}/"><xsl:value-of select="rdf:RDF/owl:Ontology/rdfs:label"/></a> | ||
</li> | ||
</xsl:when> | ||
<xsl:when test="rdf:RDF/rdf:Description[1]/dcterms:title"> | ||
<a href="{$page_id}/"><xsl:value-of select="rdf:RDF/rdf:Description[1]/dcterms:title"/></a> | ||
</xsl:when> | ||
</xsl:choose> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</ul> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0"?> | ||
<?xml-stylesheet type="text/xsl" href="rdfs2html.xsl"?> | ||
<rdf:RDF | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:dcterms="http://purl.org/dc/terms/" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
|
||
<rdf:Description rdf:about="http://fedora.info/definitions/v4/indexing#"> | ||
<dcterms:title xml:lang="en">Fedora Commons Indexing Ontology</dcterms:title> | ||
<dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2015-01-23</dcterms:modified> | ||
<dcterms:publisher rdf:resource="http://fedorarepository.org/"/> | ||
<rdfs:seeAlso rdf:resource="https://wiki.duraspace.org/display/FEDORA4x/External+Search"/> | ||
<rdfs:comment xml:lang="en">Ontology for indexing configuration in Fedora repositories.</rdfs:comment> | ||
</rdf:Description> | ||
|
||
<rdf:Property rdf:about="http://fedora.info/definitions/v4/indexing#hasIndexingTransformation"> | ||
<rdfs:label xml:lang="en">has indexing transformation</rdfs:label> | ||
<rdfs:comment xml:lang="en">Specifies an indexing transformation</rdfs:comment> | ||
<rdfs:domain rdf:resource="http://fedora.info/definitions/v4/indexing#Indexable"/> | ||
<rdfs:isDefinedBy rdf:resource="http://fedora.info/definitions/v4/indexing#"/> | ||
</rdf:Property> | ||
|
||
<rdfs:Class rdf:about="http://fedora.info/definitions/v4/indexing#Indexable"> | ||
<rdfs:label xml:lang="en">indexable resource</rdfs:label> | ||
<rdfs:comment xml:lang="en">A resource that has been marked as indexable.</rdfs:comment> | ||
<rdfs:subClassOf rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/> | ||
<rdfs:isDefinedBy rdf:resource="http://fedora.info/definitions/v4/indexing#"/> | ||
</rdfs:Class> | ||
|
||
</rdf:RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:dcterms="http://purl.org/dc/terms/"> | ||
<xsl:output method="html"/> | ||
<xsl:variable name="about" select="/rdf:RDF/rdf:Description[1]/@rdf:about"/> | ||
<xsl:variable name="title" select="/rdf:RDF/rdf:Description[1]/dcterms:title"/> | ||
<xsl:variable name="comment" select="/rdf:RDF/rdf:Description[1]/rdfs:comment"/> | ||
<xsl:variable name="modified" select="/rdf:RDF/rdf:Description[1]/dcterms:modified"/> | ||
<xsl:variable name="publisher" select="/rdf:RDF/rdf:Description[1]/dcterms:publisher/@rdf:resource"/> | ||
<xsl:variable name="seeAlso" select="/rdf:RDF/rdf:Description[1]/rdfs:seeAlso/@rdf:resource"/> | ||
|
||
|
||
<xsl:template match="/"> | ||
<html> | ||
<head> | ||
<title><xsl:value-of select="$title"/></title> | ||
<style> | ||
h4 { margin-bottom: 0.25em; } | ||
body { font-family: sans-serif; } | ||
.about { font-family: monospace; margin-left: 1em; } | ||
.label { margin-left: 1em; font-style:italic; } | ||
.comment { margin-left: 1em; } | ||
.property { margin-left: 1em; } | ||
.modified { margin-left: 1em; } | ||
.published { margin-left: 1em; } | ||
.seealso { margin-left: 1em; } | ||
</style> | ||
</head> | ||
<body> | ||
<h1><xsl:value-of select="$title"/></h1> | ||
<div class="about"><xsl:value-of select="$about"/></div> | ||
<div class="comment"><xsl:value-of select="$comment"/></div> | ||
<div class="modified">Modified: <xsl:value-of select="$modified"/></div> | ||
<div class="published">Published by: <a href="{$publisher}"><xsl:value-of select="$publisher"/></a></div> | ||
<xsl:if test="$seeAlso != ''"> | ||
<div class="seealso">See Also: <a href="{$seeAlso}"><xsl:value-of select="$seeAlso"/></a></div> | ||
</xsl:if> | ||
|
||
<!-- table of contents --> | ||
<div class="table-of-contents"> | ||
<h2>Table of Contents</h2> | ||
<xsl:for-each select="/rdf:RDF/rdfs:Class"> | ||
<xsl:sort select="@rdf:about"/> | ||
<xsl:if test="position() = 1"><h3>Classes</h3></xsl:if> | ||
<xsl:call-template name="toc-entry"/> | ||
</xsl:for-each> | ||
<xsl:for-each select="/rdf:RDF/rdf:Property"> | ||
<xsl:sort select="@rdf:about"/> | ||
<xsl:if test="position() = 1"><h3>Properties</h3></xsl:if> | ||
<xsl:call-template name="toc-entry"/> | ||
</xsl:for-each> | ||
</div> | ||
|
||
<!-- class list --> | ||
<div class="contents"> | ||
<h2>Entity Definitions</h2> | ||
<xsl:for-each select="/rdf:RDF/rdfs:Class"> | ||
<xsl:sort select="@rdf:about"/> | ||
<xsl:if test="position() = 1"><h3>Classes</h3></xsl:if> | ||
<xsl:call-template name="main-entry"/> | ||
</xsl:for-each> | ||
|
||
<!-- properties list --> | ||
<xsl:for-each select="/rdf:RDF/rdf:Property"> | ||
<xsl:sort select="@rdf:about"/> | ||
<xsl:if test="position() = 1"><h3>Properties</h3></xsl:if> | ||
<xsl:call-template name="main-entry"/> | ||
</xsl:for-each> | ||
</div> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
<xsl:template name="display-uri"> | ||
<xsl:param name="label"/> | ||
<xsl:param name="uri"/> | ||
<xsl:variable name="name"> | ||
<xsl:choose> | ||
<xsl:when test="/*/namespace::*[starts-with($uri,.)]"> | ||
<xsl:for-each select="/*/namespace::*"> | ||
<xsl:if test="starts-with($uri,.)"> | ||
<xsl:value-of select="name()"/>:<xsl:value-of select="substring-after($uri,.)"/> | ||
</xsl:if> | ||
</xsl:for-each> | ||
</xsl:when> | ||
<xsl:otherwise><xsl:value-of select="$uri"/></xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:variable> | ||
<xsl:if test="$uri != ''"> | ||
<li><xsl:value-of select="$label"/><xsl:text>: </xsl:text> | ||
<a href="$uri"><xsl:value-of select="$name"/></a> | ||
</li> | ||
</xsl:if> | ||
</xsl:template> | ||
<xsl:template name="toc-entry"> | ||
<xsl:variable name="id"> | ||
<xsl:value-of select="substring-after(@rdf:about,$about)"/> | ||
</xsl:variable> | ||
<xsl:if test="$id != ''"> | ||
<a href="#{$id}"><xsl:value-of select="$id"/></a> | ||
<xsl:text> </xsl:text> | ||
</xsl:if> | ||
</xsl:template> | ||
<xsl:template name="main-entry"> | ||
<xsl:variable name="id"> | ||
<xsl:value-of select="substring-after(@rdf:about,$about)"/> | ||
</xsl:variable> | ||
<xsl:if test="$id != ''"> | ||
<h4 id="{$id}"><xsl:value-of select="$id"/></h4> | ||
<ul> | ||
<li>Label: <xsl:value-of select="rdfs:label"/></li> | ||
<xsl:if test="rdfs:comment != ''"> | ||
<li>Comment: <xsl:value-of select="rdfs:comment"/></li> | ||
</xsl:if> | ||
<xsl:if test="rdfs:subClassOf/@rdf:resource"> | ||
<xsl:call-template name="display-uri"> | ||
<xsl:with-param name="label">Subclass of</xsl:with-param> | ||
<xsl:with-param name="uri" select="rdfs:subClassOf/@rdf:resource"/> | ||
</xsl:call-template> | ||
</xsl:if> | ||
<xsl:if test="rdfs:subPropertyOf/@rdf:resource"> | ||
<xsl:call-template name="display-uri"> | ||
<xsl:with-param name="label">Subproperty of</xsl:with-param> | ||
<xsl:with-param name="uri" select="rdfs:subPropertyOf/@rdf:resource"/> | ||
</xsl:call-template> | ||
</xsl:if> | ||
<xsl:if test="rdfs:domain/@rdf:resource"> | ||
<xsl:call-template name="display-uri"> | ||
<xsl:with-param name="label">Domain</xsl:with-param> | ||
<xsl:with-param name="uri" select="rdfs:domain/@rdf:resource"/> | ||
</xsl:call-template> | ||
</xsl:if> | ||
<xsl:if test="rdfs:range/@rdf:resource"> | ||
<xsl:call-template name="display-uri"> | ||
<xsl:with-param name="label">Range</xsl:with-param> | ||
<xsl:with-param name="uri" select="rdfs:range/@rdf:resource"/> | ||
</xsl:call-template> | ||
</xsl:if> | ||
</ul> | ||
</xsl:if> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section depends on an
rdfs2html.xsl
file, which was not included in the commit. Should I revert that change or simply include the XSLT from @escowles ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acoburn Go ahead and include that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@escowles Thanks so much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acoburn, I am not yet seeing the
rdfs2html.xsl
file. Have you yet to commit it or am I missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't added it yet. It will come with the next commit -- it needed a bit of modification to work with rdf:Property and rdfs:Class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awoods -- the file is there now.