This is an old revision of the document! Table of ContentsDissemination method for Low-Res JPEG from TIFFFedora Commons Sdef objectIngest new object Sdef (PID openbess:jpgldSdef) with these DS:
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="info:fedora/openbess:jpgldSdef"> <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"></fedora-model:hasModel> </rdf:Description> </rdf:RDF>
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" name="methodmap"> <fmm:Method operationName="getJpgLD"></fmm:Method> </fmm:MethodMap> Fedora Commons Sdep objectIngest new object Sdep (PID openbess:jpgldSdep-pageCModel) with these DS:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="info:fedora/openbess:jpgldSdep-pageCModel"> <hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"></hasModel> <isDeploymentOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/openbess:jpgldSdef"></isDeploymentOf> <isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:pageCModel"></isContractorOf> </rdf:Description> </rdf:RDF>
<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec"> <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC"> <fbs:DSInputLabel>DC</fbs:DSInputLabel> <fbs:DSMIME>text/xml</fbs:DSMIME> <fbs:DSInputInstruction></fbs:DSInputInstruction> </fbs:DSInput> </fbs:DSInputSpec>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="djatoka" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Fedora Local Djatoka Service" targetNamespace="jpgldSDep"> <wsdl:message name="getRegionRequest"> <wsdl:part name="PID" type="xsd:string"></wsdl:part> <wsdl:part name="DSID" type="xsd:string"></wsdl:part> <wsdl:part name="svc_id" type="xsd:string"></wsdl:part> </wsdl:message> <wsdl:message name="response"> <wsdl:part name="exhibit" type="xsd:base64Binary"></wsdl:part> </wsdl:message> <wsdl:portType name="FedoraDjatokaPortType"> <wsdl:operation name="getJpgLD"> <wsdl:input message="this:getRegionRequest"></wsdl:input> <wsdl:output message="this:response"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:service name="FedoraDjatoka"> <wsdl:port binding="this:FedoraDjatoka_http" name="FedoraDjatoka_port"> <http:address location="http://local.fedora.server/"></http:address> </wsdl:port> </wsdl:service> <wsdl:binding name="FedoraDjatoka_http" type="this:FedoraDjatokaPortType"> <http:binding verb="GET"></http:binding> <wsdl:operation name="getJpgLD"> <http:operation location="adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http://local.fedora.server/fedora/get/(PID)/(DSID)&svc_id=(svc_id)&svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&svc.format=image/jpeg&svc.level=4"></http:operation> <wsdl:input> <http:urlReplacement></http:urlReplacement> </wsdl:input> <wsdl:output> <mime:content type="image/jpeg"></mime:content> </wsdl:output> </wsdl:operation> </wsdl:binding> </wsdl:definitions>
<?xml version="1.0"?> <fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" name="methodmap"> <fmm:Method operationName="dc2pico" wsdlMsgName="dc2picoRequestMsg" wsdlMsgOutput="response"> <fmm:DatastreamInputParm parmName="DC" passBy="URL_REF" required="true"/> <fmm:DatastreamInputParm parmName="XSL" passBy="URL_REF" required="true"/> <fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/> <fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="text/xml"/> </fmm:Method> </fmm:MethodMap>
XSLT for DC to PICO transformationXSL datastream contains xslt transformation: <?xml version="1.0"?> <xsl:stylesheet xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:pico="http://purl.org/pico/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="oai_dc fn foxml rdf" version="1.0" xsi:schemaLocation="http://purl.org/pico/1.0/ http://www.culturaitalia.it/opencms/export/sites/culturaitalia/attachments/schemas/1.0/pico.xsd"> <xsl:output encoding="UTF-8" indent="yes" method="xml"/> <xsl:variable name="ns" select="'http://purl.org/pico/1.0/'"/> <xsl:variable name="schemaLoc" select="'http://purl.org/pico/1.0/ http://www.culturaitalia.it/opencms/export/sites/culturaitalia/attachments/schemas/1.0/pico.xsd'"/> <xsl:template match="/"> <pico:record> <xsl:attribute name="xsi:schemaLocation" namespace="http://www.w3.org/2001/XMLSchema-instance"> <xsl:value-of select="$schemaLoc"/> </xsl:attribute> <dc:title> <xsl:value-of select="/oai_dc:dc/dc:title"/> </dc:title> <dc:creator> <xsl:value-of select="/oai_dc:dc/dc:creator"/> </dc:creator> <xsl:apply-templates select="/oai_dc:dc/dc:subject"/> <xsl:if test="/oai_dc:dc/dc:description != ''"> <dc:description> <xsl:value-of select="/oai_dc:dc/dc:description"/> </dc:description> </xsl:if> <dc:publisher> <xsl:value-of select="/oai_dc:dc/dc:publisher"/> </dc:publisher> <dc:date> <xsl:value-of select="/oai_dc:dc/dc:date"/> </dc:date> <xsl:apply-templates select="/oai_dc:dc/dc:type"/> <xsl:for-each select="/oai_dc:dc/dc:identifier"> <xsl:choose> <xsl:when test="contains(.,'http')"> <xsl:element name="dcterms:isReferencedBy"> <xsl:attribute name="xsi:type" namespace="http://www.w3.org/2001/XMLSchema-instance">pico:Anchor</xsl:attribute> <xsl:value-of select="'title=visualizza la scheda esterna; url='"/> <xsl:value-of select="."/> </xsl:element> <xsl:element name="pico:preview"> <xsl:attribute name="xsi:type" namespace="http://www.w3.org/2001/XMLSchema-instance">dcterms:URI</xsl:attribute> <xsl:value-of select="."/> <xsl:value-of select="'/TN'"/> </xsl:element> </xsl:when> <xsl:otherwise> <dc:identifier> <xsl:value-of select="."/> </dc:identifier> </xsl:otherwise> </xsl:choose> </xsl:for-each> <dc:language> <xsl:value-of select="/oai_dc:dc/dc:language"/> </dc:language> </pico:record> </xsl:template> <xsl:template match="dc:subject"> <dc:subject> <xsl:value-of select="/oai_dc:dc/dc:subject"/> </dc:subject> <xsl:element name="dc:subject"> <xsl:attribute name="xsi:type" namespace="http://www.w3.org/2001/XMLSchema-instance">pico:Thesaurus</xsl:attribute> <xsl:value-of select="'http://culturaitalia.it/pico/thesaurus/4.2#libri'"/> </xsl:element> </xsl:template> <xsl:template match="dc:type"> <xsl:element name="dc:type"> <xsl:attribute name="xsi:type" namespace="http://www.w3.org/2001/XMLSchema-instance">dcterms:DCMIType</xsl:attribute> <xsl:value-of select="/oai_dc:dc/dc:type"/> </xsl:element> </xsl:template> </xsl:stylesheet> Fedora Commons bookCModelAdd the new service to RELS-EXT datastream: <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="info:fedora/islandora:bookCModel"> <hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/> <hasService xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:viewerSdef"/> <hasService xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/openbess:dc2picoSdef"/> </rdf:Description> </rdf:RDF> Oaiprovider (proai) configurationAdd new metada format to proai.properties: ... driver.fedora.md.formats = oai_dc pico driver.fedora.md.format.oai_dc.loc = http://www.openarchives.org/OAI/2.0/oai_dc.xsd driver.fedora.md.format.pico.loc = http://www.culturaitalia.it/opencms/export/sites/culturaitalia/attachments/schemas/1.0/pico.xsd driver.fedora.md.format.oai_dc.uri = http://www.openarchives.org/OAI/2.0/oai_dc/ driver.fedora.md.format.pico.uri = http://purl.org/pico/1.0/ driver.fedora.md.format.oai_dc.dissType = info:fedora/*/DC driver.fedora.md.format.pico.dissType = info:fedora/*/openbess:dc2picoSdef/dc2pico ... Result exampleHarvesting fron this URL http://fc1.to.cnr.it/oaiprovider/?verb=GetRecord&identifier=oai:fc1.to.cnr.it:openbess:TO043-00057&metadataPrefix=pico return this: <?xml version="1.0" encoding="UTF-8"?> <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> <responseDate>2012-07-11T10:03:19Z</responseDate> <request verb="GetRecord" identifier="oai:fc1.to.cnr.it:openbess:TO043-00057" metadataPrefix="pico">http://fc1.to.cnr.it/oaiprovider/</request> <GetRecord> <record> <header> <identifier>oai:fc1.to.cnr.it:openbess:TO043-00057</identifier> <datestamp>2012-07-11T10:02:03Z</datestamp> <setSpec>digibess:openbess:cognetti:directors</setSpec> </header> <metadata> <pico:record xmlns:pico="http://purl.org/pico/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xsi:schemaLocation="http://purl.org/pico/1.0/ http://www.culturaitalia.it/opencms/export/sites/culturaitalia/attachments/schemas/1.0/pico.xsd"> <dc:title>Monografie di soci e allievi del laboratorio di economia politica : 1909-911</dc:title> <dc:creator>R. Università di Torino</dc:creator> <dc:subject>Economia, lavoro, società</dc:subject> <dc:subject xsi:type="pico:Thesaurus">http://culturaitalia.it/pico/thesaurus/4.2#libri</dc:subject> <dc:publisher>s.n.</dc:publisher> <dc:date>2012-01-16</dc:date> <dc:type xsi:type="dcterms:DCMIType">Text</dc:type> <dc:identifier>openbess:TO043-00057</dc:identifier> <dcterms:isReferencedBy xsi:type="pico:Anchor">title=visualizza la scheda esterna; url=http://www.digibess.it/fedora/repository/openbess:TO043-00057</dcterms:isReferencedBy> <pico:preview xsi:type="dcterms:URI">http://www.digibess.it/fedora/repository/openbess:TO043-00057/TN</pico:preview> <dc:language>it</dc:language> </pico:record> </metadata> </record> </GetRecord> </OAI-PMH> |