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
-- Function to query metadata values and return table, all parameters optional | |
/* Example usages: | |
SELECT DMeta( 4317 ); -- all metadata for Item 4317 as a single column with results in a set | |
SELECT * FROM DMeta( 4317 ); -- all metadata for Item 4317 with results as a table | |
SELECT * FROM DMeta(); -- all metadata as a table | |
SELECT * FROM DMeta( NULL, 'dc.date.issued' ); -- all metadata using qualified element 'dc.date.issued' | |
SELECT "value" FROM DMeta( 4317, 'dc.subject' ); -- all metadata values for Item 4317 using element 'dc.subject' | |
SELECT * FROM DMeta( 4317, 'dc.subject', 'corporate' ); -- all metadata records for Item 4317 where 'dc.subject' contains "corporate" | |
SELECT * FROM DMeta( NULL, NULL, 'corporate' ); -- all metadata records with value containing "corporate" | |
*/ |
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
-- PostgresSQL pure SQL function to return handle, given an id | |
-- assumes handle is uniquely in element "identifier(.uri)", uncomment non-standard uri qualifier to enforce that | |
CREATE OR REPLACE FUNCTION DHandle(p_id INTEGER) RETURNS text AS $$ | |
SELECT text_value | |
FROM metadatavalue V, metadatafieldregistry R | |
WHERE R.metadata_field_id = V.metadata_field_id | |
AND element ILIKE 'identifier' | |
-- AND qualifier ILIKE 'uri' | |
AND item_id=$1; |
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
#! /usr/bin/perl | |
# ********************************************************* | |
# Invoke the Symplectic Elements API with a get or set call | |
# to a publication item | |
# (/{cat}/records/{source}/{proprietary-id} API method) | |
# using either HTTP GET or PUT (set) depending on arguments. | |
# Usage: | |
# - get/dump : pubitem.pl $id | |
# - set/amend: pubitem.pl $id $xmlfile |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Lincoln override templates for Elements crosswalk transforms --> | |
<xsl:transform | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:crosswalks="info:symplectic/crosswalks" | |
xmlns:pubs="http://www.symplectic.co.uk/publications/atom-api" | |
version="1.0" | |
> |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" | |
> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-NZ" lang="en-NZ"> | |
<head> | |
<title>Electronic resource login</title> | |
<style type="text/css"> |
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
javascript:(function(){var%20forms=document.getElementsByTagName('form');for(i=0;i<forms.length;i++){forms[i].style.display='block';}})(); |