All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.actions.Actions

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.actions.Actions

public class Actions
extends Object
A set of Actions to be taken on an XML document.

The normal way to construct an Actions object is to write an XML document using the action language (actions.dtd), then compile it into an Actions object. This is then passed to DOMToDBMS. For example:

    // Compile an actions document.
    compiler = new ActionCompiler(parserUtils);
    actions = compiler.compile(map, new InputSource(new FileReader("salesactions.act")));
    
// Use a user-defined function to create a DOM tree over sales_in.xml doc = openDocument("sales_in.xml");
// Process the document according to the actions. domToDBMS.processDocument(transferInfo, doc, actions);

Version:
2.0
Author:
Ronald Bourret, 2001

Constructor Index

 o Actions(XMLDBMSMap)
Construct a new Actions object.

Method Index

 o createAction(String, String)
Create an action for an element type and add it to the set of actions.
 o createAction(XMLName)
Create an action for an element type and add it to the set of actions.
 o getAction(String, String)
Get the action for an element type mapped as a class.
 o getAction(XMLName)
Get the action for an element type mapped as a class.
 o getActions()
Gets an Enumeration of all actions.
 o getDefaultAction()
Get the default action for a document.
 o removeAction(String, String)
Remove the action for an element type name.
 o removeAction(XMLName)
Remove the action for an element type name.
 o removeAllActions()
Remove all actions.
 o setDefaultAction(Action)
Set the default action for a document.

Constructors

 o Actions
 public Actions(XMLDBMSMap map)
Construct a new Actions object.

Parameters:
map - The XMLDBMSMap to which the actions apply.

Methods

 o getDefaultAction
 public final Action getDefaultAction()
Get the default action for a document.

Returns:
The default action or null if no default action was found.
 o setDefaultAction
 public void setDefaultAction(Action defaultAction)
Set the default action for a document.

Parameters:
defaultAction - The default action. Null if there is no default action.
 o getAction
 public final Action getAction(XMLName elementTypeName)
Get the action for an element type mapped as a class.

Parameters:
elementTypeName - The element type name. Must not be null.
Returns:
The action or null if no action was found.
 o getAction
 public final Action getAction(String uri,
                               String localName)
Get the action for an element type mapped as a class.

Parameters:
uri - The uri of the element type.
localName - The local name of the element type. Must not be null.
Returns:
The action or null if no action was found.
 o getActions
 public final Enumeration getActions()
Gets an Enumeration of all actions.

Returns:
The Enumeration. May be empty.
 o createAction
 public Action createAction(String uri,
                            String localName) throws XMLMiddlewareException
Create an action for an element type and add it to the set of actions.

Parameters:
uri - Namespace URI of the element type. May be null.
localName - Local name of the element type. Must not be null.
Returns:
The action for the element type.
Throws: XMLMiddlewareException
Thrown if an action has already been created for the element type.
 o createAction
 public Action createAction(XMLName elementTypeName) throws XMLMiddlewareException
Create an action for an element type and add it to the set of actions.

Parameters:
elementTypeName - The element type name. Must not be null.
Returns:
The action for the element type.
Throws: XMLMiddlewareException
Thrown if an action has already been created for the element type or the element type is not mapped as a class.
 o removeAction
 public void removeAction(XMLName elementTypeName) throws XMLMiddlewareException
Remove the action for an element type name.

Parameters:
elementTypeName - The element type name. Must not be null.
Throws: XMLMiddlewareException
Thrown if no action has been specified for the element type.
 o removeAction
 public void removeAction(String uri,
                          String localName) throws XMLMiddlewareException
Remove the action for an element type name.

Parameters:
uri - The uri of the element type.
localName - The local name of the element type. Must not be null.
Throws: XMLMiddlewareException
Thrown if no action has been specified for the element type.
 o removeAllActions
 public void removeAllActions()
Remove all actions.


All Packages  Class Hierarchy  This Package  Previous  Next  Index