Generic handling of metadata/Faces Implementation

From MPDLMediaWiki
Jump to: navigation, search

Concepts

Generic handling of metadata

Faces Implementation

Faces solution will deal with the following metadata profiles each described by using the Dublin Core Application Profile (DCAP) Description Set Profile (DSPDescription Set Profile) syntax. For more information on DCAP see also DC Application Profile pages.

Natively, as Faces solution is based on the eSciDocEnhanced Scientific Documentation repository, it will be aware of items, components and thus the implementation of this generic metadata editor within Faces is not by default portable to other solutions (as they may have different understanding of properties, version history, relations, item structure etc.). The design however may be used as a template.

Another specialization used in Faces implementation: metadata records are xml-based and they are not expressed as rdf. Therefore the DSPs are expressed in their XMLExtensible Markup Language variant.

Faces metadata profile as DSPDescription Set Profile

<?xml version="1.0" encoding="UTFUnicode Transformation Format-8"?>
<DescriptionSetTemplate xmlns="http://dublincore.org/xml/dc-dsp/2008/01/14" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dublincore.org/xml/dc-dsp/2008/01/14 E:\eSciDOC\TestMDStore\dcmi-dsp.xsd">
	<DescriptionTemplate IDIdentifier="face-item" minOccurs="1" maxOccurs="1" standalone="yes">
		<ResourceClass>http://purl.org/escidoc/metadata/profiles/face-item</ResourceClass>
		<StatementTemplate IDIdentifier="emotion" minOccurs="1" maxOccurs="1" type="nonliteral">
			<Property>http://purl.org/escidoc/metadata/terms/emotion</Property>
			<LiteralConstraint>
				<LiteralOption>happiness</LiteralOption>
				<LiteralOption>anger</LiteralOption>
				<LiteralOption>neutrality</LiteralOption>
				<LiteralOption>sadness</LiteralOption>
				<LiteralOption>fear</LiteralOption>
				<LiteralOption>disgust</LiteralOption>
			</LiteralConstraint>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="picture-group" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/picture-group</Property>
			<LiteralConstraint>
				<LiteralOption>a</LiteralOption>
				<LiteralOption>b</LiteralOption>
			</LiteralConstraint>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="identifier" minOccurs="0" maxOccurs="1" type="literal">
			<Property>http://purl.org/dc/elements/1.1/identifier</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="age" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/age</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="age-group" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/age-group</Property>
			<LiteralConstraint>
				<LiteralOption>young</LiteralOption>
				<LiteralOption>middle-age</LiteralOption>
				<LiteralOption>old</LiteralOption>
			</LiteralConstraint>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="gender" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/gender</Property>
			<LiteralConstraint>
				<LiteralOption>female</LiteralOption>
				<LiteralOption>male</LiteralOption>
			</LiteralConstraint>
		</StatementTemplate>
	</DescriptionTemplate>
</DescriptionSetTemplate>

Diamonds metadata profile as DSPDescription Set Profile

<?xml version="1.0" encoding="UTFUnicode Transformation Format-8"?>
<DescriptionSetTemplate  xmlns="http://dublincore.org/xml/dc-dsp/2008/01/14" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dublincore.org/xml/dc-dsp/2008/01/14 .\dcmi-dsp.xsd">
	<DescriptionTemplate IDIdentifier="diamond-item" minOccurs="1" maxOccurs="1" standalone="yes">
		<ResourceClass>http://purl.org/escidoc/metadata/profiles/diamond-item</ResourceClass>
		<StatementTemplate IDIdentifier="diamond-elements" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/diamond-elements</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="shape" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/shape</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="color" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/color</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="mechanism" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/mechanism</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="condition" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/condition</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="temperature" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/temperature</Property>
			<LiteralConstraint></LiteralConstraint>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="brief-details" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/dc/elements/description</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="full-details" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/dc/terms/abstract</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="date" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/dc/elements/date</Property>
			<LiteralConstraint><SyntaxEncodingScheme>http://www.w3.org/TR/NOTE-datetime</SyntaxEncodingScheme></LiteralConstraint>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="identifier" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/dc/elements/1.1/identifier</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="creator" minOccurs="0" maxOccurs="1" type="nonliteral">
			<Property>http://purl.org/escidoc/metadata/terms/creator</Property>
			<NonLiteralConstraint descriptionTemplateRef="person"/>
		</StatementTemplate>
	</DescriptionTemplate>
	<DescriptionTemplate IDIdentifier="person" minOccurs="1" maxOccurs="1" standalone="no">
		<ResourceClass>http://purl.org/escidoc/metadata/profiles/person</ResourceClass>
		<StatementTemplate IDIdentifier="complete-name" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/complete-name</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="given-name" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/given-name</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="family-name" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/family-name</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="organization" minOccurs="0" maxOccurs="1" type="nonliteral">
			<Property>http://purl.org/escidoc/metadata/terms/organization</Property>
			<NonLiteralConstraint descriptionTemplateRef="organization"/>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="identifier" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/identifier</Property>
			<LiteralConstraint> 
				<SyntaxEncodingScheme>http://escidoc.mpg.de/metadataprofile/schema/0.1/idtypes</SyntaxEncodingScheme>
			</LiteralConstraint> 
		</StatementTemplate>
	</DescriptionTemplate>
	<DescriptionTemplate IDIdentifier="organization" minOccurs="1" maxOccurs="1" standalone="no">
		<ResourceClass>http://purl.org/escidoc/metadata/profiles/organization</ResourceClass>
		<StatementTemplate IDIdentifier="organization-name" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/organization-name</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="address" minOccurs="0" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/address</Property>
		</StatementTemplate>
		<StatementTemplate IDIdentifier="identifier" minOccurs="1" maxOccurs="1" type="literal">
			<Property>http://purl.org/escidoc/metadata/terms/identifier</Property>
		</StatementTemplate>
	</DescriptionTemplate>
</DescriptionSetTemplate>




Administration utility

  • Register profile
    • checks provided DSPDescription Set Profile file and validates it in accordance with the DSPDescription Set Profile.xsd
    • puts provided DSPDescription Set Profile file to space defined by the user e.g. resource directory visible to the solution (JBossOpen source Java EE-based application server deployment conf directory)
  • Screen configurator
    • checks provided DSPDescription Set Profile file and validates it in accordance with the DSPDescription Set Profile.xsd
    • generates default screen configuration for the DSPDescription Set Profile, based on screen configuration schema. For each DSPDescription Set Profile 1 file is generated and it contains 5 identical screen configurations:
      • view
      • edit
      • search
      • browse
      • export
    • checks provided screen configuration file (note: can be created without help of the screen configurator) and validates it in accordance with the screen-config.schema and related DSPDescription Set Profile file
    • puts provided screen-config file to space defined by the user e.g. resource directory visible to the solution (JBossOpen source Java EE-based application server deployment conf directory)
  • ScreenManager (extension, see below)
  • Directory structure (to be discussed)
    • JbossOpen source Java EE-based application server deployment directory/conf (e.g. /usr/share/jboss/server/default/conf/ )
      • dsp/DSPDescription Set Profile-profile-id (e.g. /usr/share/jboss/server/default/conf/dsp/face-item-profile.xml, /usr/share/jboss/server/default/conf/dsp/diamond-item-profile.xml )
        • screens (e.g. /usr/share/jboss/server/default/conf/dsp/face-item/screens/face-item-sc.xml, /usr/share/jboss/server/default/conf/dsp/diamond-item/screens/diamond-item-sc.xml )

Presentation components

  • XMLBeans based
  • Schemas for XMLBeans Document objects generation:
    • item.xsd (includes md-records.xsd, components.xsd) (escidoc-core)
    • item-scr.xsd (derived from item.xsd, and includes respective {md-records, components, metadata}-scr.xsd, md-records-scr.xsd, components-scr.xsd, netadata-scr.xsd
  • Simplified sequence diagram
    • Note: includes only interactions on Faces solution level, and does not include the Admin utility

PresentationCommunication.jpg


  1. User requests to view a specific face-item
  2. Faces solution retrieves the item from the core-service and transforms it to an XMLBean object
The Faces architecture itself to be checked, maybe having a "smart" ItemBean instead of ItemHandler utility would be better (todo: check GrantVO concept and implementation).
  1. Faces solutions checks the metadata profile version, reads the screen configuration for "view" screen and invokes the ScreenManager to deliver a respective ItemScreenBean object
  2. ScreenManager processes the input data and creates respective ItemScreenBean object
  3. Faces solution retrieves the ItemScreenBean object and generates the view (JSPFJava Simple Plugin Framework)

ScreenManager (extension)

  • In general, purpose is to transform a resource to screen resource
  • present development:
    • component may be part of Faces solution, at later stage will be moved to separate interface
    • takes as an input an item resource object (e.g. item.xml), desired screen configuration id (e.g. view, edit, etc.) and delivers a screen item resource object
  • future development:
    • component should distinguish between screen-type and screen-id (e.g. screen-type is "view", screen-id may point to "brief", "detailed", "bibliographic", "article", "book" etc. )
    • retrieveScreens (metadata profile [version]) - lists screens available for a metadata profile (all or specified version)
    • generateScreens (resource, screen-id) - generates desired screen for a concrete resource
    • retrieveResourceScreens (resource, [screen-type]) - lists screens available for a resource (based on its metadata profile version) (all or specified screen-type)

Implementation

Limitations

  • Labels: Due to limitation of the DSPDescription Set Profile, it is not possible to define precise labels of a metadata in the DSPDescription Set Profile. Thus, in FACES, an extra bundle (metadata_en.properties for English) needs to be configured if labels should be different from the metadata element name itself. The key is the metadata Id define in statement template.
  • validation: The DSPDescription Set Profile doesn't not afford to define some validation rules. For example it is not possible to define that an age should be an integer from 18 to 99. We aim to use the eSciDocEnhanced Scientific Documentation validation service to perform metadata validation
  • metadata relations: Probably because of a non complete understanding of the DSPDescription Set Profile, we can't (so far!) define logical relation between metadata. For example age and age-group are not 2 different metadata but one defined in 2 ways.
i think this is not limitation of the DSPDescription Set Profile but requires modification in the metadata profile. The validation would be part of the validation service anyway --Natasa 12:35, 13 May 2009 (UTCCoordinated Universal Time)
  • Sorting/searching : We need to define for each metadata the escidoc index. We could consider that the id should be that index, but I'm not convinced it is a very good idea (regarding the complexity of certain indexes).