1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Fedora Integration

From djatoka

Revision as of 18:31, 14 May 2009 by Rchute (Talk | contribs)
Jump to: navigation, search

Below is an outline of one possible Fedora/djatoka integration method. This is based on the existing service model used within Fedora (i.e., the saxon service, image dissemination service, etc). In short, the Fedora dissemination service constructs an OpenURL for djatoka using the URL ref and user input parameters (if necessary) and serves as the proxy agent for the response. Additionally, the

Contents

Models

Service Definition (sDef)

Identifier: info:fedora/djatoka:jp2SDef

The Service Definition interface defines the following methods:

  • getMetadata - Maps Fedora jp2SDef getMetadata method to djatoka OpenURL getMetadata request
  • getRegion - Maps Fedora jp2SDef getRegion method and user parameters to djatoka OpenURL getRegion request
  • getImageView - Maps Fedora jp2SDef getImageView method to a configured djatoka Viewer instance.
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject FEDORA_URI="info:fedora/djatoka:jp2SDef" PID="djatoka:jp2SDef" VERSION="1.1"
  xmlns:foxml="info:fedora/fedora-system:def/foxml#" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
  <foxml:objectProperties>
    <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="djatoka Service Definitions"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-04-22T19:58:18.896Z"/>
    <foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-04-24T14:42:13.553Z"/>
  </foxml:objectProperties>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDef/DC" ID="DC" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-04-24T14:42:13.553Z" ID="DC.0" LABEL="Dublin Core Metadata" MIMETYPE="text/xml" SIZE="410">
      <foxml:xmlContent>
        <oai_dc:dc 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="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
          <dc:title>djatoka Service Behavior Definition Object</dc:title>
          <dc:identifier>djatoka:jp2SDef</dc:identifier>
        </oai_dc:dc>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDef/RELS-EXT" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2008-12-28T22:07:10.169Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
      ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="364">
      <foxml:xmlContent>
        <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/djatoka:jp2SDef">
            <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
          </rdf:Description>
        </rdf:RDF>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDef/METHODMAP" ID="METHODMAP" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-04-24T14:41:39.564Z" ID="METHODMAP.0" LABEL="Method Map for djatoka Services"
      MIMETYPE="text/xml" SIZE="298">
      <foxml:xmlContent>
        <fmm:MethodMap name="Fedora MethodMap for djatoka Services" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
          <fmm:Method operationName="getRegion"/>
          <fmm:Method operationName="getMetadata"/>
          <fmm:Method operationName="getImageView"/>
        </fmm:MethodMap>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
</foxml:digitalObject>

Service Deployment (sDep)

The Service Deployment implementation provides the Fedora to djatoka service and parameter mappings.

  • Identifier: info:fedora/djatoka:jp2SDep
  • See getRegion for User Parameter options
  • The getImageView method mappings was inspired by the Fedora getImageView method used by The Embryo Project at ASU.
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject FEDORA_URI="info:fedora/djatoka:jp2SDep" PID="djatoka:jp2SDep" VERSION="1.1"
  xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
  <foxml:objectProperties>
    <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Service Deployment Object implementing the aDORe djatoka Services"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-04-22T19:58:30.911Z"/>
    <foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-04-24T14:51:51.851Z"/>
  </foxml:objectProperties>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDep/DC" ID="DC" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-05-12T17:09:42.609Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
      ID="DC1.0" LABEL="Dublin Core Record for this Object" MIMETYPE="text/xml" SIZE="427">
      <foxml:xmlContent>
        <oai_dc:dc 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="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
          <dc:title>Service Deployment Object implementing the djatoka Services</dc:title>
          <dc:identifier>djatoka:jp2SDep</dc:identifier>
        </oai_dc:dc>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDep/RELS-EXT" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2008-12-28T17:09:42.609Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
      ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="596">
      <foxml:xmlContent>
        <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/djatoka:jp2SDep">
            <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"/>
            <fedora-model:isDeploymentOf rdf:resource="info:fedora/djatoka:jp2SDef"/>
            <fedora-model:isContractorOf rdf:resource="info:fedora/djatoka:jp2CModel"/>
          </rdf:Description>
        </rdf:RDF>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDep/METHODMAP" ID="METHODMAP" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-04-24T14:51:01.424Z"
      FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.0" LABEL="Deployment Method Map"
      MIMETYPE="text/xml" SIZE="2002">
      <foxml:xmlContent>
        <fmm:MethodMap bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
          <fmm:Method operationName="getMetadata" wsdlMsgName="getMetadataRequest" wsdlMsgOutput="response">
            <fmm:DatastreamInputParm parmName="source" passBy="URL_REF" required="true"/>
            <fmm:DefaultInputParm defaultValue="info:lanl-repo/svc/getMetadata" parmName="svc_id" passBy="VALUE" required="true"/>
            <fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="application/json"/>
          </fmm:Method>
          <fmm:Method operationName="getRegion" wsdlMsgName="getRegionRequest" wsdlMsgOutput="response">
            <fmm:DatastreamInputParm parmName="source" passBy="URL_REF" required="true"/>
            <fmm:DefaultInputParm defaultValue="info:lanl-repo/svc/getRegion" parmName="svc_id" passBy="VALUE" required="true"/>
            <fmm:UserInputParm defaultValue="" parmName="region" passBy="VALUE" required="false"/>
            <fmm:UserInputParm defaultValue="0" parmName="rotate" passBy="VALUE" required="false"/>
            <fmm:UserInputParm defaultValue="-1" parmName="level" passBy="VALUE" required="false"/>
            <fmm:UserInputParm defaultValue="" parmName="scale" passBy="VALUE" required="false"/>
            <fmm:UserInputParm defaultValue="" parmName="clayers" passBy="VALUE" required="false"/>
            <fmm:UserInputParm defaultValue="image/jpeg" parmName="format" passBy="VALUE" required="false"/>
            <fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="image/jpeg"/>
          </fmm:Method>
          <fmm:Method operationName="getImageView" wsdlMsgName="getImageViewRequest" wsdlMsgOutput="response">
            <fmm:DatastreamInputParm parmName="source" passBy="URL_REF" required="true"/>
            <fmm:DefaultInputParm defaultValue="viewer.html" parmName="svc_id" passBy="VALUE" required="true"/>
            <fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="text/html"/>
          </fmm:Method>
        </fmm:MethodMap>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDep/DSINPUTSPEC" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-04-22T20:09:39.600Z"
      FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.0"
      LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="492">
      <foxml:xmlContent>
        <fbs:DSInputSpec label="Data profile mapping to the Fedora Local Djatoka Service" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
          <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="source">
            <fbs:DSInputLabel>JP2 source file</fbs:DSInputLabel>
            <fbs:DSMIME>image/jp2</fbs:DSMIME>
            <fbs:DSInputInstruction>JP2 source file to be transformed</fbs:DSInputInstruction>
          </fbs:DSInput>
        </fbs:DSInputSpec>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" FEDORA_URI="info:fedora/djatoka:jp2SDep/WSDL" ID="WSDL" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2009-04-24T14:51:51.851Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
      ID="WSDL.0" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="3545">
      <foxml:xmlContent>
        <wsdl:definitions name="Fedora Local Djatoka Service" targetNamespace="djatoka"
          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">
          <wsdl:types>
            <xsd:schema targetNamespace="djatoka">
              <xsd:simpleType name="URLType">
                <xsd:restriction base="xsd:string"/>
              </xsd:simpleType>
            </xsd:schema>
          </wsdl:types>
          <wsdl:message name="getMetadataRequest">
            <wsdl:part name="source" type="this:URLType"/>
            <wsdl:part name="svc_id" type="this:URLType"/>
          </wsdl:message>
          <wsdl:message name="getRegionRequest">
            <wsdl:part name="source" type="this:URLType"/>
            <wsdl:part name="svc_id" type="this:URLType"/>
          </wsdl:message>
          <wsdl:message name="getImageViewRequest">
            <wsdl:part name="source" type="this:URLType"/>
            <wsdl:part name="svc_id" type="this:URLType"/>
          </wsdl:message>
          <wsdl:message name="response">
            <wsdl:part name="exhibit" type="xsd:base64Binary"/>
          </wsdl:message>
          <wsdl:portType name="FedoraDjatokaPortType">
            <wsdl:operation name="getMetadata">
              <wsdl:input message="this:getMetadataRequest"/>
              <wsdl:output message="this:response"/>
            </wsdl:operation>
            <wsdl:operation name="getRegion">
              <wsdl:input message="this:getRegionRequest"/>
              <wsdl:output message="this:response"/>
            </wsdl:operation>
            <wsdl:operation name="getImageView">
              <wsdl:input message="this:getImageViewRequest"/>
              <wsdl:output message="this:response"/>
            </wsdl:operation>
          </wsdl:portType>
          <wsdl:service name="FedoraDjatoka">
            <wsdl:port binding="this:FedoraDjatoka_http" name="FedoraDjatoka_port">
              <http:address location="http://localhost:8080/adore-djatoka/"/>
            </wsdl:port>
          </wsdl:service>
          <wsdl:binding name="FedoraDjatoka_http" type="this:FedoraDjatokaPortType">
            <http:binding verb="GET"/>
            <wsdl:operation name="getMetadata">
              <http:operation location="resolver?url_ver=Z39.88-2004&rft_id=(source)&svc_id=(svc_id)"/>
              <wsdl:input>
                <http:urlReplacement/>
              </wsdl:input>
              <wsdl:output>
                <mime:content type="application/json"/>
              </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="getRegion">
              <http:operation location="resolver?url_ver=Z39.88-2004&rft_id=(source)&svc_id=(svc_id)&svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&svc.format=(format)&svc.level=(level)&svc.rotate=(rotate)&svc.region=(region)&svc.scale=(scale)&svc.clayers=(clayers)"/>
              <wsdl:input>
                <http:urlReplacement/>
              </wsdl:input>
              <wsdl:output>
                <mime:content type="image/jpeg"/>
              </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="getImageView">
              <http:operation location="viewer.html"/>
              <wsdl:input>
                <http:urlReplacement/>
              </wsdl:input>
              <wsdl:output>
                <mime:content type="text/html"/>
              </wsdl:output>
            </wsdl:operation>
          </wsdl:binding>
        </wsdl:definitions>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
</foxml:digitalObject>

Content Model

The Content Model defines the mapping to info:fedora/djatoka:jp2SDef.

  • Identifier: djatoka:jp2CModeldjatoka:jp2CModel
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="djatoka:jp2CModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
  <foxml:objectProperties>
    <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="CModel Definition for Image Transform"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-04-22T19:58:45.404Z"/>
    <foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-04-22T20:40:30.677Z"/>
  </foxml:objectProperties>
  <foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2008-12-28T22:07:10.169Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
      ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="442">
      <foxml:xmlContent>
        <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/djatoka:jp2CModel">
            <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
            <fedora-model:hasService rdf:resource="info:fedora/djatoka:jp2SDef"/>
          </rdf:Description>
        </rdf:RDF>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" ID="DS-COMPOSITE-MODEL" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2008-12-28T22:07:10.169Z"
      FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" ID="DS-COMPOSITE-MODEL1.0"
      LABEL="Datastream Composite Model" MIMETYPE="text/xml" SIZE="148">
      <foxml:xmlContent>
        <dsCompositeModel>
          <dsTypeModel ID="source" ORDERED="false">
            <form MIME="image/jp2"/>
          </dsTypeModel>
        </dsCompositeModel>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
  <foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
    <foxml:datastreamVersion CREATED="2008-12-28T21:14:41.147Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
      ID="DC1.0" LABEL="Dublin Core Record for CModel" MIMETYPE="text/xml" SIZE="410">
      <foxml:xmlContent>
        <oai_dc:dc 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="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
          <dc:title>CModel Definition for Document Transform</dc:title>
          <dc:identifier>djatoka:jp2CModel</dc:identifier>
        </oai_dc:dc>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>
</foxml:digitalObject>

Examples

getMetadata

{
"identifier": "http://localhost:8080/fedora/get/djatoka:3000/source/2009-04-22T21:04:53.518Z",
"imagefile": "/opt/fedora/tomcat/temp/cache6040946499961.jp2",
"width": "8033",
"height": "10915",
"dwtLevels": "7",
"levels": "7",
"compositingLayerCount": "1"
}

getRegion

getImageView

Questions

  • What alternate implementations are possible?
  • Does this suite most use cases?
  • What are your use cases?
Personal tools