JDO XML metadata.

OBJECTS IN THE DATABASE
The JDO object model
David Jordan
Listing 1. JDO XML metadata.


<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT jdo (package)+>
<!ELEMENT package ((class)+, (extension)*)>
<!ATTLIST package name CDATA #REQUIRED>

<!ELEMENT class (field|extension)*>
<!ATTLIST class name CDATA #REQUIRED>
<!ATTLIST class identity-type
(application|datastore|none) ‘datastore’>
<!ATTLIST class objectid-class CDATA #IMPLIED>
<!ATTLIST class requires-extent (true|false) ‘true’>
<!ATTLIST class persistence-capable-superclass
CDATA #IMPLIED>

<!ELEMENT field ((collection|map|array)?, (extension)*)?>
<!ATTLIST field name CDATA #REQUIRED>
<!ATTLIST field persistence-modifier
(persistent|transactional|none) #IMPLIED>
<!ATTLIST field primary-key (true|false) ‘false’>
<!ATTLIST field null-value
(exception|default|none) ‘none’>
<!ATTLIST field default-fetch-group
(true|false) #IMPLIED>
<!ATTLIST field embedded (true|false) #IMPLIED>

<!ELEMENT collection EMPTY>
<!ATTLIST collection element-type CDATA #IMPLIED>
<!ATTLIST collection embedded-element
(true|false) #IMPLIED>

<!ELEMENT map EMPTY>
<!ATTLIST map key-type CDATA #IMPLIED>
<!ATTLIST map embedded-key (true|false) #IMPLIED>
<!ATTLIST map value-type CDATA #IMPLIED>
<!ATTLIST map embedded-value (true|false) #IMPLIED>

<!ELEMENT array EMPTY>
<!ATTLIST array embedded-element (true|false) #IMPLIED>

<!ELEMENT extension (extension)*>
<!ATTLIST extension vendor-name CDATA #REQUIRED>
<!ATTLIST extension key CDATA #IMPLIED>
<!ATTLIST extension value CDATA #IMPLIED>

About the Author

David Jordan is a Systems Architect with BuildNet Inc. based in Research Triangle Park, NC, which provides builder and supplier management software to the residential construction industry. He can be contacted at djordan@buildnet.com.

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.