All Downloads are FREE. Search and download functionalities are using the official Maven repository.

demo-objects.mets.open-server-demos.simple-image-demos.bmech-simple-image-mrsid.xml Maven / Gradle / Ivy

Go to download

The Fedora Client is a Java Library that allows API access to a Fedora Repository. The client is typically one part of a full Fedora installation.

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!---********************************************************************************************-->
<!-- SAMPLE FEDORA BEHAVIOR MECHANISM OBJECT ENCODED USING METS -->
<!-- Creator: Sandy Payette -->
<!-- Custodian: University of Virginia Library -->
<!-- Note: Demonstration Behavior Mechanism Object.  This Behavior Mechanism Object defines service -->
<!-- metadata for the UVA MrSID service which takes a wavelet encoded image file as input, and returns a -->
<!-- JPEG image of a specified resolution.  This Behavior Mechanism Object is a surrogate for a service that -->
<!-- fulfills the behavior contract defined in the UVA Simple Image Behavior Definition Object (see the Fedora -->
<!-- object with PID=demo:1) -->
<!---********************************************************************************************-->
<METS:mets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:METS="http://www.loc.gov/METS/" xmlns:fedoraAudit="http://fedora.comm.nsdlib.org/audit" xmlns:uvalibdesc="http://dl.lib.virginia.edu/bin/dtd/descmeta/descmeta.dtd" xmlns:uvalibadmin="http://dl.lib.virginia.edu/bin/admin/admin.dtd" xmlns:xlink="http://www.w3.org/TR/xlink" xsi:schemaLocation="http://www.loc.gov/standards/METS/ http://www.fedora.info/definitions/1/0/mets-fedora-ext.xsd" OBJID="demo:4" TYPE="FedoraBMechObject" LABEL="Behavior Mechanism Object implementing the UVA Simple Image BDEF contract using the UVA MrSID Service." PROFILE="fedora:BMECH">
<METS:metsHdr>
<METS:agent ROLE="IPOWNER">
	<METS:name>fedoraAdmin</METS:name>
</METS:agent>
</METS:metsHdr>
	<!---*******************************************************************************************************************************************-->
	<!--  INLINE METADATA DATASTREAMS FOR THIS BEHAVIOR MECHANISM OBJECT: -->
	<!---*******************************************************************************************************************************************-->
	<!---********************************************************************************************-->
	<!-- SERVICE PROFILE: -->
	<!-- This is a Fedora metadata format for describing an external service. The intent is to have some basic "preservation-significant"  -->
	<!-- metadata that can be helpful in diagnosing potential vulnerabilities with the service over time. -->
	<!-- NOTE!! The Fedora Service Profile Schema is still a work in progress!!  This is a preliminary metadata format which requires more analysis.-->
	<!--********************************************************************************************-->
	<METS:amdSec ID="SERVICE-PROFILE">
		<METS:techMD ID="SERVICE-PROFILE1.0" STATUS="A">
			<METS:mdWrap LABEL="Service Profile - Technical description of the service" MDTYPE="OTHER" MIMETYPE="text/xml">
				<METS:xmlData>
					<fsvp:serviceProfile xmlns:fsvp="http://fedora.comm.nsdlib.org/service/profile" bDefPID="demo:1" name="MrSID Service">
						<fsvp:serviceDescription>MrSID service for providing different image resolutions from a wavelet encoded file.  The cgi portion of this service interacts with the MrSID image server software which returns image formats.  The cgi layer can return the image or return it wrapped in a java applet on a html page.</fsvp:serviceDescription>
						<fsvp:serviceImplementation>
							<fsvp:serviceLiveTestURL>http://iris.lib.virginia.edu/mrsid</fsvp:serviceLiveTestURL>
							<fsvp:serviceMessagingProtocol>HTTP GET</fsvp:serviceMessagingProtocol>
							<fsvp:serviceInputFormats>
								<fsvp:MIMEType>image/x-mrsid-image</fsvp:MIMEType>
							</fsvp:serviceInputFormats>
							<fsvp:serviceOutputFormats>
								<fsvp:MIMEType>text/html</fsvp:MIMEType>
								<fsvp:MIMEType>image/gif</fsvp:MIMEType>
								<fsvp:MIMEType>image/jpeg</fsvp:MIMEType>
								<fsvp:MIMEType>application/java</fsvp:MIMEType>
							</fsvp:serviceOutputFormats>
							<fsvp:serviceImplDependencies>
								<fsvp:software license="GNU_GPL" name="perl" opensource="true" type="Programming_Language" version="5.x"/>
								<fsvp:software license="Commercial" name="MrSID Image Server" opensource="false" type="Server_Application" version="2.2"/>
								<fsvp:software license="Apache_Software_License" name="Apache Web Server" opensource="true" type="Server_Application" version="x.x"/>
							</fsvp:serviceImplDependencies>
						</fsvp:serviceImplementation>
					</fsvp:serviceProfile>
				</METS:xmlData>
			</METS:mdWrap>
		</METS:techMD>
	</METS:amdSec>
	<!---*******************************************************************************************************************************************-->
	<!-- SERVICE DATASTREAM INPUT SPECIFICATION: -->
	<!-- THIS IS  METADATA DESCRIBING A DATASTREAM CONTRACT BETWEEN A FEDORA DATA OBJECT and the SERVICE. -->
	<!-- This specifies the what kind of Datastream(s) must be in a Fedora Data Object to serve as runtime input to the external service -->
	<!-- represented by this Behavior Mechanism Object.  In this example, we see that a single MrSID image file must be -->
	<!-- present as a Datastream  in a Fedora Data Object to enable that object to play nicely with the MrSID service.  -->
	<!-- That Datastream will serve as an input to one for more MrSID service operations. -->
	<!-- ****************************************************************************************************************************************** -->
	<METS:amdSec ID="DSINPUTSPEC">
		<METS:techMD ID="DSINPUTSPEC1.0" STATUS="A">
			<METS:mdWrap MIMETYPE="text/xml" MDTYPE="OTHER" LABEL="Datastream Input Specification for UVA MrSID service">
				<METS:xmlData>
					<fbs:DSInputSpec label="UVA MrSID Service Datastream Input Specification" bDefPID="demo:1" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
						<fbs:DSInput wsdlMsgPartName="MRSID" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>MrSid file</fbs:DSInputLabel>
							<fbs:DSMIME>image/x-mrsid-image</fbs:DSMIME>
							<fbs:DSInputInstruction>MrSid wavelet encoded image file</fbs:DSInputInstruction>
						</fbs:DSInput>
					</fbs:DSInputSpec>
				</METS:xmlData>
			</METS:mdWrap>
		</METS:techMD>
	</METS:amdSec>
	<!---*******************************************************************************************************************************************-->
	<!-- FEDORA-TO-WSDL METHOD MAP: -->
	<!-- THIS IS  METADATA DESCRIBING HOW THE SERVICE WSDL MAPS TO FEDORA METHOD DEFINITIONS -->
	<!-- This is how we make a service definition expressed in WSDL play nicely with Fedora. -->
	<!-- ****************************************************************************************************************************************** -->
	<METS:amdSec ID="METHODMAP">
		<METS:techMD ID="METHODMAP1.0" STATUS="A">
			<METS:mdWrap MIMETYPE="text/xml" MDTYPE="OTHER" LABEL="Mapping of WSDL to Fedora notion of Method Definitions">
				<METS:xmlData>
					<fmm:MethodMap name="MethodMap - MrSID BMech for UVA Simple Image BDEF" bDefPID="demo:1" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
						<!-- NOTE: The operationName attribute correlates to WSDL operation in terms of mapping to WSDL definitions -->
						<fmm:Method operationName="getThumbnail" wsdlMsgName="getThumbRequest" wsdlMsgOutput="mrsid_response">
							<fmm:DefaultInputParm parmName="THUMBRES_SIZE" required="true" defaultValue="thumbnail" passBy="VALUE"/>
							<fmm:DatastreamInputParm parmName="MRSID" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="mrsid_response" wsdlMsgTOMIME="image/gif"/>
						</fmm:Method>
						<fmm:Method operationName="getMedium" wsdlMsgName="getMedRequest" wsdlMsgOutput="mrsid_response">
							<fmm:DefaultInputParm parmName="ZOOM" required="true" defaultValue="no" passBy="VALUE"/>
							<fmm:DefaultInputParm parmName="MEDRES_SIZE" required="true" defaultValue="small" passBy="VALUE"/>
							<fmm:DatastreamInputParm parmName="MRSID" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="mrsid_response" wsdlMsgTOMIME="application/java image/gif"/>
						</fmm:Method>
						<fmm:Method operationName="getHigh" wsdlMsgName="getHighRequest" wsdlMsgOutput="mrsid_response">
							<fmm:DefaultInputParm parmName="ZOOM" required="true" defaultValue="no" passBy="VALUE"/>
							<fmm:DefaultInputParm parmName="HIGHRES_SIZE" required="true" defaultValue="medium1" passBy="VALUE"/>
							<fmm:DatastreamInputParm parmName="MRSID" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="mrsid_response" wsdlMsgTOMIME="application/java image/gif"/>
						</fmm:Method>
						<fmm:Method operationName="getVeryHigh" wsdlMsgName="getVeryHighRequest" wsdlMsgOutput="mrsid_response">
							<fmm:DefaultInputParm parmName="ZOOM" required="true" defaultValue="no" passBy="VALUE"/>
							<fmm:DefaultInputParm parmName="VERYHIGHRES_SIZE" required="true" defaultValue="medium2" passBy="VALUE"/>
							<fmm:DatastreamInputParm parmName="MRSID" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="mrsid_response" wsdlMsgTOMIME="application/java image/gif"/>
						</fmm:Method>
					</fmm:MethodMap>
				</METS:xmlData>
			</METS:mdWrap>
		</METS:techMD>
	</METS:amdSec>
	<!-- ****************************************************************************************************************************************** -->
	<!--  WSDL SERVICE DEFINITION -->
	<!--  Here we store WSDL as a form of metadata about the external service that is represented by this  -->
	<!--  Fedora Behavior Definition Object. -->
	<!-- ****************************************************************************************************************************************** -->
	<METS:amdSec ID="WSDL">
		<METS:techMD ID="WSDL1.0" STATUS="A">
			<METS:mdWrap MIMETYPE="text/xml" MDTYPE="OTHER" LABEL="WSDL definition for UVA MrSid service">
				<METS:xmlData>
					<!-- ******************************************************************************************************************************** -->
					<!-- SERVICE WSDL THAT IS NOT FEDORA-AWARE -->
					<!-- ******************************************************************************************************************************** -->
					<wsdl:definitions name="UVA MrSID Service" targetNamespace="mrsid" xmlns:this="mrsid" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: Schema Type Definitions used in this WSDL -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:types>
							<xsd:schema targetNamespace="mrsid">
								<xsd:simpleType name="MRSIDType">
									<xsd:restriction base="xsd:string"/>
								</xsd:simpleType>
								<xsd:simpleType name="ZOOMType">
									<xsd:restriction base="xsd:string"/>
								</xsd:simpleType>
								<xsd:simpleType name="THUMBRES_SIZEType">
									<xsd:restriction base="xsd:string">
										<xsd:enumeration value="thumbnail"/>
									</xsd:restriction>
								</xsd:simpleType>
								<xsd:simpleType name="MEDRES_SIZEType">
									<xsd:restriction base="xsd:string">
										<xsd:enumeration value="small"/>
									</xsd:restriction>
								</xsd:simpleType>
								<xsd:simpleType name="HIGHRES_SIZEType">
									<xsd:restriction base="xsd:string">
										<xsd:enumeration value="medium1"/>
									</xsd:restriction>
								</xsd:simpleType>
								<xsd:simpleType name="VERYHIGHRES_SIZEType">
									<xsd:restriction base="xsd:string">
										<xsd:enumeration value="medium2"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:schema>
						</wsdl:types>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: MESSAGE DEFINITIONS -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:message name="getThumbRequest">
							<wsdl:part name="MRSID" type="this:MRSIDType"/>
							<wsdl:part name="THUMBRES_SIZE" type="this:THUMBRES_SIZEType"/>
						</wsdl:message>
						<wsdl:message name="getMedRequest">
							<wsdl:part name="MRSID" type="this:MRSIDType"/>
							<wsdl:part name="MEDRES_SIZE" type="this:MEDRES_SIZEType"/>
							<wsdl:part name="ZOOM" type="this:ZOOMType"/>
						</wsdl:message>
						<wsdl:message name="getHighRequest">
							<wsdl:part name="MRSID" type="this:MRSIDType"/>
							<wsdl:part name="HIGHRES_SIZE" type="this:HIGHRES_SIZEType"/>
							<wsdl:part name="ZOOM" type="this:ZOOMType"/>
						</wsdl:message>
						<wsdl:message name="getVeryHighRequest">
							<wsdl:part name="MRSID" type="this:MRSIDType"/>
							<wsdl:part name="VERYHIGHRES_SIZE" type="this:VERYHIGHRES_SIZEType"/>
							<wsdl:part name="ZOOM" type="this:ZOOMType"/>
						</wsdl:message>
						<wsdl:message name="mrsid_response">
							<wsdl:part name="image" type="xsd:base64Binary"/>
						</wsdl:message>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: ABSTRACT OPERATION  DEFINITIONS (Fedora Behavior Definitions) -->
						<!-- Here we define the operations the service implements -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:portType name="MrSIDPortType">
							<wsdl:operation name="getThumbnail">
								<wsdl:input message="this:getThumbRequest"/>
								<wsdl:output message="this:mrsid_response"/>
							</wsdl:operation>
							<wsdl:operation name="getMedium">
								<wsdl:input message="this:getMedRequest"/>
								<wsdl:output message="this:mrsid_response"/>
							</wsdl:operation>
							<wsdl:operation name="getHigh">
								<wsdl:input message="this:getHighRequest"/>
								<wsdl:output message="this:mrsid_response"/>
							</wsdl:operation>
							<wsdl:operation name="getVeryHigh">
								<wsdl:input message="this:getVeryHighRequest"/>
								<wsdl:output message="this:mrsid_response"/>
							</wsdl:operation>
						</wsdl:portType>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: THE SERVICE DEFINITION -->
						<!-- Here we define how to bind to operations to run the Service -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:service name="MrSID">
							<!-- THIS IS THE HTTP PORT -->
							<wsdl:port name="MrSID_port" binding="this:MrSID_http">
								<http:address location="http://iris.lib.virginia.edu/mrsid/bin/"/>
							</wsdl:port>
						</wsdl:service>
						<!-- ******************************************************************************************************************** -->
						<!-- The HTTP Bindings for Service: -->
						<!-- NOTE: the http:operation location attribute is subject to a URL replacement algorithm.  -->
						<!-- See the W3C Specification for WSDL Bindings at: http://www.w3.org/TR/2002/WD-wsdl12-bindings-20020709 -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:binding name="MrSID_http" type="this:MrSIDPortType">
							<http:binding verb="GET"/>
							<wsdl:operation name="getThumbnail">
								<http:operation location="get_mrsid_url.pl?image=(MRSID)&amp;size=(THUMBRES_SIZE)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="image/gif"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getMedium">
								<http:operation location="get_mrsid_url.pl?image=(MRSID)&amp;size=(MEDRES_SIZE)&amp;zoom=(ZOOM)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="application/java"/>
									<mime:content type="image/jpeg"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getHigh">
								<http:operation location="get_mrsid_url.pl?image=(MRSID)&amp;size=(HIGHRES_SIZE)&amp;zoom=(ZOOM)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="application/java"/>
									<mime:content type="image/jpeg"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getVeryHigh">
								<http:operation location="get_mrsid_url.pl?image=(MRSID)&amp;size=(VERYHIGHRES_SIZE)&amp;zoom=(ZOOM)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="application/java"/>
									<mime:content type="image/jpeg"/>
								</wsdl:output>
							</wsdl:operation>
						</wsdl:binding>
					</wsdl:definitions>
				</METS:xmlData>
			</METS:mdWrap>
		</METS:techMD>
	</METS:amdSec>
	<!---*******************************************************************************************************************************************-->
	<!--- OTHER DATASTREAMS FOR THIS BEHAVIOR MECHANISM OBJECT -->
	<!--  This is content that is relevant to describing the external service that this Behavior Mechanism Object represents. -->
	<!--  These can be schema definitions, debugging tools, documentation, or other resources.  -->
	<!-- ******************************************************************************************************************** -->
	<METS:fileSec>
		<METS:fileGrp ID="DATASTREAMS">
			<METS:fileGrp ID="DS1" STATUS="A">
				<METS:file ID="DS1.0" SEQ="1" MIMETYPE="text/html" OWNERID="E" STATUS="A">
					<METS:FLocat LOCTYPE="URL" xlink:href=" http://uva.lib.edu/mech/mrsid/doc/mrsid.html" xlink:title="Programmer documentation"/>
				</METS:file>
			</METS:fileGrp>
		</METS:fileGrp>
	</METS:fileSec>
	<!---*******************************************************************************************************************************************-->
	<!--  DATASTREAM BINDING MAP FOR FOR THIS BEHAVIOR MECHANISM OBJECT-->
	<!-- Since THIS Behavior Mechanism Object is, itself, a Fedora Digital Object, we can disseminate its contents. -->
	<!-- The Fedora system provides a bootstrap service (built-in to the repository system) that will enable the -->
	<!-- dissemination of content from a Behavior Mechanism Objects.  What follows is the Datastream Binding Map for that -->
	<!-- is used by the bootstrap service.  -->
	<!-- ******************************************************************************************************************** -->
	<METS:structMap ID="S1" TYPE="fedora:dsBindingMap">
		<METS:div TYPE="fedora-system:2" LABEL="Datastream Binding Map for Fedora Bootstrap Mechanism">
			<METS:div TYPE="SERVICE-PROFILE" LABEL="Service profile metadata">
				<METS:fptr FILEID="SERVICE-PROFILE"/>
			</METS:div>
			<METS:div TYPE="FEDORA-TO-WSDL-DSINPUTSPEC" LABEL="XML data that serves describes the requirements for Datastreams that will be used as input to the service">
				<METS:fptr FILEID="DSINPUTSPEC"/>
			</METS:div>
			<METS:div TYPE="FEDORA-TO-WSDL-METHODMAP" LABEL="XML data that enables FEDORA to understand how to use the service WSDL">
				<METS:fptr FILEID="METHODMAP"/>
			</METS:div>
			<METS:div TYPE="WSDL" LABEL="Service definitions in WSDL format">
				<METS:fptr FILEID="WSDL"/>
			</METS:div>
			<METS:div TYPE="PROGGUIDE" LABEL="The Programmer's user guide for using the service">
				<METS:fptr FILEID="DS1"/>
			</METS:div>
		</METS:div>
	</METS:structMap>
	<!---*******************************************************************************************************************************************-->
	<!--- BOOTSTRAP  DISSEMINATOR FOR THIS BEHAVIOR MECHANISM OBJECT: -->
	<!--  This is a disseminator for THIS Behavior Definition Object that lets a client be able to treat it like any other Fedora Object.  -->
	<!--  Thus, clients can disseminate all this great metadata about the external service that is represented by this -->
	<!--  Behavior Mechanism Object. -->
	<!---*******************************************************************************************************************************************-->
	<!--- The Disseminator subscribes to the Fedora Bootstrap Behavior Definition.  It uses the Fedora Bootstrap Behavior -->
	<!--   Mechanism to run the behaviors. -->
	<!--  The Bootstrap behaviors enable a client to get disseminations of the contents of this Behavior Mechanism Object.   -->
	<!---*******************************************************************************************************************************************-->
	<METS:behaviorSec ID="DISS1" STATUS="A">
		<METS:serviceBinding ID="DISS1.0" STRUCTID="S1" BTYPE="fedora-system:1" LABEL="Bootstrap Behaviors">
			<METS:interfaceMD LABEL="Bootstrap Behavior Definition" LOCTYPE="URN" xlink:href="fedora-system:1"/>
			<METS:serviceBindMD LABEL="Bootstrap Behavior Mechanism" LOCTYPE="URN" xlink:href="fedora-system:2"/>
		</METS:serviceBinding>
	</METS:behaviorSec>
</METS:mets>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy