Merge branch 'dwc_cleanup' into website_design

This commit is contained in:
Peter Desmet 2015-01-13 12:01:15 +01:00
commit b6c6837e7d
6 changed files with 3071 additions and 2249 deletions

View File

@ -1,22 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Darwin Core Terms: A quick reference guide</title>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
</head>
#def showTerm($t)
<body>
<div class="container">
<div class="jumbotron">
<h1>Darwin Core Term Reference</h1>
<p>This document is a quick reference for all recommended Darwin Core terms. For complete historical term information, including version changes and pre-standard terms, see [<a href="http://rs.tdwg.org/dwc/terms/history.html">HISTORY</a>]. For a comparative table of elements from pre-standard versions of Darwin Core to the current terms in the standard, see [<a href="http://rs.tdwg.org/dwc/terms/mappings.html">VERSIONS</a>].</p>
</div>
<p>
<strong>Audience</strong>: This document is targeted toward those who need a reference (lists and definitions) to the essential information about the current recommended Darwin Core terms.</p>
<p>This quick guide provides a list of all current terms of the Darwin core. The terms are organized by categories (in bold) in the index. The categories correspond to Darwin Core terms that are classes (terms that have other terms to describe them). The terms that describe a given class (the class properties) appear in the list immediately below the name of the category in the index. The index provides links to the term descriptions in the table below the index.</p>
<p>Names that begin with dcterms: are terms managed by the Dublin Core Metadata Initiative [DCMI], which are reproduced here and which may include a description and comments adapted for the biodiversity community. The original definition of such terms can be found by following the link given in the Details section for the term.</p>
<p>Terms under the Record-level Terms section apply to the whole record regardless of the record type. For example, a record for a camera trap bird sighting would fall into the Dublin Core dcterms:type category StillImage and at the same time into the Darwin Core basisOfRecord category MachineObservation - a particular type of Occurrence, so the value of dcterms:type term for the record would be "StillImage" and the value of the basisOfRecord term would be "MachineObservation" to show which kind of Occurrence record it is. All of the rest of the record-level terms would apply to the Occurrence record.</p>
<p>The terms found under the Auxiliary Terms section can only be meaningfully implemented in an application that supports relational structures. For example, none of the auxiliary terms will be found in the specification of the Simple Darwin Core [SIMPLEDWC], which is "flat" in structure.</p>
#def showTerm($t, $isProperty)
#if $t.uri is not None
<a name="$t.name"></a>
<dl class="dl-horizontal">
<dl
#if $isProperty
id="$t.name"
#end if
class="dl-horizontal class-dl">
<dt>Name</dt>
<dd><strong>$t.name</strong></dd>
<dd>$t.name</dd>
<dt>Label</dt>
<dd>$t.label</dd>
<dt>Identifier</dt>
<dd>$t.uri</dd>
<dd><a href="$t.uri">$t.uri</a></dd>
#if $t.class is not None
#if $isProperty
<dt>Class</dt>
<dd>$t.class</dd>
#end if
@ -27,48 +54,39 @@
<dt>Comment</dt>
<dd>$t.comment</dd>
<dt>Details</dt>
<dt>Reference</dt>
<dd><a href="http://terms.tdwg.org/wiki/$t.fullname">http://terms.tdwg.org/wiki/$t.fullname</a></dd>
<dt>History</dt>
<dd><a href="$t.version">$t.version</a></dd>
</dl>
<hr/>
#end if
#end def
<body>
<div class="container">
<div class="jumbotron">
<h1>Darwin Core Term Reference</h1>
</div>
#for $group in $groups
<section id="$group.name" class="class-section">
<header>
#if $group.uri is not None
<h4><a href="#$group.name">$group.name</a></h4>
<h2>$group.name</h2>
#else
<h4>$group.name</h4>
<h2>$group.name</h2>
#end if
<p>
#set $sep = ''
<ul class="list-inline term-index">
#for $term in $group.terms
$sep <a href="#$term.name">$term.name</a>
#set $sep = '|'
<li><a href="#$term.name">$term.name</a></li>
#end for
</p>
</ul>
</header>
$showTerm(group, False)
#for $t in $group.terms
$showTerm(t, True)
#end for
#end for
<hr/>
#for $t in $groups
$showTerm(t)
#end for
#for $group in $groups
#for $t in $group.terms
$showTerm(t)
#end for
#end for
</div> <!-- /container -->

View File

@ -15,9 +15,10 @@ DC=Namespace("http://purl.org/dc/terms/")
DWCA=Namespace("http://rs.tdwg.org/dwc/terms/attributes/")
def buildHtml():
data=parseTerms()
print """building html files"""
html = Template(file="recommended.tmpl", searchList=[parseTerms()])
recommended = open("recommended.html", "w")
html = Template(file="recommended.tmpl", searchList=[data])
recommended = open("../terms/index.html", "w")
recommended.write(str(html))
recommended.close()
@ -26,19 +27,28 @@ def buildDownloads():
print """TBD"""
def getTerm(name, g):
def veriyfCompleteness(graph, yaml):
print """veriyf graph completeness"""
print """TBD"""
def anchorLinks(x):
print """TBD"""
def getTermDef(name, g):
t={}
t["name"]=name
t["fullname"]="dwc:"+name
if name.startswith("DC_"):
name=name[3:]
uri=DC[name]
t["name"]="dcterms:"+name
t["fullname"]=t["name"]
elif name.find(" ") > 0:
uri=None
t["name"]=name
else:
uri=DWC[name]
t["name"]=name
t["uri"]=uri
t["label"]=g.value(subject=uri, predicate=RDFS.label)
t["class"]=g.value(subject=uri, predicate=DWCA.organizedInClass)
t["definition"]=g.value(subject=uri, predicate=RDFS.comment)
t["comment"]=g.value(subject=uri, predicate=DC.description)
@ -57,16 +67,17 @@ def parseTerms():
g.add( (uri, RDFS.comment, Literal(dc[t]["definition"])) )
g.add( (uri, DC.description, Literal(dc[t]["comment"])) )
g.add( (uri, DC.hasVersion, URIRef(dc[t]["details"])) )
# before we continue verify we have all terms covered in both the order yaml and the graph
veriyfCompleteness(g, order)
data={}
groups=[]
for groupData in order:
group=getTerm(sorted(groupData.keys())[0], g)
group=getTermDef(sorted(groupData.keys())[0], g)
groups.append(group)
group["terms"]=[]
for t in sorted(groupData.values())[0]:
group["terms"].append(getTerm(t, g))
group["terms"].append(getTermDef(t, g))
data["groups"]=groups
# print data
return data

View File

@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To use the stylesheet to make the RDF more readable in a web browser,
uncomment one of the the following stylesheet references:
<?xml-stylesheet type="text/xsl" href="human.xsl"?>
<?xml-stylesheet type="text/xsl" href="http://rs.tdwg.org/dwc/rdf/human.xsl"?>
-->
<!DOCTYPE rdf:RDF [
<!ENTITY rdfns 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
@ -12,10 +6,6 @@
<!ENTITY dctermsns 'http://purl.org/dc/terms/'>
<!ENTITY dctypens 'http://purl.org/dc/dcmitype/'>
<!ENTITY dwcattributesns 'http://rs.tdwg.org/dwc/terms/attributes/'>
<!--
<!ENTITY skosns 'http://www.w3.org/2004/02/skos/core#'>
<!ENTITY vsns 'http://www.w3.org/2003/06/sw-vocab-status/ns#'>
-->
]>
<rdf:RDF
xmlns:dwcattributes="http://rs.tdwg.org/dwc/terms/attributes/"
@ -27,7 +17,8 @@ xml:base="http://rs.tdwg.org/dwc/terms/">
<dcterms:title xml:lang="en">Darwin Core Recommended Terms</dcterms:title>
<rdfs:comment>This document contains a list of Darwin Core terms that have the dwcattributes:status equal to "recommended". For the full normative RDF document of all Darwin Core terms, see dwctermshistory.rdf. To comment on this schema, please create a new issue in https://github.com/tdwg/dwc/issues</rdfs:comment>
<dcterms:publisher xml:lang="en">Biodiversity Information Standards (TDWG)</dcterms:publisher>
<dcterms:modified>2014-12-05</dcterms:modified>
<dcterms:modified>2015-01-12</dcterms:modified>
<dcterms:license>http://creativecommons.org/licenses/by/4.0/</dcterms:license>
</rdf:Description>
<!--
Each RDF description uses the following:
@ -43,14 +34,6 @@ xml:base="http://rs.tdwg.org/dwc/terms/">
rdfs:range
rdfs:subPropertyOf
rdfs:seeAlso (for ABCD mapping)
dwcattributes:status
dwcattributes:decision
// potentially useful
rdfs:domain
skos = http://www.w3.org/2004/02/skos/core#
skos:example
vs = http://www.w3.org/2003/06/sw-vocab-status/ns#
vs:term_status
-->
<!-- Mutable RDF goes here -->
<rdf:Description rdf:about="http://rs.tdwg.org/dwc/terms/acceptedNameUsage">

View File

@ -1,145 +0,0 @@
/** ----------------------------------------------------------------------------------
RDF styling by loic@ultimedia.com.au
---------------------------------------------------------------------------------- */
/** ----------------------------------------------------------------------------------
* Common HTML elements //////////////////////////////////////////////////////////////
---------------------------------------------------------------------------------- */
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body,td,th,p,div {
font: 12px/1.4 Verdana, Arial, Helvetica, sans-serif;
color: #617694;
}
p {
margin-top: 0px;
margin-bottom: 20px;
}
/*---------------------------------------------------- links */
a:link { color: #EC7600; text-decoration:none; }
a:visited { color:#EC7600; text-decoration:none; }
a:hover { color:#EC7600; text-decoration:underline; }
a:active { color:#EC7600; text-decoration:none; }
/*---------------------------------------------------- headers */
h1,h2,h3,h4,h5,h6 {
font: 18px/1.8 Tahoma, Tahoma, "Times New Roman", sans-serif;
letter-spacing:1px;
margin-top: 0px;
color: #6A9832;
}
h1 {
font-size: 22px;
}
h2 {
font-size: 20px;
}
/** ----------------------------------------------------------------------------------
* Main layout elements //////////////////////////////////////////////////////////////
---------------------------------------------------------------------------------- */
#container {
text-align: left;
}
/*---------------------------------------------------- page header */
#RDF-header {
height:89px;
background:#617694 url(images/headerImage_RDF.jpg) right top no-repeat;
}
#logoBox {
width:149px;
height:89px;
float:left;
margin: 0;
background:#fff url(images/logo_RDF_bgd.gif) right bottom no-repeat;
}
#logo {
padding-top: 9px;
padding-left: 12px;
}
#RDF-header-title {
font: 24px/1.2 Georgia, "Times New Roman", sans-serif;
color: #E7F2D9;
margin: 0;
padding-top: 15px;
margin-left: 170px;
}
#RDF-title-bar {
background:#CADDB5 url(images/RDF-titlebar-right.gif) right bottom no-repeat;
height:30px;
}
/*---------------------------------------------------- main content */
#left-bar {
width: 133px;
float:left;
background:#617694 url(images/left-bar-bottom-right.gif) right bottom no-repeat;
}
#left-bar-menu {
padding: 0px 0px 20px 10px;
}
#left-bar-menu a:link { color: #FFCC00; text-decoration:none; }
#left-bar-menu a:visited { color:#FFCC00; text-decoration:none; }
#left-bar-menu a:hover { color:#FFFFFF; text-decoration:none; }
#left-bar-menu a:active { color:#FFFFFF; text-decoration:none; }
#RDF-main {
margin: 0 auto;
margin-top:20px;
margin-right:20px;
margin-left:150px;
}
/*---------------------------------------------------- RDF styles */
.TopProperties{
border: 1px solid #617694;
}
.ClassProperties{
background-color: #FAFCF8;
padding:20px;
border: 1px solid #ddd;
margin-bottom:20px;
}
table{
width: 100%;
padding: 0;
margin: 0;
border: 1px solid #ccc;
}
th{
color: white;
background-color: #617694;
vertical-align:text-top;
}
td{
padding: 5px;
border-top: 1px solid #ddd;
vertical-align:text-top;
background-color: #F0F2F4;
}
.ClassProperties dl {
margin-left:20px;
padding:10px;
border: 1px dashed #aaa;
margin-bottom:20px;
}
dd {
margin-bottom:5px;
}

View File

@ -1,289 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Rev: 1321 $ -->
<!-- $Date: 2007-09-10 17:23:32 +0200 (Mon, 10 Sep 2007) $ -->
<!-- $Author: RogerHyam $ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" version="1.0"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:dwctype="http://rs.tdwg.org/dwc/terms/vocabulary/"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:variable name="wikiPrefix">http://code.google.com/p/darwincore/wiki/</xsl:variable>
<xsl:template match="rdf:RDF">
<html>
<head>
<title>Darwin Core Terms</title>
<link rel="stylesheet" type="text/css" href="human.css"/>
</head>
<body>
<div class="container">
<div id="RDF-header">
<div id="logoBox">
<a href="http://www.tdwg.org">
<img src="http://rs.tdwg.org/ontology/voc/images/logo_RDF.gif" alt="TDWG logo" width="117"
height="67" border="0" id="logo"/>
</a>
</div>
<div id="RDF-header-title"> Darwin Core Terms</div>
</div>
<div id="RDF-title-bar">
<img src="http://rs.tdwg.org/ontology/voc/images/left-bar-top.gif" alt="left bar top"/>
</div>
<div id="left-bar">
<div id="left-bar-menu">
<a href="http://www.tdwg.org">TDWG home</a>
<div class="separator"><hr/></div>
<a href="http://128.32.146.144/dcterms/index.htm">Darwin Core Home</a><br/>
<a href="http://code.google.com/p/darwincore/">Darwin Core Development</a>
<div class="separator"><hr/></div>
<a href="http://128.32.146.144/dcterms/terms/index.htm">Quick Guide to Terms</a><br/>
<a href="http://128.32.146.144/dcterms/terms/type-vocabulary/index.htm">Type Vocabulary</a><br/>
<a href="http://128.32.146.144/dcterms/terms/namespace/index.htm">Namespaces</a><br/>
<a href="http://128.32.146.144/dcterms/terms/xsd/guide/index.htm">XML encoding</a><br/>
<a href="http://rs.tdwg.org/dwc/terms/guides/text/index.htm">Text encoding</a>
</div>
</div>
<div id="RDF-main">
<h1>
Darwin Core Terms
</h1>
<p>(This is an HTML view of the RDF term definitions. Use View-Source to
see the underlying RDF.) </p>
<xsl:apply-templates select="rdf:Description"/>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="rdf:Description">
<xsl:variable name="currentTerm">
<xsl:value-of select="concat('#', @rdf:ID)"/>
</xsl:variable>
<a>
<xsl:attribute name="name">
<xsl:value-of select="@rdf:ID"/>
</xsl:attribute>
</a>
<xsl:if test="@rdf:ID">
<h2>Term: <xsl:value-of select="@rdf:ID"/></h2>
</xsl:if>
<h3><xsl:value-of select="@rdf:about"/></h3>
<dl>
<xsl:apply-templates select="rdfs:*"/>
</dl>
<dl>
<xsl:apply-templates select="rdf:*"/>
</dl>
<dl>
<xsl:apply-templates select="dcterms:*"/>
</dl>
<dl>
<dt>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($wikiPrefix ,@rdf:ID)"/>
</xsl:attribute> Discussion Page. </a>
</dt>
<dd>Discussions related to this term on the wiki.</dd>
</dl>
</xsl:template>
<!-- RDF links -->
<xsl:template match="rdf:type">
<dt>
Type
</dt>
<dd>
<a>
<xsl:attribute name="href"><xsl:value-of select="./@rdf:resource"/></xsl:attribute><xsl:value-of select="./@rdf:resource"/></a>
</dd>
</xsl:template>
<!-- RDFS links -->
<xsl:template match="rdfs:label">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#label</xsl:attribute> Label </a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="rdfs:comment">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#comment</xsl:attribute> Comment </a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="rdfs:isDefinedBy">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#isDefinedBy</xsl:attribute> Is Defined By
</a>
</dt>
<dd>
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@rdf:resource"/>
</xsl:attribute>
<xsl:value-of select="./@rdf:resource"/>
</a>
</dd>
</xsl:template>
<xsl:template match="rdfs:subClassOf">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#subClassOf</xsl:attribute> Sub Class Of
</a>
</dt>
<dd>
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@rdf:resource"/>
</xsl:attribute>
<xsl:value-of select="./@rdf:resource"/>
</a>
</dd>
</xsl:template>
<!-- subPropertyOf -->
<xsl:template match="rdfs:subPropertyOf">
<dt>
Refines
</dt>
<dd>
<a>
<xsl:attribute name="href"><xsl:value-of select="./@rdf:resource"/></xsl:attribute><xsl:value-of select="./@rdf:resource"/></a>
</dd>
</xsl:template>
<xsl:template match="rdfs:range">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#range</xsl:attribute> Range </a>
</dt>
<dd>
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@rdf:resource"/>
</xsl:attribute>
<xsl:value-of select="./@rdf:resource"/>
</a>
</dd>
</xsl:template>
<xsl:template match="rdfs:domain">
<dt>
<a>
<xsl:attribute name="href"
>http://www.w3.org/2000/01/rdf-schema#domain</xsl:attribute> Class </a>
</dt>
<dd>
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@rdf:resource"/>
</xsl:attribute>
<xsl:value-of select="./@rdf:resource"/>
</a>
</dd>
</xsl:template>
<!-- DC Links -->
<xsl:template match="dc:title">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/elements/1.1/title</xsl:attribute>Title</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="dc:creator">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/elements/1.1/creator</xsl:attribute>Creator</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="dc:publisher">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/elements/1.1/publisher</xsl:attribute>Publisher</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="dcterms:description">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/elements/1.1/description</xsl:attribute>Description</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="dcterms:issued">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/terms/issued</xsl:attribute>Issued</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<xsl:template match="dcterms:modified">
<dt>
<a>
<xsl:attribute name="href"
>http://purl.org/dc/terms/modified</xsl:attribute>Modified</a>
</dt>
<dd>
<xsl:value-of select="."/>
</dd>
</xsl:template>
<!-- hasVersion -->
<xsl:template match="dcterms:hasVersion">
<dt>
Version
</dt>
<dd>
<a>
<xsl:attribute name="href"><xsl:value-of select="./@rdf:resource"/></xsl:attribute><xsl:value-of select="./@rdf:resource"/></a>
</dd>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff