All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.maps.ClassMapBase

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.maps.MapBase
           |
           +----org.xmlmiddleware.xmldbms.maps.ClassMapBase

public class ClassMapBase
extends MapBase
Base class for ClassMap and InlineClassMap; not for general use.

ClassMapBase provides accessors for element type name and accessors and mutators for attribute, PCDATA, and child element type maps. It is the base class for ClassMap and InlineClassMap.

ClassMapBase is never used directly. It is only used through ClassMap and InlineClassMap.

Version:
2.0
Author:
Ronald Bourret, 1998-9, 2001
See Also:
ClassMap, InlineClassMap

Method Index

 o addAttributeMap(PropertyMap)
Add a PropertyMap for an attribute.
 o addChildMap(InlineClassMap)
Add an InlineClassMap for a child element type.
 o addChildMap(PropertyMap)
Add a PropertyMap for a child element type.
 o addChildMap(RelatedClassMap)
Add a RelatedClassMap for a child element type.
 o addPCDATAMap(PropertyMap)
Add a PropertyMap for PCDATA.
 o createAttributeMap(String, String)
Create a PropertyMap for an attribute and add it to this map.
 o createAttributeMap(XMLName)
Create a PropertyMap for an attribute and add it to this map.
 o createChildPropertyMap(String, String)
Create a PropertyMap for a child element type and add it to this map.
 o createChildPropertyMap(XMLName)
Create a PropertyMap for a child element type and add it to this map.
 o createInlineClassMap(String, String)
Create an InlineClassMap for a child element type and add it to this map.
 o createInlineClassMap(XMLName)
Create an InlineClassMap for a child element type and add it to this map.
 o createPCDATAMap()
Create a new PropertyMap for PCDATA.
 o createRelatedClassMap(String, String)
Create a RelatedClassMap for a child element type and add it to this map.
 o createRelatedClassMap(XMLName)
Create a RelatedClassMap for a child element type and add it to this map.
 o getAttributeMap(String)
Get the PropertyMap for an attribute.
 o getAttributeMap(String, String)
Get the PropertyMap for an attribute.
 o getAttributeMaps()
Get the PropertyMaps for all attributes.
 o getChildMap(String)
Get the map for a child element type.
 o getChildMap(String, String)
Get the map for a child element type.
 o getChildMaps()
Get the maps for all element types.
 o getElementTypeName()
Get the name of the element type being mapped.
 o getPCDATAMap()
Get the PropertyMap for PCDATA.
 o removeAllAttributeMaps()
Remove the PropertyMaps for all attributes.
 o removeAllChildMaps()
Remove the maps for all child element types.
 o removeAttributeMap(String)
Remove the PropertyMap for an attribute.
 o removeAttributeMap(String, String)
Remove the PropertyMap for an attribute.
 o removeChildMap(String)
Remove the map for a child element type.
 o removeChildMap(String, String)
Remove the map for a child element type.
 o removePCDATAMap()
Remove the PropertyMap for PCDATA.

Methods

 o getElementTypeName
 public final XMLName getElementTypeName()
Get the name of the element type being mapped.

Returns:
The element type name, as an XMLName.
 o getAttributeMap
 public final PropertyMap getAttributeMap(String uri,
                                          String localName)
Get the PropertyMap for an attribute.

Parameters:
uri - Namespace URI of the attribute. May be null.
localName - Local name of the attribute.
Returns:
A PropertyMap for the attribute. Null if the attribute is not mapped.
 o getAttributeMap
 public final PropertyMap getAttributeMap(String universalName)
Get the PropertyMap for an attribute.

Parameters:
universalName - Universal name of the attribute.
Returns:
A PropertyMap for the attribute. Null if the attribute is not mapped.
 o getAttributeMaps
 public final Enumeration getAttributeMaps()
Get the PropertyMaps for all attributes.

Returns:
An Enumeration of the PropertyMaps for all attributes. May be empty.
 o createAttributeMap
 public PropertyMap createAttributeMap(String uri,
                                       String localName)
Create a PropertyMap for an attribute and add it to this map.

If the attribute has already been mapped, returns the existing PropertyMap.

Parameters:
uri - Namespace URI of the attribute. May be null.
localName - Local name of the attribute.
Returns:
The PropertyMap for the attribute.
 o createAttributeMap
 public PropertyMap createAttributeMap(XMLName xmlName)
Create a PropertyMap for an attribute and add it to this map.

If the attribute has already been mapped, returns the existing PropertyMap.

Parameters:
xmlName - XMLName of the attribute.
Returns:
The PropertyMap for the attribute.
 o addAttributeMap
 public void addAttributeMap(PropertyMap propMap) throws XMLMiddlewareException
Add a PropertyMap for an attribute.

Parameters:
propMap - PropertyMap for the attribute. Must not be null.
Throws: XMLMiddlewareException
Thrown if the attribute has already been mapped.
 o removeAttributeMap
 public void removeAttributeMap(String uri,
                                String localName) throws XMLMiddlewareException
Remove the PropertyMap for an attribute.

Parameters:
uri - Namespace URI of the attribute. May be null.
localName - Local name of the attribute.
Throws: XMLMiddlewareException
Thrown if the attribute has not been mapped.
 o removeAttributeMap
 public void removeAttributeMap(String universalName) throws XMLMiddlewareException
Remove the PropertyMap for an attribute.

Parameters:
universalName - Universal name of the attribute.
Throws: XMLMiddlewareException
Thrown if the attribute has not been mapped.
 o removeAllAttributeMaps
 public void removeAllAttributeMaps()
Remove the PropertyMaps for all attributes.

 o getPCDATAMap
 public final PropertyMap getPCDATAMap()
Get the PropertyMap for PCDATA.

Returns:
A PropertyMap for PCDATA. Null if PCDATA is not mapped.
 o createPCDATAMap
 public PropertyMap createPCDATAMap()
Create a new PropertyMap for PCDATA.

If PCDATA has already been mapped, returns the existing PropertyMap.

Returns:
A PropertyMap for PCDATA.
 o addPCDATAMap
 public void addPCDATAMap(PropertyMap propMap) throws XMLMiddlewareException
Add a PropertyMap for PCDATA.

Parameters:
propMap - PropertyMap for PCDATA. Must not be null.
Throws: XMLMiddlewareException
Thrown if PCDATA has already been mapped.
 o removePCDATAMap
 public void removePCDATAMap() throws XMLMiddlewareException
Remove the PropertyMap for PCDATA.

Throws: XMLMiddlewareException
Thrown if PCDATA has not been mapped.
 o getChildMap
 public final Object getChildMap(String uri,
                                 String localName)
Get the map for a child element type.

Returns a PropertyMap, RelatedClassMap, or InlineClassMap, depending on how the child element type is mapped. The calling method must determine the class of the returned Object.

Parameters:
uri - Namespace URI of the child element type. May be null.
localName - Local name of the child element type.
Returns:
The returned map (as an Object) or null if the child element type is not mapped.
 o getChildMap
 public final Object getChildMap(String universalName)
Get the map for a child element type.

Returns a PropertyMap, RelatedClassMap, or InlineClassMap, depending on how the child element type is mapped. The calling method must determine the class of the returned Object.

Parameters:
universalName - Universal name of the child element type.
Returns:
The returned map (as an Object) or null if the child element type is not mapped.
 o getChildMaps
 public final Enumeration getChildMaps()
Get the maps for all element types.

The Enumeration can contain PropertyMaps, RelatedClassMaps, and InlineClassMaps. The calling method must determine the class of Objects returned by the Enumeration.

Returns:
An Enumeration of the maps for all child element types. May be empty.
 o createChildPropertyMap
 public PropertyMap createChildPropertyMap(String uri,
                                           String localName) throws XMLMiddlewareException
Create a PropertyMap for a child element type and add it to this map.

If the child element type has already been mapped as a property, returns the existing PropertyMap.

Parameters:
uri - Namespace URI of the child element type. May be null.
localName - Local name of the child element type.
Returns:
The PropertyMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a related class or inlined class.
 o createChildPropertyMap
 public PropertyMap createChildPropertyMap(XMLName elementTypeName) throws XMLMiddlewareException
Create a PropertyMap for a child element type and add it to this map.

If the child element type has already been mapped as a property, returns the existing PropertyMap.

Parameters:
elementTypeName - XMLName of the child element type.
Returns:
The PropertyMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a related class or inlined class.
 o createRelatedClassMap
 public RelatedClassMap createRelatedClassMap(String uri,
                                              String localName) throws XMLMiddlewareException
Create a RelatedClassMap for a child element type and add it to this map.

If the child element type has already been mapped as a related class, returns the existing RelatedClassMap.

Parameters:
uri - Namespace URI of the child element type. May be null.
localName - Local name of the child element type.
Returns:
The RelatedClassMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a property or inlined class.
 o createRelatedClassMap
 public RelatedClassMap createRelatedClassMap(XMLName elementTypeName) throws XMLMiddlewareException
Create a RelatedClassMap for a child element type and add it to this map.

If the child element type has already been mapped as a related class, returns the existing RelatedClassMap.

Parameters:
elementTypeName - XMLName of the child element type.
Returns:
The RelatedClassMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a property or inlined class.
 o createInlineClassMap
 public InlineClassMap createInlineClassMap(String uri,
                                            String localName) throws XMLMiddlewareException
Create an InlineClassMap for a child element type and add it to this map.

If the child element type has already been mapped as an inlined class, returns the existing InlineClassMap.

Parameters:
uri - Namespace URI of the child element type. May be null.
localName - Local name of the child element type.
Returns:
The InlineClassMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a property or related class.
 o createInlineClassMap
 public InlineClassMap createInlineClassMap(XMLName elementTypeName) throws XMLMiddlewareException
Create an InlineClassMap for a child element type and add it to this map.

If the child element type has already been mapped as an inlined class, returns the existing InlineClassMap.

Parameters:
elementTypeName - XMLName of the child element type.
Returns:
The InlineClassMap for the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type is already mapped as a property or related class.
 o addChildMap
 public void addChildMap(PropertyMap propMap) throws XMLMiddlewareException
Add a PropertyMap for a child element type.

Parameters:
propMap - PropertyMap for the child element type. Must not be null.
Throws: XMLMiddlewareException
Thrown if the child element type has already been mapped.
 o addChildMap
 public void addChildMap(RelatedClassMap relatedClassMap) throws XMLMiddlewareException
Add a RelatedClassMap for a child element type.

The RelatedClassMap is added under the name returned by RelatedClassMap.getElementTypeName(). This may be different from the name returned by RelatedClassMap.getClassMap().getElementTypeName(). That is, the referenced element type might be mapped using the ClassMap for another element type. This effectively "casts" the reference to the second element type. For more information, see the description of the <UseClassMap> element type in the XML-DBMS mapping language.

Parameters:
relatedClassMap - RelatedClassMap for the child element type. Must not be null.
Throws: XMLMiddlewareException
Thrown if the child element type has already been mapped.
 o addChildMap
 public void addChildMap(InlineClassMap inlineClassMap) throws XMLMiddlewareException
Add an InlineClassMap for a child element type.

Parameters:
inlineClassMap - InlineClassMap for the child element type. Must not be null.
Throws: XMLMiddlewareException
Throw if the child element type is already mapped.
 o removeChildMap
 public void removeChildMap(String uri,
                            String localName) throws XMLMiddlewareException
Remove the map for a child element type.

Parameters:
uri - Namespace URI of the child element type. May be null.
localName - Local name of the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type has not been mapped.
 o removeChildMap
 public void removeChildMap(String universalName) throws XMLMiddlewareException
Remove the map for a child element type.

Parameters:
universalName - Universal name of the child element type.
Throws: XMLMiddlewareException
Thrown if the child element type has not been mapped.
 o removeAllChildMaps
 public void removeAllChildMaps()
Remove the maps for all child element types.


All Packages  Class Hierarchy  This Package  Previous  Next  Index