Home
MDE Developer`s Guide
Contents
1. elements 6 gt parts xsi type mss XMLElementLayout element Gelements 7 Metadata Creation Package Developer Guide Page 21 of 28 lt parts xsi type mss XMLElementLayout element elements 8 gt lt parts xsi type mss XMLElementLayout element elements 9 gt lt parts xsi type mss XMLElementLayout element elements 10 gt lt parts xsi type mss XMLElementLayout element elements 11 xmlTypeName dcterms W3CDTF gt parts xsi type mss XMLElementLayout element elements 12 gt parts xsi type mss XMLElementLayout xmlName element elements 13 gt parts xsi type mss XMLElementLayout element Gelements 14 parts xsi type mss XMLElementLayout element Gelements 15 parts xsi type mss XMLElementLayout xmlName element elements 16 gt layout lt profiles gt lt mss MetadataSchema gt Metadata Creation Package Developer Guide Page 22 of 28 Appendix D Sample SPI Implementation F dad Demonstrates how an Archer Application might implement the metadata record persistance wrapper over their repository so that the Archer metadata Editor can load and persist records author xchernich alabri Ey public class SimpleMDStoreImpl implements MetadataStoreProvider private static final SimpleMDStorelmpl m instance new SimpleMDStoreImpl private static final Hashtable String Document
2. MSS uses an XML based concrete syntax Unlike XSL MSS is defined in terms of a meta model In fact the meta modelling framework we are using EMF can generate the vast majority of the code needed for model editing and XML serialization code for free To simplify the task of creating MSS schemas the Metadata Schema Facility includes an Metadata Schema Editor MSE MSE s functionality includes e display and editing of metadata schemas e validation of metadata schemas to pick up obvious inconsistencies e creation of shared type definitions for reuse across multiple schemas e generation of flattened metadata schemas for use by MCP e generation of equivalent XSL schemas and e export of schema files to a Metadata Schema Repository MDSR instance The output from the MSF consists of metadata schemas represented as text files in MSS and XSD format These can either be uploaded to a shared schema repository e g MDSR or embedded into the MCP as described later MSE is implemented in Java as a set of plug ins that run within the Eclipse RCP framework This means that MSE must installed as a desktop application The instructions for doing this are included in the MSF README file 5 4 The Metadata Schema Repository The second part of the MMF is the Metadata Schema Repository MDSR While it is possible as explained later to configure MDE with hard wired metadata schemas it is better to fetch schemas from a s
3. m store new Hashtable lt String Document gt private static int m nextKey 1000 grx Provider is implemented as a Singleton that keeps all metadata in a static hash table keyed by record ID without the application unique string return The Instance wd public static final SimpleMDStoreImpl getInstance return m_instance QE non Javadoc see au edu archer spi MetadataStoreProvider bind org w3c dom Document it public String bind Document metarecord throws MetadataProviderException String key null synchronized m store key new Integer m_nextKey toString m store put key metarecord return key F oa non Javadoc see au edu archer spi MetadataStoreProvider rebind org w3c dom Document java lang String ia public void rebind Document metarecord String key throws MetadataProviderException if key null amp amp m store containsKey key synchronized m store m store put key metarecord H Y dax non Javadoc see au edu archer spi MetadataStoreProvider lookup java lang String i4 public Document lookup String key throws MetadataProviderException t if m store containsKey key throw new MetadataProviderException Key not found key Metadata Creation Package Developer Guide Page 23 of 28 return m store get key fee non Javadoc see au edu archer spi Me
4. MDE implementation WAR file is assembled archer client metaservice jar Used in development environments to resolve the SPI references This jar need not and should not be included in the application WAR file as the classes are globally available from the web server common 1lib loader archer client metaservice jar This archive must be copied to the web server common lib directory and an entry made for JNDI as detailed in this guide org json jar This archive must be copied to the web server common lib directory org eclipse jar These archives must be copied to the web server common lib directory au edu archer metadata msf mss jar These archives must be copied to the web server common lib directory Table 2 This section assumes that the web services container used is Apache Tomcat 2 2 Deployment The deployment process requires the following steps 1 Deploy the common archives JAR files 2 Configure the Record Broker in the JNDI 3 Deploy and name the MDE servlet WAR file Metadata Creation Package Developer Guide Page 3 of 28 4 Configure the names selected for the Record Broker and MCP servlet in applications that will use them 2 2 1 JAR Distribution The Java Archive JAR file containing the Record Broker and associated classes must be made globally available by copying it to the CATALINA HOME common 1lib location The associated SPI library archer client metaservice jar may be distr
5. ARCHER Developer Guide METADATA CREATION PACKAGE Version 1 1 Date 2008 08 22 Status Release Change History Description 2008 01 29 Abdul Alabri 2008 01 30 Ron Chernich Format and Introduction 2008 04 23 Ron Chernich Update screen shots add logging section 1 0D 2008 04 30 Steve Crawley Rewrote chapter on schemas add section on record reqs etc 2008 05 01 Steve Crawley MDE 1 0 Release 2008 08 22 Ron Chernich Revise for 1 1 release sq SS a jn oe c f Metadata Creation Package Developer Guide Page ii of 28 Table of Contents 1 5 terms apd ADbreul aa es o SR PERO PM aM MM EE 1 16 ReGen EE IRR 2 FRAN ES IG EV RUTRUM 2 Ee REMI tc AA TES 3 FARBE MOCI O i oct EEE SE EEE e 3 FA NECS ERES 3 Zub d JAR EU SUIDUTIDEL a ated asad das tasa teat lea bclla dude bb beet ei ius adis 4 Zu INDI CODIR a O iioii e uda aa uda GU CUR ua esi aoa 4 2 2 3 Servlet Configuration and Deploymoent tne 4 2 2 4 AUD UD OOO uie ha attianinabeataatlaan aed avaatd atl a UaDe ei 5 23 Dependencies and Environment ua ia eub do o D GL Dub S uA 5 2 RE PUT NE ITE NT 6 Tda eL I E C IB IU te aches 6 ENEEEEHI NIS ts sie tp Pace Ase ia oni are ae aap dade Nate Ate halo tare lay Aa adara i else at ade deta Z ES ON MU S DO TETTE 8 lg OPEC Oe BIO dns ice heec be AA ias Spr cese da ER 8 3 2 5 XSD Schema CONTOINANCE 6 caisse cct ei gati ita ste Lad zai d eit i a aa a
6. Lbs 8 CN EE SOLID He EEN ERE TE 8 CERRO OSES di e TERR 9 BD EPI REI I I TAE E A E 9 4 The Service Provider Interface uus oaa sarai rao brabeckrbRrRrtkx AREA Er AE Vidua 11 CN ME RII 11 LIC M use aU UTI TERRENT 12 5 Schema Preparation and Configuration es 13 TA TORU O ee Tene Tee eer ree eee ee een reer reer ern 13 Fi MM Palit ac Oe ERREUR 13 iA ed Hea Ms sis dik iad bs Seis ale des ose EE sia dae aiedss T E E ca E E 14 5 9 AOU rue MDE TO USE A0 MDSR uode od deae ote ui Uo oiu dui ibo 15 5 6 Creating and Configuring a flat file Schema Repository eee 16 Appendix C Sample MSS SCDODntdtaucunssuece coepit trux p REAL Rx XRpA A iis 20 Appendix D Sample SPI Implementation enn 23 Metadata Creation Package Developer Guide Page iii of 28 Introduction 1 1 Purpose of Document The Metadata Editor MDE has been designed as an application neutral facility for the creation and editing of arbitrary name value pair based metadata that is based on specific metadata schemas This document describes the actions a software developer must undertake in order to incorporating the Metadata Editor into an Application 1 2 Scope The audience for this document is Software Developers and Integration Specialists who require understanding of the detailed procedures for the use of the MDE as a black box service Operational details of the editor are not included refer to the Us
7. ata Creation Package Developer Guide Page 8 of 28 lt a href mde mde jsp record 123 amp next myapp next jsp amp cancel myapp cancel jsp gt Edit Metadata lt a gt Figure 3 3 4 CGI Parameters The CGI parameters that are required to launch the editor are listed in Table 3 Applications that link the Metadata Editor should be tested to ensure that they supply valid values for these parameters before launching the Metadata Editor Obligation Description ca d optional To set the debug level d t EUN The identifier of a record to be edited Passed to the user written MetadataStoreProvider implementation to load and save records template T optional Document identifier recognized by the MetadataStoreProvider implementation as a template to create a new record blank or partially composed REN Rp Editor window page title window page title eae forwarding URL when user closes the editor optional The forwarding URL on user initiated cancel anl optional If true then the document cannot be edited or saved Disables field editing Save Add Element and Remove Element actions Table 3 1 Mutually exclusive 3 5 Logging For convenience the MDE maintains its own logging using the Tomcat version of the JDK logging package The logging properties are specified in the logging properties file packaged in the top level of the deployed MDE war file The usual configurable item
8. cord must also have a well formed xsi schemaLocation attribute A schema location attribute defines a list of pairs that map namespace URIs to schema location URIs In addition to Metadata Creation Package Developer Guide Page 7 of 28 being well formed MDE requires that the list includes a mapping for the XML document s default namespace 3 2 4 Known Schema The previous requirements allow MDE to go from a record s default namespace to a schema location URI In addition the schema location URI must match an MSS metadata schema that is available to MDE using the following algorithm 1 The URI is parsed into its components and everything apart from the path component is ignored The directory path is removed leaving just the local name If the local name has the suffix xsd that is removed What remains is used as the schema key The MDE then attempts to lookup the MSS form of the schema using that key 3 2 5 Correct Root Element The MSS schema specifies many things that a valid metadata record needs to conform to However one particular property must be satisfied before MDE can start to validate a record The MSS schema includes a component called the XML Schema Profile which specifies how metadata elements are mapped to XML elements This profile specifies an XML namespace URI and a root element for the metadata record If the actual record does not contain exactly one XML element whose namespace and name co
9. cription gt The exposure time to the beam in seconds lt description gt lt label gt Exposure Time lt label gt lt type xsi type mss DecimalType gt lt elements gt elements name detectorName maxOccurrences 1 gt lt description gt The make model or name of the detector device used lt description gt lt label gt Detector Name lt label gt lt type xsi type mss StringType maxLength 50 gt lt elements gt lt elements name detectorVersion maxOccurrences 1 gt lt description gt The version identifier of the detector device used lt description gt lt label gt Detector Version lt label gt lt type xsi type mss StringType maxLength 50 gt lt elements gt lt profiles xsi type mss XMLSchemaProfile uri http www archer edu au schema xsd datacollection 0 4 schema tag dcol gt imports tag dcterms namespace http purl org dc terms schemaLocation http dublincore org schemas xmls qdc 2006 01 06 dcterms xsd gt lt layout gt lt parts xsi type mss XMLElementLayout element elements 0 gt lt parts xsi type mss XMLElementLayout element elements 1 gt parts xsi type mss XMLElementLayout element elements 2 gt parts xsi type mss XMLElementLayout elemen elements 3 gt lt parts xsi type mss XMLElementLayout elemen elements 4 gt lt parts xsi type mss XMLElementLayout elemen elements 5 gt lt parts xsi type mss XMLElementLayout element
10. ement type as being a comment Currently the Text Box will appear in schema definition order Figure 2 shows an example of a metadata record rendered for editing Full details of editor functionality are provided in the MDE User Guide which is included with the distribution package and can be downloaded from the editor itself via the Help menu Imdelserverirepos archer app Crystal v0 3 1 xml Fie Edi Help a Generis H sve vaite C cancel r lt O au Remove 8 C3 cya Crystal Protein Name EE Protein Sequence Unknown protein Uni Prot K B Id Ac amp Sample Reference E Source Organism Protein Name Protein Sequence amp Growth Method j UniProtKB Id Ac ES Morphology Q7N6X0 PHOLL E Solvent Sample Image URL Sample Reference E Comment serpins maspin gridscreen ammonium sulphate 24 27 05 05 2 4 well tray3 AB3 A Source Organism Escherichia coli Growth Method VAPOR DIFFUSION HANGING DROP Morphology Crystal size 0 42x0 12x0 01 mm3 il Solvent NaCl Sample Image URL http www archer edu au schema sampleimages crystal png Comment complete proteome 2 Settings Figure 2 MSNDKTGKSL EQENSERDVE IRDRNYFRKL SLFDDTVIAG AEMIGTSYDV FGKYCNVGSC MNSLFDERKI NASEDNFKKV TILGKTLKVP YYIDCY The Metadata Editor loads and persists records through integration with application dependant implementations of the Service Provider Interface SPI These must be written by the Application deve
11. ence the Application is depicted Metadata Creation Package Developer Guide Page 11 of 28 as a classic J2EE Servlet Actual implementations may use JSP or other technologies able to interact with the web services container to register their MetadataStoreProvider interface implementation with the RecordBroker 4 2 Implementation The Service Provider Interface SPI defines an interface that must be implemented by all Applications wishing to use the MCP The individual implementations provide a common view over all of the applications underlying metadata persistence mechanisms Developers must implement the MetadataStoreProvider interface allowing the MCP to load and persist metadata records see Appendix A SPI Interface The interface itself is patterned after the CORBA naming service as is the JNDI Note that only the rebind and lookup methods need to be implemented The others are currently included for historic reasons and may be deprecated in the final release unless found beneficial by application developers The implementation class must be registered with the Record Broker during Application start up When the MCP requests load or save of a record it passes the URL of the record to the Record Broker which locates the Provider class responsible for that record using the host part of the record ID URL The implementation then assumes responsibility for e Retrieving the record from storage and translating the local na
12. er Manual for this information 1 3 Background This package was designed and built to maintain high quality metadata records guaranteed to conform to a specific metadata schema at a nominated version It reflects over a decade of experience with earlier tools and incorporates feedback from the largely non technical user community Until recently the features that users have demanded have necessitated an editor implemented as a thick client desk top application The service described in this manual leverages what has been labelled Web 2 0 technology to provide a light weight browser based client that is responsive and flexible The server side components have been designed to be self contained with a simple HTTP based API that enables the package to be integrated with all commonly used web programming languages 1 4 Context The MDE is implemented as a Java web service that must be deployed in a container such as Tomcat For persistence of metadata records load and save the editor relies on a Service Provider Interface SPI implementation that must be written by the application developer 1 5 Terms and Abbreviations Apache Tomcat a commonly used open source web services container Application a collection of tools which are used collectively to achieve a business process roughly analogous to a program as a normal user perceives it Hover text a system of non interactive help that causes a window containing explanato
13. erm cache lifetimes should be tunable possibly from the MDSR side as in DNS Metadata Creation Package Developer Guide Page 16 of 28 Appendix A SPI Interface CAUTION This code is provided for reference only and may differ from the actual release For the most up to date version see the current release package e X 3o FF FF HF HF HF HF HF HF HF HF Ro HF i Copyright C 2007 School of Information Technology and Electrical Engineering University of Queensland www itee uq edu au This program was developed as part of the ARCHER project Australian Research Enabling Environment for the Department of Education Science and Training This program is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 3 of the License or at your option any later version This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this program If not see lt http www gnu org licenses gt package au edu archer metadata spi import org w3c dom Document Defines the common wrapper placed around heterogeneous metadata repositories tha
14. hared repository This approach ensures that MDE installations and other applications can all use the same schema definitions and it eliminates the problem of propagating schema updates to multiple places A fully fledged repository also allows users to examine schemas and look for alternatives As the name suggests the MDSR is a web based service for storing metadata schemas The primary functions of MDSR are as follows e providing secure storage for schemas with multiple representation formats and multiple versions e supporting HTTP requests to upload and retrieve schemas and e providing a web based user interface for browsing and managing the schema repository Like MDE the MDSR is implemented as Java servlets that run under Tomcat 5 5 MDSR uses Fedora for persistent storage of schema files The MSDR is described in detail in the MDSR User Guide and associated documentation If you are going to use an MDE with MDSR you must first populate the repository with the relevant schemas The easy way to do this is with MSE 3 In fact the MSE editor is mostly generated from the MSS meta model Metadata Creation Package Developer Guide Page 14 of 28 The following instructions assume that you have previously installed MDSR and MSF MSE according to the relevant instructions They also assume that you have been provided with the MSS format schemas as archive 1 Start the MDSR instance on the server if it is not already run
15. hrotron gt lt terms value sealed tube gt lt type gt lt elements gt elements name detectorType maxOccurrences 1 gt lt description gt The general class of the radiation detector lt description gt lt type xsi type mss ControlledList gt lt terms value area detector gt lt terms value ccd detector gt lt type gt lt elements gt lt elements name highResolution uri _maxOccurrences 1 gt lt description gt The smallest value for the interplanar spacings for the reflection data in angstroms lt description gt lt label gt High Resolution lt label gt lt type xsi type mss DecimalType gt lt elements gt elements name collectionDate maxOccurrences 1 gt lt description gt The date of the start of the scan lt description gt lt label gt Collection Date lt label gt lt type xsi type mss DateType gt lt elements gt lt elements name wavelength maxOccurrences 1 gt lt description gt The wavelength of the radiation in angstroms lt description gt lt label gt Wavelength lt label gt lt type xsi type mss DecimalType gt lt elements gt lt elements name detectorDistance maxOccurrences 1 gt lt description gt The distance from the sample to the detector along the beam in millimetres lt description gt lt label gt Detector Distance lt label gt lt type xsi type mss DecimalType gt lt elements gt lt elements name exposureTime maxOccurrences 1 gt lt des
16. ibuted to Archer Application developers to resolve interface references during development It should not be included in application Web Archive WAR packages as the interfaces and exceptions are made globally available as described above 2 2 2 JNDI Configuration Systems Integrators have the responsibility for determining the name by which the Record Broker factory will be globally known This must be configured into the Apache Tomcat web service configuration file CATALINA HOME config context xml to include a reference to the Object Factory An example configuration is shown in Figure 1 The value for the name attribute is arbitrary but must be used by all MDE aware applications For optimum maintainability it should be provided by indirection from an entry included in each application deployment descriptor This allows it to be changed without chasing through code and performing re compilations Context Resource name bean RecordBrokerFactory auth Container type au edu archer spi MetadataServiceProvider factory au edu archer recordbroker RecordBrokerFactory gt lt Context gt Figure 1 2 2 3 Servlet Configuration and Deployment The WAR file mde war that contains the MDE serrvlets must be configured before it can be used The MDE distribution provides the WAR file contents as a compressed zip file together with a Perl script called Configure PL that will configure and assemble the WAR f
17. ile This script performs a number of tasks including e setting the MDE context items in the web xml deployment descriptor e changing logging properties such as level log size etc e incorporating external metadata schemas for a flat file schema repository and e removing test data for deploying a production MDE The configuration utility follows the standard Unix configure conventions There is more information on the utility s options in Metadata Creation Package Developer Guide Page 4 of 28 2 3 the MDE release notes but for the most current option descriptions run the utility with the help option or no options Configure PL help After configuration the mde war file must be copied to the Apache Tomcat CATALINA_HOME server webapps directory The WAR files contains a deployment descriptor file that sets the relative URL by which the service can be invoked by Applications If it is necessary to change this or other parameters not covered by the Configure PL script you can do the following 1 manually unpack the WAR file using the Java jar command this requires a Java SDK installation 2 use a text editor to modify the deployment descriptor and or make other changes as required and 3 use the Java jar command to repackage the WAR file ready for deployment 2 2 4 Application Configuration This process will depend on the individual Applications as detailed in the specific docume
18. lar distance between the start angles of two consecutive images in the scan in degrees description lt label gt Angle Increment lt label gt lt type xsi type mss DecimalType gt lt elements gt elements name totalRotationRange maxOccurrences 1 gt description The total number of degrees scanned description lt label gt Total Range Rotation lt label gt lt type xsi type mss DecimalType gt lt elements gt elements name radiationType maxOccurrences 1 gt description Name of the type of radiation used description lt label gt Radiation Type lt label gt lt type xsi type mss ControlledList gt terms value x ray gt Metadata Creation Package Developer Guide Page 20 of 28 lt terms value electron gt lt terms value neutron gt lt terms value gamma gt lt type gt lt elements gt lt elements name radiationNature maxOccurrences 1 gt lt description gt The nature of the radiation This is typically a description of the X ray wavelength in Siegbahn notation lt description gt lt label gt Radiation Nature lt label gt lt type xsi type mss StringType maxLength 50 gt lt elements gt elements name diffractionSource maxOccurrences 1 gt description The source type of the radiation lt description gt lt label gt Diffraction Source lt label gt lt type xsi type mss ControlledList gt lt terms value rotating anode gt lt terms value sync
19. lopers The SPI defines the common wrapper placed around heterogeneous metadata repositories that Archer Applications must implement to provide Metadata Editor with read write access to the underlying records Currently the SPI defines the following methods e Bind Saves a record This method generates a new Id and binds it with the given record The Id must not already be in use e Rebind Update a metadata record If the given record Id already exists the record is replaced otherwise it is inserted e Lookup Retrieve a metadata record by ld if it exists Metadata Creation Package Developer Guide Page 6 of 28 e Remove Delete a metadata record from the repository Currently only the rebind and lookup methods are used by the editor and related batch processing facility A simple example implementation is shown in Appendix D Sample SPI Implementation While the editor imposes no restriction on how records are stored within an Application they must be supplied to the editor through the SPI lookup method as XML documents These documents need to obey certain rules in order to be viewable as metadata records using MDE as described in the next section 3 1 1 Limitations The Metadata Editor does not provide a means for deleting records As this action may have referential issues associated with it this is seen as a responsibility of the application invoking the editor The editor does not create new records If this func
20. ning see the MDSR documentation Launch an MSE instance on the machine where it is installed see the MSE documentation In MSE go to the workbench and use the File menu to create an empty Project Select the Project and use the context right button menu to Import the Archive file into the Project For each MSS model file that represents a schema do the following a Double click the file in the Navigator window to open the file in the MSS model editor b Expand the top node of the tree view and select the Metadata Schema element c From the context menu run the export wizard by choosing Export MDSR d The first pane should say that the model is valid Click Next gt e The second pane asks for the hostname and port number for the MDSR Make sure that the values in the field are correct then click Next gt f The third pane allows you to set the schema key add a log message and control what gets uploaded You should be able to just click Finish g You should next see a progress dialog followed by a dialog that says that generation has succeeded Click OK h Finally should see another progress dialog followed by a dialog that says that the schema has been uploaded Click OK If you have the relevant flattened MSS schema it is also possible to ingest and data stream them to the MDSR without using MSE For each schema you will need to 1 5 5 U
21. ntation packages A well written Application should have a configuration descriptor that permits integration specialists to configure the JNDI name for the Record Broker and the URI name full or relative for the deployed MDE servlet without editing recompilation and packaging Dependencies and Environment The MCP service has been validated under the following environments Java JRE 1 5 x or later Apache Tomcat version 5 5 x Linux RHEL 5 also tested under FC5 6 and 7 MS Windows XP Pro Microsoft Internet Explorer 7 Mozilla Firefox 2 x 1 Depending on how your Tomcat server is set up you may also need to manually remove the CATALINA_HOME server webapps mde directory tree and restart Tomcat Metadata Creation Package Developer Guide Page 5 of 28 3 Editor Architecture 3 1 Overview The Metadata Editor is a rich User Interface UI web application based on Ext JS 2 0 JavaScript library When the Metadata Editor is loaded the UI is created and populated with the elements that are defined in the record using a representation of the metadata schema specified by the record to populate lists and other editor features Metadata elements and attributes in the record are bound to appropriate UI widgets For example a metadata record containing the tag lt comment gt A comment lt comment gt will be rendered in the Ul as a Text Box containing the editable text A comment with a label that identifies the el
22. ository While the use of MDSR is recommended it is also possible to configure MDE to use a built in flat file repository The flat file repository makes use of copies of schema files that have been configured into the MDE WAR file and deployed to the Tomcat container The MDE distribution includes a default set of MSS schemas comprising versions of the Xtal schemas defined by Bob Cameron and a couple of test schemas If you run the Configure PL script as follows Configure PL with ff repos If as is likely you need to use a different set of schemas you first need to prepare a directory containing the schemas Specifically the schemas to be included must have a name of the form key flattened mss where key is the schema key that MDE will use to denote the schema and version Now you need to run the Configure PL script as follows Configure PL with ff repos with ff schema path dir where dir is the name of the directory containing the schema files Of course if you use the flat file repository approach you will need to repeat this procedure for every MDE installation each time you need to add or update schemas 4 To be specific the MDE caches schemas that it fetches from the MDSR for 3 minutes This is done to try to reduce the chance that MDE requests will overwhelm an MDSR instance The 3 minute caching interval is a compromise between load management and timely propagation of changes In the long t
23. reProvider interface This object must be registered with the Record Broker during application initialization In most cases the implementation will be a trivial wrapping of the existing metadata repository An application may register as many implementations as required Each implementation must provide a unique identifier string during registration The Record Broker will determine which store to use to service a read write request from the record identifier This string is provided by the application when the editor is invoked and must commence with the identifier under which the responsible persistence wrapper was registered The remainder of the record key allows the persistence layer to identify the required record DempAppSemet DemoAppEventListener RecordBroker Edit Launch Servet Edit Proxy Sendet Client Brows SimpleMDStorelmpl diim RecordBroker create instance E Register MD bind Setstatus OK Store Impl Begin Edit record ID openlD id lt E lookup id lt cw Created record DOM Ho 5 Editor GUI EC 1 edit pe savelD id DOM rebind id DOM lt Se Se eee ce itor os normal close lt MEME pplication MEME Container MEN Ecto a Client Browser Figure 4 Figure 4 depicts the object interactions for Application start up and later editing of a metadata record For conveni
24. reen layout to display the elements complete with user friendly labels and description as hover text e select and configure the MDE data entry widgets to do initial validation on data entry and e perform a thorough record validation on demand e g when saving a metadata record In the initial MCP documents it was envisaged that MDE would use the XML Schema Language XSL aka XSD to specify metadata schemas and that MDE would support a subset of XSL that was appropriate for metadata records It became apparent that this approach was problematic so a decision was made to design a project specific language for representing metadata schemas This language has come to be known as MSS Some of the key features of the Metadata Schema language MSS are e separation of metadata information and representation models e provision for rich document including multi lingual element names and descriptions e arich language for expressing constraints e specification completeness i e no reliance on external XSDs and e ithas an XML based concrete syntax like XSL and DTD MSS and the accompanying Metadata Schema Editor MSE comprise the Metadata Schema Facility MSF These are described in detail in the Metadata Schema Facility User Guide Metadata Creation Package Developer Guide Page 13 of 28 5 3 Schema Creation Metadata schemas for MCP are specified in Metadata Schema language and represented as mss files Like the XSL
25. rrespond to the XML schema profile the record cannot be validated 3 2 6 XSD Schema Conformance The final requirement is that any XML record should conform to the XSD that MSF generates from the MSS form of the schema MDE does not specifically check XSD conformance and in most cases you can get away with non conformant XML However there are cases where MDE will behave incorrectly when presented with a non conformant record 3 3 Invoking the Editor The Metadata Editor is launched by a HTTP request to the URL configured during integration for the editor servlet It is strongly recommended that this URL not be hard coded but read from a configuration file allowing the ARCHER Integration team to configure the namespace as they wish Record and work flow related details for the editor call are supplied as mandatory and optional CGI parameters An example call is shown in Figure 3 Once invoked the Metadata Editor will be loaded in a new browser window retaining the content of the call in the original window Optional call parameters allow the user to return to the calling application with out losing the current session or to invoke a new URL 2 In fact the current MDE implementation insists that every namespace URI that is mentioned in the schema location attribute is a declared namespace This is arguable a bug the XML specifications do not require this and it is certainly not needed to make MDE schema resolution work Metad
26. ry text to automatically appear id the client mouse pointer pauses in a specific UI location for a preset time Integration Specialist a person trained and having responsibility for the setup and maintenance of development testing deployment and possibly other web server configurations Metadata Creation Package Developer Guide Page 1 of 28 Metadata data describing data Widget a graphic user interface component Table 1 1 6 References MCP FRS ARCHER Functional Specification Metadata Creation Package Version 1 3 Draft 2007 07 13 EMF DG Eclipse Modeling Framework A Developer s Guide Addison Wesley 2003 ISBN 0 13 142542 0 ExtJS 2 0 See http extjs com 1 7 Domain Knowledge e Familiarity at the user level with the World Wide Web WWW is assumed e Integrators are expected to be familiar with configuring services under Apache Tomcat Metadata Creation Package Developer Guide Page 2 of 28 Integration 2 1 Introduction This section is intended for web server and container Integration Specialists responsible for making the central components available to software developers and for creating production environments Integration Specialists do not need a detailed understanding of components and processes described in the other sections of this Development Guide The distribution package contains the components listed in Table 2 nae arrose The zip file containing the content from which the
27. s for log level log size append etc are provided These may be configured using the Configure PL script provided in the distribution or changed manually following deployment By default The log file s will be written to S CATALINA HOME webapps mde 1logs The MDE will not start if it is unable to commence logging In this event an error message will be written to the Catalina logs Metadata Creation Package Developer Guide Page 9 of 28 Note it has been found that logging is not properly configured if you launch Tomcat 5 5 x using the jsvc utility according to the instructions in the Tomcat 5 5 online documentation It is recommended that you start Tomcat using either S CATALINA HOME bin startup sh or CATALINA_HOME bin catalina sh start Metadata Creation Package Developer Guide Page 10 of 28 4 The Service Provider Interface 4 1 Introduction The editor architecture is centred around a Record Broker This object is responsible for loading and saving metadata records using Application provided keys The Record Broker itself is obtained from an Object Factory that is globally bound into the web server Java Naming and Directory Interface JNDI The Record Broker implements the MetadataServiceProvider interface Users interact through this interface alone allowing the underlying implementation to change without need for recompilation Every application using the MDE must provide an implementation of the MetadataSto
28. se Ingest Object to register the schema setting the Object Identifier field to the schema key that MCP uses to identify the schema e g DataCollection_v0 4 Note that there is no suffix on the schema key Use Add Edit Datastream to upload the flattened MSS schema file Make sure that you select the right Object Identifier and that you enter MSS Flat as the Datastream Id You can also upload the non flattened MSS file and the XSD file if you want but MCP currently does not use them Configuring MDE to use an MDSR When an MDSR instance has been set up and populated the final step is to configure the MDE servlets to fetch their schemas from the MDSR This is done using the Configure PL script described earlier Metadata Creation Package Developer Guide Page 15 of 28 Configure PL with mdsr repos with mdsr host lt host gt with mdsr port lt port gt If the with mdsr host and with mdsr port options are omitted they default to localhost and 8080 respectively Once this has been done MDE users will be able to use new or updated schemas added to the MDSR with no reconfiguration to the MDE servlets There is a small time window currently 3 minutes during which an MDE will use an old cached version of a schema And of course schema changes will not affect MDE editor windows opened before the change was made 5 6 Creating and Configuring a flat file Schema Rep
29. t lt dcol collectionDate gt 2007 02 04 lt dcol collectionDate gt lt dcol xrayWavelength gt 1 5418 lt dcol xrayWavelength gt lt dcol detectorDistance gt 200 0 lt dcol detectorDistance gt lt dcol exposureTime gt 10 0033334 lt dcol exposureTime gt lt dcol detectorName gt RAXIS lt dcol detectorName gt lt dcol detectorVersion gt 6 X ctt lt dcol detectorVersion gt lt dcol DataCollection gt Metadata Creation Package Developer Guide Page 19 of 28 Appendix C Sample MSS Schema lt xml version 1 0 encoding UTF 8 lt mss MetadataSchema xmi version 2 0 xmlns xmi http www omg org XMI xmlns xsi http www w3 org 2001 XMLSchema instance xmlns mss http au edu archer metadata msf mss 1 0 name DataCollection uri http archer edu au metadata DataCollection version 0 4 gt lt description gt This metadata records details about the device and methods used to collect the diffraction images lt description gt lt label gt Data Collection lt label gt elements name collectionType uri minOccurrences 1 maxOccurrences 1 gt lt description gt The type of image collection lt description gt lt label gt Collection Type lt label gt lt type xsi type mss ControlledList gt lt terms value Native gt lt terms value Derivative gt lt type gt lt elements gt lt elements name solutionMethod minOccurrences 1 gt lt description gt The method s used to determine the struct
30. t Archer Applications must implement to provide Metadata Editor read write access to the underlying records author xchernich public interface MetadataStoreProvider Z Persists the passed record puram metarecord Metadata in DOM form Qreturn The unique repository dependant identifier for the persisted record Qthrows MetadataProviderException Unable to persist record Af String bind Document metarecord throws MetadataProviderException fue Persists the passed record using the passed key If a record with the key already exists it is silently replaced If it does not it may be inserted param metarecord DOM metadata param key Unique identifier for record repository dependant throws MetadataProviderException Unable to persist record e void rebind Document metarecord String key throws MetadataProviderException fre Retrieve the matadata in DOM form for the provided identifier param key Unique identifier repository dependant return Metadata DOM for application specific key or null throws MetadataProviderException Invalid or unknown key a Document lookup String key throws MetadataProviderException ES Removes the record with the passed key Implementations may choose not to implement this method It is expected this method will be deprecated in the final release Metadata Creation Package Developer Guide Page 17 of 28 param key Unique identifier repositor
31. tadataStoreProvider remove java lang String Ey public void remove String key throws MetadataProviderException if m_store containsKey key throw new MetadataProviderException Key not found key H m store remove key JEE non Javadoc see au edu archer spi MetadataStoreProvider list id public String list synchronized m_store Set lt String gt keys m_store keySet String tmp new String keys size keys toArray tmp return tmp EOF Metadata Creation Package Developer Guide Page 24 of 28
32. tion is required the Application should create an empty record so that its ID can be passed to the editor for element value entry The editor cannot create new versions of an existing record i e there is no save as capability 3 2 Metadata Record Requirements The Metadata Editor is not an editor for arbitrary XML Rather an XML document needs to satisfy a number of requirements before it can even be successfully opened by MDE These requirements are partly militated by the requirements of generic XML parsers in Java and Javascripts and partly by the needs of MDE In the latter case the primary issue is that MDE needs to be identify a single definitive MSS metadata schema see later for each record An example of an XML document satisfying these requirements and also conforming to the schema in Appendix C Sample MSS Schema is given in Appendix B Sample Metadata Record 3 2 1 Well formed XML A metadata record must be well formed XML according to the XML 1 0 or 1 1 specification For example and gt characters should appear in the right places element tags should be balanced attributes should be properly quoted and so on 3 2 2 Defined XML Namespace The root element of the metadata record must have a well formed XML namespace declaration or declarations The first declared i e default namespace is used to resolve the record s metadata schema 3 2 3 XML Schema Location The root element of the metadata re
33. tive record format to XML for lookup operations e Translating a XML record to native format and writing it to persistent storage for rebind operations e Performing any record locking operations required to provide adequate concurrency Metadata Creation Package Developer Guide Page 12 of 28 Schema Preparation and Configuration 5 1 Introduction As should be clear from earlier sections of this document and from other MCP documents metadata schemas play a central role in the Metadata Creation Package This section discusses how metadata schemas are represented how they are created and how they are managed Most of this is implemented by Metadata Management Facility MMF code that is separate from the MCP deliverables In fact MMF is currently split into two distinct components e the Metadata Schema Facility MSF is used for creating metadata schemas and e the Metadata Schema Repository MDSR which provides a shared repository for published schema 5 2 Metadata Schemas The primary purpose of a metadata schema is to specify what constitutes a valid or acceptable metadata record The schema specifies what fields are valid and how many times they are required or allowed to occur It specifies what the field types are and in some cases constrains the field values beyond simple data types Based on the metadata schema MCP will e map XML elements to metadata elements e build an MDE sc
34. ure lt description gt lt label gt Solution Method lt label gt lt type xsi type mss ControlledList gt lt terms value SAD gt lt terms value MAD gt lt terms value SIR gt terms value SIRAS terms value MIR gt terms value MIRAS gt terms value ISAS gt terms value ISAR gt terms value ISARAS gt terms value AB INITIO uri gt terms value DM terms value MR uri type lt elements gt lt elements name numberOfFrames maxOccurrences 1 gt lt description gt The total number of frames in the scan lt description gt lt label gt Number Of Frames lt label gt lt type xsi type mss ConstrainedType gt lt baseType xsi type mss IntegerType gt constraints name IntegerMustBeNonnegative expression xsi type mss Operation operator GreaterOrEqual gt lt operands xsi type mss Self gt lt operands xsi type mss Literal value 0 gt lt expression gt lt errorMessage gt This integer value must be gt zero lt errorMessage gt lt constraints gt lt type gt lt elements gt lt elements name crystalTemperature maxOccurrences 1 gt lt description gt The temperature of the crystal during collection in degrees Celsius lt description gt lt label gt Crystal Temperature lt label gt lt type xsi type mss DecimalType gt lt elements gt elements name angleIncrement maxOccurrences 1 gt lt description gt The angu
35. y dependant throws MetadataProviderException Invalid or unknown key i void remove String key throws MetadataProviderException fee Returns a list of all identifiers in the repository Implementations may choose not to implement this method It is expected this method will be deprecated in the final release return All known identifiers d String list EOF Metadata Creation Package Developer Guide Page 18 of 28 Appendix B Sample XML Metadata Record lt xml version 1 0 encoding utf 8 lt dcol DataCollection xmlns dcol http www archer edu au schema xsd datacollection 0 3 xmlns xsi http www w3 org 2001 XMLSchema instance xsi schemaLocation http www archer edu au schema xsd datacollection 0 3 file DataCollection v0 3 xsd lt dcol numberOfFrames gt 180 lt dcol numberOfFrames gt lt dcol numberOfFrames gt 180 lt dcol numberOfFrames gt lt dcol crystalTemperature gt 298 0 give or take a bit lt dcol crystalTemperature gt lt dcol angleIncrement gt 0 5 lt dcol angleIncrement gt lt dcol angleRange gt 90 0 lt dcol angleRange gt lt dcol totalRotationRange gt 90 lt dcol totalRotationRange gt lt dcol probe gt x ray lt dcol probe gt lt dcol radiationType gt Cuk a lt dcol radiationType gt dcol diffractionSource rotating weasel lt dcol diffractionSource gt lt dcol detectorType gt area detector lt dcol detectorType gt lt dcol resolution gt 2 0 lt dcol resolution g
Download Pdf Manuals
Related Search
Related Contents
MC-9000シリーズ Bedienungsanleitung Philips PR3082 REFERENCE MANUAL - Floridamusicco.com LRmix Studio_tuto_v3 range NEW Playback Mode - produktinfo.conrad.com Sample Applications User Guide Jackson TS-66 User's Manual WDNS045 / WDNS055 Manual Copyright © All rights reserved.
Failed to retrieve file