1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.betwixt.io.read;
17
18 import org.apache.commons.betwixt.expression.Updater;
19 import org.xml.sax.Attributes;
20
21 /***
22 * Action binds a simple type.
23 * @author <a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a>
24 * @version $Revision: 1.2 $
25 */
26 public class SimpleTypeBindAction extends MappingAction.Base {
27
28 public static final SimpleTypeBindAction INSTANCE = new SimpleTypeBindAction();
29
30
31
32 public void body(String text, ReadContext context) throws Exception {
33
34
35 Updater updater = context.getCurrentUpdater();
36 if (updater != null)
37 {
38 updater.update(context, text);
39 } else {
40 if (context.getLog().isDebugEnabled())
41 {
42 context.getLog().debug("No updater for simple type '" + context.getCurrentElement() + "'");
43 }
44 }
45 }
46
47 public MappingAction next(
48 String namespace,
49 String name,
50 Attributes attributes,
51 ReadContext context)
52 throws Exception {
53 return MappingAction.IGNORE;
54 }
55
56 }