mirror of https://github.com/tdwg/dwc.git
update terms reference layout according to https://github.com/tdwg/dwc/issues/68
This commit is contained in:
parent
acde7239b2
commit
507f04b506
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@ 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()])
|
||||
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
|
||||
|
||||
|
||||
|
|
4748
terms/index.html
4748
terms/index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue