# Presentation: 806006

## XMDR Prototype Progress Report

**XMDR Prototype Progress Report**

**John McCarthy and Kevin D. Keck**
**XMDR Project Quarterly Meeting**
**15 March, 2005**
**UC Berkeley Faculty Club**

## Purposes of XMDR Prototype for ISO/IEC 11179 Registry Standard

**Extend semantics management capabilities**
**Explore uses of terminologies and ontologies**
**Systematize representation of relationships **
**Adapt & test emerging semantic technologies**
**Help resolve registration & harmonization issues for different metadata standards**
**Propose revisions to 11179 Parts 2 & 3 (Ver. 3)**
**Show how proposed revisions to metadata registry standards can be implemented**
**Demonstrate Reference Implementation (RI)**

## XMDR Prototype Architecture: Initial Implemented Modules

**XMDR Prototype Architecture: Initial Implemented Modules**

**Subversion**

**Jena, Xerces**

**Jena, OWI KS**

**Lucene**

**Java**

## XML files for each metadata object were extracted from EDR via scripts

**XML files for each metadata object were extracted from EDR via scripts**

- Extract Script
- - works on underlying html
- - follows each link
- - gets html file for each linked object

- Conversion Script
- - works on html files
- - creates xml file for each

- First step...all xx items linked from Countries of the World
- Next step... bulk load all metadata item instances from EDR

## Html to xml file conversion example

**Show html file and then it’s xml transform**

## XMDR Prototype contains an xml file for each metadata item instance

_**Administered Items**_
**Classification Schemes**
**Conceptual Domains**
**Contexts (for Administered Items)**
**Data Elements**
**Data Element Concepts**
**Object Classes**
**Properties**
**Representation Classes**
**Value Domains**

_**Other Items**_
**Relationships**
**What else?**

## XMDR Prototype example: dual purpose rdf/xml file: DC-Country_Label (extract)

**<DataElement rdf:about=""**
**    ****xmlns:mdr="http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3v2.owl#"**
**    ****xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"**
**    ****mdr:meaning="DC-Country_Label.xml"**
**    ****mdr:registrationAuthority="http://oaspub.epa.gov/edr">**
**  ****<identifier>**
**    ****<registrationAuthorityIdentifier>**
**      ****<internationalCodeDesignator>en-US</internationalCodeDesignator>**
**      ****<organizationIdentifier>EPA</organizationIdentifier>**
**    ****</registrationAuthorityIdentifier>**
**  ****</identifier>**
**  ****<administrationRecord>**
**    ****<registrationStatus>Standard</registrationStatus>**
**    ****<administrativeStatus>Final</administrativeStatus>**
**    ****<creationDate>????</creationDate>**
**  ****</administrationRecord>**
**  ****<steward mdr:organization="ORG-1044"**
**	****   ****mdr:contact="CON-20068"/>**

**<terminologicalEntry**
**     ****mdr:entryContext="CXT-Standard">**
**    ****<component>**
**      ****<sectionLanguage>**
**	****<language>eng</language>**
**	****<countryIdentifier>USA</countryIdentifier>**
**      ****</sectionLanguage>**
**      ****<designation>**
**	****<name>Country Name</name>**
**      ****</designation>**
**      ****<definition>**
**	****<text>The name that represents a primary geopolitical unit of the world.</text>**
**      ****</definition>**
**    ****</component>**
**  ****</terminologicalEntry>**
**<terminologicalEntry**
**     ****mdr:entryContext="CXT-XML_Tag_Final">**
**    ****<component>**
**      ****<sectionLanguage>**
**	****<language>eng</language>**
**	****<countryIdentifier>USA</countryIdentifier>**
**      ****</sectionLanguage>**
**      ****<designation>**
**	****<name>CountryName</name>**
**      ****</designation>**
**    ****</component>**
**  ****</terminologicalEntry>**
**</DataElement>**

***[boil down contents and add annotations]***

## XMDR files serve dual purpose:xml and OWL-compatible rdf

**Well-formed XML**
**XML serialization of RDF**
**Conforms with 11179 OWL ontology**
**Base tag includes rdf:about attribute**
**Literals encoded as element content**
**URI’s encoded as attribute values**
**“****striped” resource, property, resource, ...  use abbreviated form for anonymous nodes**

## Xml schema specifies constraints

**Relax NG schema to make xml files**
**Enforces constraints for 11179 OWL**
** **

## Relationships are implemented as LINKS to other xml files

- <entity-type>**DataElement **</entity-type>
- <name>**Country of Birth**</name>
- <*conceptual domain*>_**Country **_</*conceptual domain*>
- <*value domain*>_**Countries of the World**_ </*value domain*>

- <entity-type>**ConceptualDomain**</entity-type>
- <name>**Country**</name>

- <entity-type>**ValueDomain**</entity-type>
- <name> _**Countries of the World**_ </name>

- Metadata schema includes relationships that specify which attributes can or must
- link to other entity-types

## How can terminologies and ontologies help manage metadata?

**At the level of metadata instances in a registry, connect metadata entities via shared terms**
**via automatic indexing of metadata words**
**via text values from specific metadata elements**
**At the level of the 11179 (or other) metamodel, ontologies can help specify formal relationships**
**is-a and part-of hierarchies, etc. **
**Inheritance, aggregation, ...**
**for automatic searching of sub-classes & inverses**
**to specify semantic pathways for indexing**

## *Protégé Editor was used to create OWL ontology for 11179 metamodel

**[insert screenshot from Protégé]**

## *Protégé OWLViz Plug-in Displays OWL Class Hierarchy for 11179 

- Built on top of GraphViz

## Class hierarchy includes simple and “union” “is-a”relationships

## *Is-a and union hierarchies can nest to arbitrary depth in OWL

## ISO/IEC 11179 fragment is expressed as an OWL ontology using RDF syntax

**<?xml version="1.0" encoding="ISO-8859-1"?>**
**<rdf:RDF**
**    ****xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"**
**    ****xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"**
**    ****xmlns:owl="http://www.w3.org/2002/07/owl#"**
**    ****xmlns="http://www.owl-ontologies.com/unnamed.owl#"**
**  ****xml:base="http://www.owl-ontologies.com/unnamed.owl">**
**  ****<owl:Ontology rdf:about=""/>**
**  ****<owl:Class rdf:ID="Registrar">**
**    ****<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>**
**    ****<rdfs:subClassOf>**
**      ****<owl:Restriction>**
**        ****<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"**
**        ****>1</owl:cardinality>**
**        ****<owl:onProperty>**
**          ****<owl:ObjectProperty rdf:ID="contact"/>**
**        ****</owl:onProperty>**
**      ****</owl:Restriction>**
**    ****</rdfs:subClassOf>**
**    ****<rdfs:subClassOf>**
**      ****<owl:Restriction>**

## Lucene facilitates text indexing to search on words & phrases

**Lucene facilitates text indexing to search on words & phrases**

- <entity-type>**Terminology**</entity-type>
- <name>United Nations XXXX</name>

- <entity-type>**ValueDomain**</entity-type>
- <name> _**Countries of the World**_ </name>

- <entity-type>**ConceptualDomain**</entity-type>
- <name>**Country**</name>

- <entity-type>**DataElement **</entity-type>
- <name>**Country of Birth**</name>
- <conceptual domain>_**Country **_</conceptual domain>
- <value domain>_**Countries of the World**_ </value domain>

_**Word Index**_
- birth
- country
- world
- ...

**Phrase searches done on results**

_**Name Index**_
- birth
- country
- ...

_**Other Indexes**_

## Lucene text search capabilities, with examples

**Simple word search  **
**Wild-card word search**
**Fuzzy or stem search (~)**
**Search specified field**
**Search for links **
**Distance (in words) **
**Phrases**
**Boolean operators**

- country

- coun*

- country~

- name:coun*

- link:http*)

- “country world”~4

- “countries of the world”

- AND, "+", OR, NOT, "-"

- http://lucene.apache.org/java/docs/queryparsersyntax.html

## *More text search capabilities

**Range search  **
**Boosting a term**
**Grouping**
**Field grouping**
**Escape special characters**

## Advanced search interface can automatically generate syntax

**Field/Column**

**Conjunctions**

**Operator**

**Value**

## [show Text Queries here]

**show Text Query examples here**
**Queries and results**

## Distinguish text vs rdf queries

**What text queries do**
**What rdf queries do**
**What are the major differences?**

## Reasoners use OWL ontologies to augment RDF graph queries

- OWL 11179 Ontology

- OWL built-in rules

- RDF Query
- (rdql/ndql)

**Reasoner **
- Jena or Racer
- (memory)

**result set**
*includes*
*subclasses,*
*inverses, etc.*

- 11179 metadata (xml/rdf files)

## Uses of RDF queries

**Expand queries to other classes in a hierarchy**
**E.g., all data elements that have to do with infectious diseases**
**E.g. what attributes are there for images of carcinomas vs basil cell**
**Go from concepts back to de’s even if only have concepts in de’s (do index)**

## RDF Queries are very different from text search or SQL!

_**QUERY**_
**SELECT ?t**
**WHERE (<http://erdos.lbl.gov/xmdr/data/VDALL.1.15147.1.xml>   rdf:type   ?t)**
**USING mdr FOR <http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3v2.owl#>**
_**RESULT**_
**?t**
**<http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3v2.owl#EnumeratedValueDomain>**
**<http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3v2.owl#ValueDomain>**
**<http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3v2.owl#AdministeredItem>**
**<owl:Thing>**
**<rdfs:Resource>**
**search includes sub-classes and inverses**

## Registering/Loading Metadata

**Browse and upload file(s)**
**Form interface**

## Lessons Learned to Date

**XML-RDF files can serve dual purpose  (may be first time this has been done?)**
**Independent modules facilitate testing many possible new tools...BUT**
**take more time to implement & maintain**
**State of art for open-source OWL reasoners not very advanced (none yet for OWL-DL)**

## Unresolved Issues

**Performance using files for objects**
**Relationship representation**
**XML objects display & browsing**
**User-friendly interface for RDF queries**
**external data sources, ontologies, terminologies (maybe via indexing?)**
**Harmonization with MMR**
**Others??**

## Next Steps

**Load data from EDR & other sources**
**Implement advanced text search UI**
**Use style sheets to display xml as html**
**Add validation and mapping modules**
**Connect terminology/ontology to items**