Java Reference
In-Depth Information
2006]. Throughout this chapter, we refer to the
JDM XML Schema
as
the
JDM Schema
and a
JDM XML document
as a
JDM document
.
10.1
Overview
Chapters 8 and 9 introduced various JDM objects. Most of these
objects were defined as Java interfaces that define associated methods
but no data members. The JDM standard uses an interface-based
approach to provide data mining vendors greater flexibility when
implementing JDM functionality. However, the lack of a standard
data model causes interoperability issues for exchanging JDM objects
between implementations. The JDM Schema fills this gap by defining
a standard data model using XML for JDM objects. For example,
the
javax.datamining.MiningObject
interface has a corresponding
complex type called
MiningObject
that defines a data model, as shown
in Listing 10-1. Note that each element and attribute defined in this
complex type has a corresponding
get
method defined in the
javax.datamining.MiningObject
interface. Similarly, all other JDM API
interfaces and classes have an associated JDM Schema type.
Listing 10-1
JDM Schema MiningObject complexType
<xsd:complexType name="MiningObject">
<xsd:sequence>
<xsd:element name="description" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="optional"/>
<xsd:attribute name="type" type="NamedObjectType" use="optional"/>
<xsd:attribute name="creatorInfo" type="xsd:string" use="optional"/>
<xsd:attribute name="creationDate" type="xsd:date" use="optional"/>
<xsd:attribute name="objectIdentifier" type="xsd:string" use="optional"/>
</xsd:complexType>
10.2
Schema Elements
The JDM Schema's elements structure is fairly simple. Listing 10-2
illustrates the JDM Schema snippet that defines the element structure
and related complex types. In Line 1, we specify the namespace used
for the JDM Schema,
http://www.jsr-73.org/2004/JDMSchema
. This
namespace includes the Java Specification Request (JSR) number and
the release year of the standard to uniquely identify the major
releases of the JDM Schema. For JDM maintenance releases, the
namespace will not be changed, because the changes are limited to
simple fixes. Currently, this JDM Schema is not hosted on the Internet
Search WWH ::
Custom Search