blob: ededae8635eda9d9487b5b3e0575f4c37a9a4165 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is the DTD defining the Java Data Objects 1.0 metadata.
The metadata must declare all persistence-capable classes. If any
field declarations are not provided in the metadata, then field
metadata is defaulted for the missing field declarations.
Therefore, the JDO implementation is able to determine based on the
metadata whether a class is persistence-capable or not.
Any class not known to be persistence-capable by the JDO
specification (for example, java.lang.Integer) and not explicitly
named in the metadata is not persistence-capable.
The metadata associated with each persistence capable class must
be contained within a file, and its format is as defined in the DTD.
If the metadata is for only one class, then its file name should be
<class-name>.jdo. If the metadata is for a package, then its file name
should be <package-name>.jdo. For portability, files should be
available via resources loaded by the same class loader as the class.
These rules apply both to enhancement and to runtime.
The metadata is used both at enhancement time and at runtime.
Information required at enhancement time is a subset of the information
needed at runtime.
-->
<!NOTATION JDO.1_0 PUBLIC
"-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN">
<!--
This is the XML DTD for the JDO 1.0 Metadata.
All JDO 1.0 metadata descriptors must include a DOCTYPE
of the following form:
<!DOCTYPE jdo
PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN"
"http://java.sun.com/dtd/jdo_1_0.dtd">
-->
<!ELEMENT jdo ((package)+, (extension)*)>
<!ELEMENT package ((class)+, (extension)*)>
<!ATTLIST package name CDATA #REQUIRED>
<!ELEMENT class (field|extension)*>
<!ATTLIST class name CDATA #REQUIRED>
<!ATTLIST class identity-type (application|datastore|nondurable) #IMPLIED>
<!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 (extension)*>
<!ATTLIST collection element-type CDATA #IMPLIED>
<!ATTLIST collection embedded-element (true|false) #IMPLIED>
<!ELEMENT map (extension)*>
<!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 (extension)*>
<!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>