Skip to content

Instantly share code, notes, and snippets.

View dmoses's full-sized avatar

Don Moses dmoses

  • Robertson Library, University of Prince Edward Island
  • Charlottetown, Prince Edward Island
View GitHub Profile
$pid = 'islandora:root';
$object = islandora_object_load($pid);
dsm($object['RELS-EXT']->content, 'RELS-EXT Prior to Add');
$object->relationships->add(FEDORA_MODEL_URI, 'hasModel', 'si:conceptCModel');
dsm($object['RELS-EXT']->content, 'RELS-EXT After Add');
$object->relationships->remove(FEDORA_MODEL_URI, 'hasModel', 'si:conceptCModel');
dsm($object['RELS-EXT']->content, 'RELS-EXT After Remove');
@dmoses
dmoses / gist:8322788
Created January 8, 2014 19:24
this is the premis that i get as a result from nick's foxml file.
<?xml version="1.0" encoding="utf-8"?>
<premis xmlns="info:lc/xmlns/premis-v2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis.xsd" version="2.2"><!--PREMIS data for Islandora object yul:89067. Contains object entries for each Managed datastream
in an Islandora object, and event entries documenting all fixity checks performed on versions of those datastreams.
Note that a datastream version that has never had a fixity check performed on it will not be linked to any fixity
check events.--><!--'Internal' eventIdentifierType values are comprised of Fedora datasteam ID plus ':' plus Fedora Audit Record ID.-->
<object xsi:type="file">
<objectIdentifier>
<objectIdentifierType>Fedora Commons datastreamVersion ID</objectIdentifierType>
<objectIdentifierValue>AU