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

demo-objects.mets.local-server-demos.formatting-objects-demo.bmech-fop.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: Chris Wilper -->
<!-- Custodian: Cornell -->
<!---********************************************************************************************-->
<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:20" TYPE="FedoraBMechObject" LABEL="Behavior Mechanism Object implementing the PDF contract using the Fedora Local FOP 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:19" name="FOP Service">
						<fsvp:serviceDescription>FOP Service Implementing the PDF contract (input fo; outputs PDF)</fsvp:serviceDescription>
						<fsvp:serviceImplementation>
							<fsvp:serviceLiveTestURL>http://localhost:8080/fop/</fsvp:serviceLiveTestURL>
							<fsvp:serviceMessagingProtocol>HTTP GET</fsvp:serviceMessagingProtocol>
							<fsvp:serviceInputFormats>
								<fsvp:MIMEType>text/xml</fsvp:MIMEType>
							</fsvp:serviceInputFormats>
							<fsvp:serviceOutputFormats>
								<fsvp:MIMEType>application/pdf</fsvp:MIMEType>
							</fsvp:serviceOutputFormats>
							<fsvp:serviceImplDependencies>
								<fsvp:software license="Apache_Software_License" name="fop" opensource="true" type="Utility_Application" version="0.20.4"/>
								<fsvp:software license="Apache_Software_License" name="tomcat" opensource="true" type="Server_Application" version="4.1"/>
								<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.  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 Mapping to the Fedora Local FOP Service">
				<METS:xmlData>
					<fbs:DSInputSpec label="Mapping to the Fedora Local FOP Service" bDefPID="demo:19" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
						<fbs:DSInput wsdlMsgPartName="XML_SOURCE" DSMin="1" DSMax="1" DSOrdinality="false">
							<fbs:DSInputLabel>XML source file</fbs:DSInputLabel>
							<fbs:DSMIME>text/xml</fbs:DSMIME>
							<fbs:DSInputInstruction>XML source file to be transformed</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 - PDF BDEF Methods" bDefPID="demo:19" 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="getPDF" wsdlMsgName="getPDF" wsdlMsgOutput="response">
							<fmm:DatastreamInputParm parmName="XML_SOURCE" required="true" passBy="URL_REF"/>
							<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="application/pdf"/>
						</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 the Fedora Local FOP Service">
				<METS:xmlData>
					<!-- ******************************************************************************************************************************** -->
					<!-- SERVICE WSDL THAT IS NOT FEDORA-AWARE -->
					<!-- ******************************************************************************************************************************** -->
					<wsdl:definitions name="Fedora Local FOP Service" targetNamespace="fop" xmlns:this="fop" 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="fop">
								<xsd:simpleType name="URLType">
									<xsd:restriction base="xsd:string"/>
								</xsd:simpleType>
							</xsd:schema>
						</wsdl:types>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: MESSAGE DEFINITIONS -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:message name="getPDFRequest">
							<wsdl:part name="XML_SOURCE" type="this:URLType"/>
						</wsdl:message>
						<wsdl:message name="response">
							<wsdl:part name="pdf" type="xsd:base64Binary"/>
						</wsdl:message>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: ABSTRACT OPERATION  DEFINITIONS (Fedora Behavior Definitions) -->
						<!-- Here we define the operations the service implements -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:portType name="FedoraFOPPortType">
							<wsdl:operation name="getPDF">
								<wsdl:input message="this:getPDFRequest"/>
								<wsdl:output message="this:response"/>
							</wsdl:operation>
						</wsdl:portType>
						<!-- ******************************************************************************************************************** -->
						<!-- WSDL: THE SERVICE DEFINITION -->
						<!-- Here we define how to bind to operations to run the Service -->
						<!-- ******************************************************************************************************************** -->
						<wsdl:service name="FedoraFOP">
							<!-- THIS IS THE HTTP PORT -->
							<wsdl:port name="FedoraFOP_port" binding="this:FedoraFOP_http">
								<http:address location="http://localhost:8080/fop/"/>
							</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="FedoraFOP_http" type="this:FedoraFOPPortType">
							<http:binding verb="GET"/>
							<wsdl:operation name="getPDF">
								<http:operation location="FOPServlet?source=(XML_SOURCE)"/>
								<wsdl:input>
									<http:urlReplacement/>
								</wsdl:input>
								<wsdl:output>
									<mime:content type="application/pdf"/>
								</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://localhost:8080/fop/" 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