All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.xmlmiddleware.xmldbms.maps.MapBase | +----org.xmlmiddleware.xmldbms.maps.ClassMapBase | +----org.xmlmiddleware.xmldbms.maps.InlineClassMap
InlineClassMap is a cross between a ClassMap and a PropertyMap. It is similar to a ClassMap in that it contains lists of PropertyMaps, RelatedClassMaps, and InlineClassMaps for child elements, PCDATA, and attributes. It differs in that it doesn't have a table or base class property. Instead, its children are mapped to columns in the table of its parent class. This effectively "inlines" the element, treating it as if it didn't exist and its child elements, PCDATA, and attributes belonged to its parent.
An InlineClassMap is similar to a PropertyMap in that it contains order information. This allows inlined elements to be placed in the correct order in their parent.
For example, consider the following Book element:
<Book> <Title>Programming with XML-DBMS</Title> <Author> <LastName>Bourret</LastName> <FirstName>Ronald</FirstName> </Author> </Book>
Normally, the Author element type would be mapped to its own table. If the Author element type is inlined, the references to the LastName and FirstName element types are mapped to columns in the Books table, as if the Author element did not exist.
Inlined element types can be nested arbitrarily deep. That is, an inlined element type may have inlined child elements. However, there can be at most one inlined element of a given type in any parent. If more than one inlined element of the same type were allowed in a given parent, extra information (which XML-DBMS does not store) would need to be stored in the database to reconstruct the inlined elements. (A single inlined element can be reconstructed without such information.) This restriction is unlikely to cause problems for most data-centric documents.
InlineClassMap inherits from ClassMapBase, which provides accessors element type name and accessors and mutators for attribute, PCDATA, and child element type maps. It adds accessors and mutators for order information.
InlineClassMaps are stored in ClassMaps and InlineClassMaps.
public static InlineClassMap create(String uri, String localName)
public static InlineClassMap create(XMLName elementTypeName)
public final OrderInfo getOrderInfo()
public void setOrderInfo(OrderInfo orderInfo)
All Packages Class Hierarchy This Package Previous Next Index