Date: Thu, 28 Mar 2024 05:15:14 -0400 (EDT) Message-ID: <1101526591.27308.1711617314805@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_27307_1910789231.1711617314804" ------=_Part_27307_1910789231.1711617314804 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
In this Appendix you will find the following samples:
If you notice any errors or omissions, or would like to see another samp= le in this appendix, please submit a request on the users list, or to = community@islandora.ca.
Here is a custom QUERY Datastream that returns objects that belong to a = particular collection, and are set to a particular state (active)
select = $object $title from <#ri> where ($object <dc:title> $title and $object <fedora-model:hasModel> $content and $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/de= mo:special_collection> and $object <fedora-model:state> <info:fedora/fedora-system:def/mo= del#Active>) order by $title desc
Here is a sample COLLECTION_VIEW Datastream that will render your conten= t as a bulleted list.
<= ;xsl:stylesheet xmlns:s=3D"http://www.w3.org/2001/sw/DataAccess/rf1/result"= xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" version=3D"1.0"> <xsl:template match=3D"/"> <xsl:variable name=3D"BASEURL"> <xsl:value-of select=3D"$baseUrl"></xsl:value-of> </xsl:variable> <ul> <xsl:for-each select=3D"/s:sparql/s:results/s:result"> <xsl:variable name=3D"pid" select=3D"substring-after(s:object/@u= ri,'/')"></xsl:variable> <li> <a> <xsl:attribute name=3D"href"> <xsl:value-of select=3D"$BASEURL"></xsl:value-of> <xsl:text>/fedora/repository/</xsl:text> <xsl:value-of select=3D"$pid"></xsl:value-of>/-/ = <xsl:value-of select=3D"$pid"></xsl:value-of> </xsl:attribute> <xsl:value-of select=3D"s:title"></xsl:value-of> </a> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet>
Here is a Custom Request Handler
<req= uestHandler name=3D"RefWorks Site"><\!-\- default values for query pa= rameters =E2=86=92 <lst name=3D"defaults"> <str name=3D"echoParams">explicit</str> <str name=3D"qf"> dc.title^2.5 refworks.k1^1.5 refworks.a1^5.0 refworks.u2^5.0 refworks.u1^5.= 0 dc.contributor^5.0 dc.source^1.0 collection^2.0 PID^0.5 refworks.ab^2.0</str> <str name=3D"fl"> PID, refworks.a1, refworks.a2, refworks.ar, refworks.k1, refworks.ed, refwo= rks.fd, refworks.jf, refworks.ab, refworks.no, refworks.is, refworks.op, refworks.pp, refworks.pb, refworks.sp, refworks.rt, refworks.t= 1, refworks.t2, refworks.vo, refworks.yr</str> <str name=3D"q.alt">*:*</str></lst><lst name=3D"append= s"><str name=3D"fq"> PID:cyct\* </str></lst> </requestHandler>
<Pol= icy xmlns=3D"urn:oasis:names:tc:xacml:1.0:policy" PolicyId=3D"ViewAndEditBy= UserOrRoleOnly" RuleCombiningAlgId=3D"urn:oasis:names:tc:xacml:1.0:rule-com= bining-algorithm:first-applicable"> <Description>This is an object-specific policy. It could be stored i= nside the digital object in the POLICY datastream OR in the directory for o= bject-specific policies. (The directory location is set in the Authorizatio= n module configuration in the Fedora server configuration file (fedora.fcfg= ). By using multiple policy Rules, this policy shows how to deny access to = all raw datastreams in the object except to particular users (e.g., the obj= ect owners). It also shows how to deny access to a particular disseminatio= ns to selected user roles.</Description> <Target> <Subjects> <AnySubject></AnySubject> </Subjects> <Resources> <AnyResource></AnyResource> </Resources> <Actions> <AnyAction></AnyAction> </Actions> </Target> <Rule RuleId=3D"denyapi-m-except-to-user" Effect=3D"Deny"> <Condition FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:not"> <Apply FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:or"> <Apply FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:string-at-lea= st-one-member-of"> <SubjectAttributeDesignator AttributeId=3D"fedoraRole" DataType=3D"http:= //www.w3.org/2001/XMLSchema#string" MustBePresent=3D"false"></Subject= AttributeDesignator> <Apply FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:string-bag"&g= t; <AttributeValue DataType=3D"http://www.w3.org/2001/XMLSchema#string">= administrator</AttributeValue> <AttributeValue DataType=3D"http://www.w3.org/2001/XMLSchema#string">= Any Drupal Role </AttributeValue> </Apply> </Apply> <Apply FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:string-at-lea= st-one-member-of"> <SubjectAttributeDesignator AttributeId=3D"urn:fedora:names:fedora:2.1:s= ubject:loginId" MustBePresent=3D"false" DataType=3D"http://www.w3.org/2001/= XMLSchema#string"></SubjectAttributeDesignator> <Apply FunctionId=3D"urn:oasis:names:tc:xacml:1.0:function:string-bag"&g= t; <AttributeValue DataType=3D"http://www.w3.org/2001/XMLSchema#string">= fedoraAdmin</AttributeValue> </Apply> </Apply> </Apply> </Condition> </Rule> <Rule RuleId=3D"3" Effect=3D"Permit"></Rule> </Policy>
<def= inition xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:noNames= paceSchemaLocation=3D"./XMLFormDefinition.xsd"> <properties> <document> <root> <local_name>root</local_name> <prefix>prefix</prefix> <uri>http://localhost/</uri> </root> <namespaces> <namespace prefix=3D"xsi">http://www.w3.org/2001/XMLSchema-instance&l= t;/namespace> <namespace prefix=3D"xmlns">http://www.w3.org/2000/xmlns</namespac= e> </namespaces> <schema>http://localhost/schema/schema.xsd</schema> </document> </properties> <form> <properties> <type>form</type> <tree>true</tree> </properties> <children> <element name=3D"first"> <properties> <title>first</title> <type>fieldset</type> <actions> <create> <path>/root/</path> <context>document</context> <schema>/xsd:schema/xsd:complexType\[@name=3D'rootType'\]/xsd:sequenc= e/xsd:element\[@ref=3D'first'\]</schema> <type>element</type> <value>first</value> </create> <read> <path>/root/first</path> <context>document</context> </read> </actions> </properties> <children> <element name=3D"second"> <properties> <title>second</title> <type>textfield</type> <actions> <create> <path>self::node()</path> <context>parent</context> <schema>/xsd:schema/xsd:complexType\[@name=3D'rooType'\]/xsd:sequence= /xsd:element\[@ref=3D'second'\]</schema> <type>element</type> <value>second</value> </create> <read> <path>second</path> <context>parent</context> </read> </actions> </properties> </element> </children> </element> <element name=3D"submit"> <properties> <type>submit</type> <value>Submit</value> </properties> </element> </children> </form> </definition>