Modeling XSD:key and XSD:keyref Using EMF

IP.com Number IPCOM000157944D
thumb 01 thumb 02 thumb 03 thumb 04
Scaled page rendering of the first four pages
Dated Sep 7, 2007 UTC
Size 3 page(s) (37.1 KB)
 
Disclosed by IBM-IPCOM

Publication Summary

Disclosed is a mechanism for supporting xsd:key and xsd:keyref in Eclipse Modeling Framework (EMF). Eclipse Modeling Framework models XSD:element as a feature/property, and XSD:complexType element as a containment reference. This disclosure models XSD:keyref element as a non-containment reference so that EMF users now can model non-containment references in XML Schema Definition (XSD).
Country
Language English (United States)

About this Publication

This document was submitted to IP.com's Prior Art Database and this preview is designed to provide you with information regarding the contents of this document by displaying up to the first four pages of the document as scaled page renderings and displaying a limited amount of text which was extracted from the document on the Text Preview Tab.

To find out more on how to obtain the entire document, click the Download tab. There is a charge for downloading some Prior Art Database documents; please examine carefully whether you believe this document fills your needs before purchasing.

For more information about the Prior Art Database, visit the Learn section of this website. Thank you for visiting IP.com's Prior Art Database! You may wish to check out our Global Patent Search website before you leave.

Continue to Text Preview →

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 63% of the total text.
This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.

Page 1 of 3

Modeling XSD:key and XSD:keyref Using EMF

Eclipse Modeling Framework (EMF) provides org.eclipse.xsd.XSDPackage#getDOMElement() to interpret XSD:element, XSD:key, and XSD:keyref information is available as in Document Object Model (DOM) Element.

EMF also provides org.eclipse.xsd.ecore.XSDEcoreBuilder to convert loaded XML Schema Definition (XSD) to EMF classes and features/properties. This disclosure provides XsdEcoreBuilder (Fig. 1) to support XSD:key and XSD:keyref.

Figure 1

The modeling of XSD:key and XSD:keyref using EMF is the most important part.

EMF provides org.eclipse.emf.ecore.EReference for reference. This disclosure provides KeyReference (Fig. 2) to model XSD:keyref and XSD:key.

Figure 2

1

[This page contains 2 pictures or other non-text objects]

Page 2 of 3

e.g.
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="OrderNamespace" xmlns:tns="OrderNamespace"
xmlns:bo="
http://www.ibm.com/xmlns/prod/websphere/wbi/BusinessObject/6.0.0
">


(Fig. 3) It produces:

2

Page 3 of 3

Figure 3

Now, the programming model:


EObject instanceOrderRole = ...

EClass OrderRole = instanceOrderRole.eClass(); // EMF API
Object reference = OrderRole.getEStructuralFeature( "record");
// EMF API
KeyReference record = (KeyReference)reference;

EClass type = record.getEReferenceType(); // EMF API
// order is the return, while EMF returns OrderKeyref which is
wr...

Download This Document →

 

Copyright © 2004-2010 IP.com. All Rights Reserved.

Privacy Policy   |   About IP.com   |   Contact Us