Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
repo:jpglr [2013/06/18 10:42] giancarlo |
repo:jpglr [2013/06/18 10:47] giancarlo |
<WRAP prewrap center> | <WRAP prewrap center> |
<code xml> | <code xml> |
<?xml version="1.0"?> | <fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec"> |
<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="dc2picoSdepInputSpec"> | <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC"> |
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC"> | <fbs:DSInputLabel>DC</fbs:DSInputLabel> |
<fbs:DSInputLabel>DC</fbs:DSInputLabel> | <fbs:DSMIME>text/xml</fbs:DSMIME> |
<fbs:DSMIME>text/xml</fbs:DSMIME> | <fbs:DSInputInstruction></fbs:DSInputInstruction> |
<fbs:DSInputInstruction/> | </fbs:DSInput> |
</fbs:DSInput> | |
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" pid="openbess:dc2picoSdep-bookCModel" wsdlMsgPartName="XSL"> | |
<fbs:DSInputLabel>XSL</fbs:DSInputLabel> | |
<fbs:DSMIME>text/xml</fbs:DSMIME> | |
<fbs:DSInputInstruction/> | |
</fbs:DSInput> | |
</fbs:DSInputSpec> | </fbs:DSInputSpec> |
</code> | </code> |
<WRAP prewrap center> | <WRAP prewrap center> |
<code xml> | <code xml> |
<?xml version="1.0"?> | <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: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="dc2picoSdep" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="dc2picoSdep" targetNamespace="dc2picoSdep"> | <wsdl:message name="getRegionRequest"> |
<wsdl:message name="dc2picoRequestMsg"> | <wsdl:part name="PID" type="xsd:string"></wsdl:part> |
<wsdl:part name="DC" type="xsd:string"/> | <wsdl:part name="DSID" type="xsd:string"></wsdl:part> |
<wsdl:part name="XSL" type="xsd:string"/> | <wsdl:part name="svc_id" type="xsd:string"></wsdl:part> |
</wsdl:message> | </wsdl:message> |
<wsdl:message name="response"> | <wsdl:message name="response"> |
<wsdl:part name="exhibit" type="xsd:base64Binary"/> | <wsdl:part name="exhibit" type="xsd:base64Binary"></wsdl:part> |
</wsdl:message> | </wsdl:message> |
<wsdl:portType name="dc2pico_portType"> | <wsdl:portType name="FedoraDjatokaPortType"> |
<wsdl:operation name="dc2pico"> | <wsdl:operation name="getJpgLD"> |
<wsdl:input message="this:dc2picoRequestMsg"/> | <wsdl:input message="this:getRegionRequest"></wsdl:input> |
<wsdl:output message="this:response"/> | <wsdl:output message="this:response"></wsdl:output> |
</wsdl:operation> | </wsdl:operation> |
</wsdl:portType> | </wsdl:portType> |
<wsdl:service name="dc2pico_service"> | <wsdl:service name="FedoraDjatoka"> |
<wsdl:port binding="this:dc2pico_binding" name="dc2pico_port"> | <wsdl:port binding="this:FedoraDjatoka_http" name="FedoraDjatoka_port"> |
<http:address location="http://fc1.to.cnr.it:8080/saxon/"/> | <http:address location="http://local.fedora.server/"></http:address> |
</wsdl:port> | </wsdl:port> |
</wsdl:service> | </wsdl:service> |
<wsdl:binding name="dc2pico_binding" type="this:dc2pico_portType"> | <wsdl:binding name="FedoraDjatoka_http" type="this:FedoraDjatokaPortType"> |
<http:binding verb="GET"/> | <http:binding verb="GET"></http:binding> |
<wsdl:operation name="dc2pico"> | <wsdl:operation name="getJpgLD"> |
<http:operation location="SaxonServlet?source=(DC)&style=(XSL)&clear-stylesheet-cache=yes"/> | <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> | <wsdl:input> |
<http:urlReplacement/> | <http:urlReplacement></http:urlReplacement> |
</wsdl:input> | </wsdl:input> |
<wsdl:output> | <wsdl:output> |
<mime:content type="text/xml"/> | <mime:content type="image/jpeg"></mime:content> |
</wsdl:output> | </wsdl:output> |
</wsdl:operation> | </wsdl:operation> |
</wsdl:binding> | </wsdl:binding> |
</wsdl:definitions> | </wsdl:definitions> |
</code> | </code> |
<WRAP prewrap center> | <WRAP prewrap center> |
<code xml> | <code xml> |
<?xml version="1.0"?> | <fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods"> |
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" name="methodmap"> | <fmm:Method operationName="getJpgLD" wsdlMsgName="getRegionRequest" wsdlMsgOutput="response"> |
<fmm:Method operationName="dc2pico" wsdlMsgName="dc2picoRequestMsg" wsdlMsgOutput="response"> | <fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"></fmm:DefaultInputParm> |
<fmm:DatastreamInputParm parmName="DC" passBy="URL_REF" required="true"/> | <fmm:DefaultInputParm defaultValue="TIFF" label="content model" parmName="DSID" passBy="VALUE" required="true"></fmm:DefaultInputParm> |
<fmm:DatastreamInputParm parmName="XSL" passBy="URL_REF" required="true"/> | <fmm:DefaultInputParm defaultValue="info:lanl-repo/svc/getRegion" parmName="svc_id" passBy="VALUE" required="true"></fmm:DefaultInputParm> |
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/> | <fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="image/jpeg"></fmm:MethodReturnType> |
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="text/xml"/> | </fmm:Method> |
</fmm:Method> | |
</fmm:MethodMap> | </fmm:MethodMap> |
</code> | </code> |
</WRAP> | </WRAP> |
* XSL (see next paragraph) | |
| |
| |
===== XSLT for DC to PICO transformation ===== | |
XSL datastream contains xslt transformation: | |
<WRAP prewrap center> | |
<code xml> | |
<?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> | |
</code> | |
</WRAP> | |
===== Fedora Commons bookCModel ===== | ===== Fedora Commons bookCModel ===== |
Add the new service to RELS-EXT datastream: | Add the new service to RELS-EXT datastream: |