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
-
addAttributeMap(PropertyMap)
- Add a PropertyMap for an attribute.
-
addChildMap(InlineClassMap)
- Add an InlineClassMap for a child element type.
-
addChildMap(PropertyMap)
- Add a PropertyMap for a child element type.
-
addChildMap(RelatedClassMap)
- Add a RelatedClassMap for a child element type.
-
addPCDATAMap(PropertyMap)
- Add a PropertyMap for PCDATA.
-
createAttributeMap(String, String)
- Create a PropertyMap for an attribute and add it to this map.
-
createAttributeMap(XMLName)
- Create a PropertyMap for an attribute and add it to this map.
-
createChildPropertyMap(String, String)
- Create a PropertyMap for a child element type and add it to this map.
-
createChildPropertyMap(XMLName)
- Create a PropertyMap for a child element type and add it to this map.
-
createInlineClassMap(String, String)
- Create an InlineClassMap for a child element type and add it to this map.
-
createInlineClassMap(XMLName)
- Create an InlineClassMap for a child element type and add it to this map.
-
createPCDATAMap()
- Create a new PropertyMap for PCDATA.
-
createRelatedClassMap(String, String)
- Create a RelatedClassMap for a child element type and add it to this map.
-
createRelatedClassMap(XMLName)
- Create a RelatedClassMap for a child element type and add it to this map.
-
getAttributeMap(String)
- Get the PropertyMap for an attribute.
-
getAttributeMap(String, String)
- Get the PropertyMap for an attribute.
-
getAttributeMaps()
- Get the PropertyMaps for all attributes.
-
getChildMap(String)
- Get the map for a child element type.
-
getChildMap(String, String)
- Get the map for a child element type.
-
getChildMaps()
- Get the maps for all element types.
-
getElementTypeName()
- Get the name of the element type being mapped.
-
getPCDATAMap()
- Get the PropertyMap for PCDATA.
-
removeAllAttributeMaps()
- Remove the PropertyMaps for all attributes.
-
removeAllChildMaps()
- Remove the maps for all child element types.
-
removeAttributeMap(String)
- Remove the PropertyMap for an attribute.
-
removeAttributeMap(String, String)
- Remove the PropertyMap for an attribute.
-
removeChildMap(String)
- Remove the map for a child element type.
-
removeChildMap(String, String)
- Remove the map for a child element type.
-
removePCDATAMap()
- Remove the PropertyMap for PCDATA.
getElementTypeName
public final XMLName getElementTypeName()
- Get the name of the element type being mapped.
- Returns:
- The element type name, as an XMLName.
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.
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.
getAttributeMaps
public final Enumeration getAttributeMaps()
- Get the PropertyMaps for all attributes.
- Returns:
- An Enumeration of the PropertyMaps for all attributes. May be empty.
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.
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.
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.
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.
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.
removeAllAttributeMaps
public void removeAllAttributeMaps()
- Remove the PropertyMaps for all attributes.
getPCDATAMap
public final PropertyMap getPCDATAMap()
- Get the PropertyMap for PCDATA.
- Returns:
- A PropertyMap for PCDATA. Null if PCDATA is not mapped.
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.
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.
removePCDATAMap
public void removePCDATAMap() throws XMLMiddlewareException
- Remove the PropertyMap for PCDATA.
- Throws: XMLMiddlewareException
- Thrown if PCDATA has not been mapped.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
removeAllChildMaps
public void removeAllChildMaps()
- Remove the maps for all child element types.
All Packages Class Hierarchy This Package Previous Next Index