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

demo-objects.mets.local-server-demos.simple-image-demo.bmech-simple-image-4res.xml Maven / Gradle / Ivy

<?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 Fedora HTTP Image Getter service which returns images from a web server without  -->
<!-- performing any transformations on the images.  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:2" TYPE="FedoraBMechObject" LABEL="Behavior Mechanism Object implementing the UVA Simple Image BDEF contract using the Fedora HTTP Image Getter 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="Fedora HTTP Service">
						<fsvp:serviceDescription>Fedora internal HTTP resolver used to perform simple HTTP GET requests on jpeg images</fsvp:serviceDescription>
						<fsvp:serviceImplementation>
							<fsvp:serviceLiveTestURL>http:localhost:8080/fedora</fsvp:serviceLiveTestURL>
							<fsvp:serviceMessagingProtocol>HTTP GET</fsvp:serviceMessagingProtocol>
							<fsvp:serviceInputFormats>
								<fsvp:MIMEType>image/jpeg</fsvp:MIMEType>
							</fsvp:serviceInputFormats>
							<fsvp:serviceOutputFormats>
								<fsvp:MIMEType>image/jpeg</fsvp:MIMEType>
							</fsvp:serviceOutputFormats>
							<fsvp:serviceImplDependencies>
								<fsvp:software license="Mozilla_Public_License" name="fedora" opensource="true" type="Server_Application" version="1.2"/>
							</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.   -->
	<!-- ****************************************************************************************************************************************** -->
	<METS:amdSec ID="DSINPUTSPEC">
		<METS:techMD ID="DSINPUTSPEC1.0" STATUS="A">
			<METS:mdWrap MIMETYPE="text/xml" MDTYPE="OTHER" LABEL="Datastream Input Specification for Fedora HTTP Image Getter service">
				<METS:xmlData>
					<fbs:DSInputSpec label="Datastream Input Specification" bDefPID="demo:1" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
						<fbs:DSInput wsdlMsgPartName="THUMBRES_IMG" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>thumbnail image</fbs:DSInputLabel>
							<fbs:DSMIME>image/jpeg</fbs:DSMIME>
							<fbs:DSInputInstruction>image of type image/jpeg at 100 dpi</fbs:DSInputInstruction>
						</fbs:DSInput>
						<fbs:DSInput wsdlMsgPartName="MEDRES_IMG" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>medium resolution image</fbs:DSInputLabel>
							<fbs:DSMIME>image/jpeg</fbs:DSMIME>
							<fbs:DSInputInstruction>image of type image/jpeg at 300 dpi</fbs:DSInputInstruction>
						</fbs:DSInput>
						<fbs:DSInput wsdlMsgPartName="HIGHRES_IMG" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>high resolution image</fbs:DSInputLabel>
							<fbs:DSMIME>image/jpeg</fbs:DSMIME>
							<fbs:DSInputInstruction>image of type image/jpeg at 600 dpi</fbs:DSInputInstruction>
						</fbs:DSInput>
						<fbs:DSInput wsdlMsgPartName="VERYHIGHRES_IMG" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>very high resolution image</fbs:DSInputLabel>
							<fbs:DSMIME>image/jpeg</fbs:DSMIME>
							<fbs:DSInputInstruction>image of type image/jpeg at 1200 dpi</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 - Fedora HTTP Image Getter 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="image_response">
							<!-- NOTE: The parmName attribute correlates to WSDL message part name in terms of mapping to WSDL definitions -->
							<fmm:DatastreamInputParm parmName="THUMBRES_IMG" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="image_response" wsdlMsgTOMIME="image/jpeg"/>
						</fmm:Method>
						<fmm:Method operationName="getMedium" wsdlMsgName="getMedRequest" wsdlMsgOutput="image_response">
							<!-- NOTE: The parmName attribute correlates to WSDL message part name in terms of mapping to WSDL definitions -->
							<fmm:DatastreamInputParm parmName="MEDRES_IMG" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="image_response" wsdlMsgTOMIME="image/jpeg"/>
						</fmm:Method>
						<fmm:Method operationName="getHigh" wsdlMsgName="getHighRequest" wsdlMsgOutput="image_response">
							<!-- NOTE: The parmName attribute correlates to WSDL message part name in terms of mapping to WSDL definitions -->
							<fmm:DatastreamInputParm parmName="HIGHRES_IMG" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="image_response" wsdlMsgTOMIME="image/jpeg"/>
						</fmm:Method>
						<fmm:Method operationName="getVeryHigh" wsdlMsgName="getVeryHighRequest" wsdlMsgOutput="image_response">
							<!-- NOTE: The parmName attribute correlates to WSDL message part name in terms of mapping to WSDL definitions -->
							<fmm:DatastreamInputParm parmName="VERYHIGHRES_IMG" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="image_response" wsdlMsgTOMIME="image/jpeg"/>
						</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 Fedora HTTP Image Getter">
				<METS:xmlData>
					<!-- ******************************************************************************************************************************** -->
					<!-- PRE-EXISTING SERVICE WSDL THAT IS NOT FEDORA-AWARE -->
					<!-- ******************************************************************************************************************************** -->
					<wsdl:definitions name="Fedora HTTP Image Getter Service" targetNamespace="imgget" xmlns:this="imgget" 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="imgget">
								<xsd:simpleType name="imageURLType">
									<xsd:restriction base="xsd:string"/>
								</xsd:simpleType>
							</xsd:schema>
						</wsdl:types>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: MESSAGE DEFINITIONS -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:message name="getThumbRequest">
							<wsdl:part name="THUMBRES_IMG" type="this:imageURLType"/>
						</wsdl:message>
						<wsdl:message name="getMedRequest">
							<wsdl:part name="MEDRES_IMG" type="this:imageURLType"/>
						</wsdl:message>
						<wsdl:message name="getHighRequest">
							<wsdl:part name="HIGHRES_IMG" type="this:imageURLType"/>
						</wsdl:message>
						<wsdl:message name="getVeryHighRequest">
							<wsdl:part name="VERYHIGHRES_IMG" type="this:imageURLType"/>
						</wsdl:message>
						<wsdl:message name="image_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="GetImagePortType">
							<wsdl:operation name="getThumbnail">
								<wsdl:input message="this:getThumbRequest"/>
								<wsdl:output message="this:image_response"/>
							</wsdl:operation>
							<wsdl:operation name="getMedium">
								<wsdl:input message="this:getMedRequest"/>
								<wsdl:output message="this:image_response"/>
							</wsdl:operation>
							<wsdl:operation name="getHigh">
								<wsdl:input message="this:getHighRequest"/>
								<wsdl:output message="this:image_response"/>
							</wsdl:operation>
							<wsdl:operation name="getVeryHigh">
								<wsdl:input message="this:getVeryHighRequest"/>
								<wsdl:output message="this:image_response"/>
							</wsdl:operation>
						</wsdl:portType>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: THE SERVICE DEFINITION -->
						<!-- Here we define how to bind to operations to run the Service -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:service name="GetImage">
							<!-- THIS IS THE HTTP PORT -->
							<wsdl:port name="GetImage_port" binding="this:GetImage_http">
								<!-- NOTE on http:address:  this is not proper WSDL, but we are setting the http:address location to LOCAL -->
								<!-- to signify that the WSDL describes an internal Fedora service which has no public end-point. -->
								<!-- We are writing a Fedora extension to WSDL so we don't have to hack things like this. -->
								<http:address location="LOCAL"/>
							</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="GetImage_http" type="this:GetImagePortType">
							<http:binding verb="GET"/>
							<wsdl:operation name="getThumbnail">
								<!-- NOTE on http:operation:  this is not proper WSDL, but we are setting the http:operation location to -->
								<!-- the message part that, itself, is a URL.  This is done in conjunction with the setting of the http:address -->
								<!-- to LOCAL in the port definition.  This is done to signify that the WSDL describes an internal Fedora -->
								<!--service which has no public end-point. -->
								<!-- We are writing a Fedora extension to WSDL so we don't have to hack things like this. -->
								<http:operation location="(THUMBRES_IMG)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="image/jpg"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getMedium">
								<http:operation location="(MEDRES_IMG)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="image/jpg"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getHigh">
								<http:operation location="(HIGHRES_IMG)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="image/jpg"/>
								</wsdl:output>
							</wsdl:operation>
							<wsdl:operation name="getVeryHigh">
								<http:operation location="(VERYHIGHRES_IMG)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="image/jpg"/>
								</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/stdImage/doc/stdimage.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