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
-
Actions(XMLDBMSMap)
- Construct a new Actions object.
-
createAction(String, String)
- Create an action for an element type and add it to the set of actions.
-
createAction(XMLName)
- Create an action for an element type and add it to the set of actions.
-
getAction(String, String)
- Get the action for an element type mapped as a class.
-
getAction(XMLName)
- Get the action for an element type mapped as a class.
-
getActions()
- Gets an Enumeration of all actions.
-
getDefaultAction()
- Get the default action for a document.
-
removeAction(String, String)
- Remove the action for an element type name.
-
removeAction(XMLName)
- Remove the action for an element type name.
-
removeAllActions()
- Remove all actions.
-
setDefaultAction(Action)
- Set the default action for a document.
Actions
public Actions(XMLDBMSMap map)
- Construct a new Actions object.
- Parameters:
- map - The XMLDBMSMap to which the actions apply.
getDefaultAction
public final Action getDefaultAction()
- Get the default action for a document.
- Returns:
- The default action or null if no default action was found.
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.
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.
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.
getActions
public final Enumeration getActions()
- Gets an Enumeration of all actions.
- Returns:
- The Enumeration. May be empty.
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.
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.
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.
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.
removeAllActions
public void removeAllActions()
- Remove all actions.
All Packages Class Hierarchy This Package Previous Next Index