See also list of DCMI PURLs
2016-04-21. Moved from github.com/dublincore/website to github.com/dcmi/vocabtool
2012-06-14. How-to instructions added
This tool was developed in circa 2002 by Mitsuharu Nagamori and Harry Wagner in order to generate the RDF schemas and Web pages which document DCMI Metadata Terms.
In 2012, Hugh Barnes and Gregg Kellogg extensively edited the tool to add support for generating the main HTML document [1] with an embedded RDF description using RDFa 1.1. Mitsuharu Nagamori cleaned and streamlined the resulting code.
Jon Phipps (with help from Tom Baker) made two further improvements:
-
Added an .htaccess file to the RDF directory for managing content negotiation of PURLs to RDF, Turtle, or HTML [2].
-
Added a Javascript script to the directory for the RDFa/HTML document in order to support resolution of PURLs for specific terms to specific-term HTML anchors in the document [3].
The source code for this tool is maintained in a github repository [4].
[1] http://dublincore.org/documents/dcmi-terms/
[2] http://dublincore.org/2012/06/14/.htaccess
[3] http://dublincore.org/documents/2012/06/14/dcmi-terms/jump2location.js
[4] https://github.com/dublincore/website
======================================================================
-
Make a copy of the latest data set to a new time-stamped directory, e.g.:
$ cp -Rip 2010-10-11 2012-06-14
It is important to copy the entire directory to ensure that the dot file ".htaccess" is not omitted.
-
Edit the data in the new time stamped directory (add new terms, etc):
2012-06-14/xmldata/dcam.xml 2012-06-14/xmldata/dcelements.xml 2012-06-14/xmldata/dcterms-classes.xml 2012-06-14/xmldata/dcterms-properties.xml 2012-06-14/xmldata/dcterms-ses.xml 2012-06-14/xmldata/dcterms-ves.xml 2012-06-14/xmldata/dctype.xml
-
Edit build.xml to point to the new data directory, e.g.:
:%s/2010-10-11/2012-06-14/
-
Edit the included "header" files as follows:
2012-06-14/headers/header-doc-dcterms.xml <Identifier property="dcterms:identifier">http://dublincore.org/documents/2012/06/14/dcmi-terms/</Identifier> 2012-06-14/headers/header-doc-dcterms.xml <Date-Issued property="dcterms:issued">2012-06-14</Date-Issued> 2012-06-14/headers/header-doc-history.xml <Identifier property="dcterms:identifier">http://dublincore.org/usage/terms/history/2012/06/14/</Identifier> 2012-06-14/headers/header-doc-history.xml <Date-Issued property="dcterms:issued">2012-06-14</Date-Issued> 2012-06-14/headers/header-rdf-dcam.xml <Date-Modified>2012-06-14</Date-Modified> 2012-06-14/headers/header-rdf-dcelements.xml <Date-Modified>2012-06-14</Date-Modified> 2012-06-14/headers/header-rdf-dcterms.xml <Date-Modified>2012-06-14</Date-Modified> 2012-06-14/headers/header-rdf-dctype.xml <Date-Modified>2012-06-14</Date-Modified>
-
Edit the introductory text to DCMI Metadata Terms and the historical versioning document as needed:
2012-06-14/headers/intro.dcmi-terms.xml 2012-06-14/headers/intro.history.xml
-
Delete the TTL, RDF, and SHTML files in /build:
build/dcam.rdf build/dcam.ttl build/dcelements.rdf build/dcelements.ttl build/dcterms.rdf build/dcterms.ttl build/dctype.rdf build/dctype.ttl build/html/dcmi-terms/index.shtml build/html/history/index.shtml
NOTE: Do not delete:
build/.htaccess build/html/dcmi-terms/jump2location.js
-
Edit the following lines in build/.htaccess to reflect the date of the new build:
RewriteRule ^(dcelements)$ HTTP://%{HTTP_HOST}/documents/2012/06/14/dcmi-terms\?v=elements [R=303,L,NE,NC] RewriteRule ^(dcterms)$ HTTP://%{HTTP_HOST}/documents/2012/06/14/dcmi-terms\?v=terms [R=303,L,NE,NC] RewriteRule ^(dctype)$ HTTP://%{HTTP_HOST}/documents/2012/06/14/dcmi-terms\?v=dcmitype [R=303,L,NE,NC] RewriteRule ^(dcam)$ HTTP://%{HTTP_HOST}/documents/2012/06/14/dcmi-terms\?v=dcam [R=303,L,NE,NC] RewriteRule ^(.*)$ HTTP://%{HTTP_HOST}/documents/2012/06/14/dcmi-terms/ [R=303,L,NE]
-
Apache Ant (version 1.7 or higher) is required to run the program. From the top directory, execute:
$ ant
The following output will be written to the "build" directory:
build/dcam.rdf build/dcelements.rdf build/dcterms.rdf build/dctype.rdf build/html/dcmi-terms/index.shtml build/html/history/index.shtml
Check that the following files are still present:
build/.htaccess build/html/dcmi-terms/jump2location.js
-
Use "rapper -o turtle" (or some similar tool) to generate Turtle files from the RDF:
$ rapper -o turtle dcam.rdf >dcam.ttl $ rapper -o turtle dcelements.rdf >dcelements.ttl $ rapper -o turtle dcterms.rdf >dcterms.ttl $ rapper -o turtle dctype.rdf >dctype.ttl
-
Do not forget to commit everything to the git repository and push to github! In general, commit early and often, with explicit commit comments.
-
Copy the contents of build/ directory (RDF, TTL, and .htaccess files) to a new timestamped directory in the admin/web SVN project -- listed here with their "stage" and "production" server addresses:
http://dublincore.org:8080/2012/06/14/.htaccess http://dublincore.org:8080/2012/06/14/dcam.rdf http://dublincore.org:8080/2012/06/14/dcelements.rdf http://dublincore.org:8080/2012/06/14/dcterms.rdf http://dublincore.org:8080/2012/06/14/dctype.rdf http://dublincore.org:8080/2012/06/14/dcam.ttl http://dublincore.org:8080/2012/06/14/dcelements.ttl http://dublincore.org:8080/2012/06/14/dcterms.ttl http://dublincore.org:8080/2012/06/14/dctype.ttl
-
Copy build/html/dcmi-terms/index.shtml to a new timestamped directory under the /documents tree in the SVN project -- listed here with its "stage" and "production" server addresses:
http://dublincore.org:8080/documents/2012/06/14/dcmi-terms/index.shtml
-
Copy build/html/history/index.shtml to a new timestamped directory under the /usage/terms/history/ tree in the SVN project -- listed here with its "stage" and "production" server addresses:
http://dublincore.org:8080/usage/terms/history/2012/06/14/index.shtml
-
Note that as of June 2012, the stand-alone DCMES document is currently maintained by hand. Edit the following file to change the date of publication.
http://dublincore.org:8080/documents/2012/06/14/dces/index.shtml http://dublincore.org/documents/2012/06/14/dces/index.shtml
- NOTE: Any changes to the fifteen properties of DCMES will need to be made in this document by hand!
-
Check your work with diffs to ensure that files were generated correctly, with no unexpected results. See, for example, the tests run for the 2012-06-14 build:
https://github.com/dublincore/website/blob/master/2012-06-14/installation-tests.sh
-
Ask for a build of the stage server to production and test all of the following
-
RDF, TTL, and .htaccess
http://dublincore.org/2012/06/14/.htaccess http://dublincore.org/2012/06/14/dcam.rdf http://dublincore.org/2012/06/14/dcelements.rdf http://dublincore.org/2012/06/14/dcterms.rdf http://dublincore.org/2012/06/14/dctype.rdf http://dublincore.org/2012/06/14/dcam.ttl http://dublincore.org/2012/06/14/dcelements.ttl http://dublincore.org/2012/06/14/dcterms.ttl http://dublincore.org/2012/06/14/dctype.ttl
-
DCMI Metadata Terms (with RDFa)
http://dublincore.org/documents/2012/06/14/dcmi-terms/index.shtml
-
Version history document (without RDFa)
http://dublincore.org/usage/terms/history/2012/06/14/index.shtml
-
Set up test partial-redirect PURLs at http://purl.org, e.g.:
http://purl.org/dc/test/elements/ => http://dublincore.org/2012/06/14/dcelements# http://purl.org/dc/test/terms/ => http://dublincore.org/2012/06/14/dcterms# http://purl.org/dc/test/type/ => http://dublincore.org/2012/06/14/dctype# http://purl.org/dc/test/am/ => http://dublincore.org/2012/06/14/dcam#
-
Ensure that content negotiation is working correctly by editing a test PURL and sending different accept requests, e.g.:
curl -L -I --header "Accept: application/rdf+xml" http://purl.org/dc/test/terms/instructionalMethod curl -L -I --header "Accept: application/rdf+turtle" http://purl.org/dc/test/terms/instructionalMethod curl -L -I --header "Accept: application/turtle" http://purl.org/dc/test/type/Image curl -L -I --header "Accept: text/turtle" http://purl.org/dc/test/terms/instructionalMethod
-
Prepare for the final publication by editing and commiting the "latest version" URLs to point to the latest version:
http://dublincore.org:8080/documents/dcmi-terms/index.shtml <!--#include virtual="/documents/2012/06/14/dcmi-terms/index.shtml" --> http://dublincore.org:8080/usage/terms/history/index.shtml <!--#include virtual="/usage/terms/history/2012/06/14/index.shtml" --> http://dublincore.org:8080/documents/dces/index.shtml <!--#include virtual="/documents/2012/06/14/dces/index.shtml" -->
-
Prepare and stage a news announcements!
-
Add references to the new RDF schemas to http://dublincore.org/schemas/rdfs/.
-
Build the production server from stage.
-
Immediately after the the production server is published, edit the following PURLs (all as "partial redirect PURLs"):
http://purl.org/dc/dcam/ => http://dublincore.org/2012/06/14/dcam# http://purl.org/dc/dcmitype/ => http://dublincore.org/2012/06/14/dctype# http://purl.org/dc/elements/1.1/ => http://dublincore.org/2012/06/14/dcelements# http://purl.org/dc/terms/ => http://dublincore.org/2012/06/14/dcterms#
-
Test the PURLs to ensure that they resolve as expected.
-
NOTE: There are four types of partial-redirect PURLs, of which the first should be selected:
--> Partial-redirect PURL not Partial-redirect PURL with appended file extension(s) not Partial-redirect PURL with ignored file extension(s) not Partial-redirect PURL with replaced file extension(s)
Any comments or feedback on this tool or the general approach to publishing DCMI Metadata Terms (such as versioning) is most welcome. To submit a comment, please either subscribe to the dc-architecture mailing list [2] and post there or send comments to [email protected] indicating whether or not they may be shared with the list.
Tom Baker [email protected]
CIO, Dublin Core Metadata Initiative
http://dublincore.org
[1] https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=dc-architecture
Notes for next build:
- 2016-01-11: in dcterms-ves.xml, add #H7 to link to DCMI Type Vocabulary: http://dublincore.org/documents/dcmi-type-vocabulary/#H7.