Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||||
SimpleTypeBindAction |
|
| 2.0;2 |
1 | /* |
|
2 | * Copyright 2004 The Apache Software Foundation. |
|
3 | * |
|
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 | * you may not use this file except in compliance with the License. |
|
6 | * You may obtain a copy of the License at |
|
7 | * |
|
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
9 | * |
|
10 | * Unless required by applicable law or agreed to in writing, software |
|
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 | * See the License for the specific language governing permissions and |
|
14 | * limitations under the License. |
|
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: 155402 $ |
|
25 | */ |
|
26 | 728 | public class SimpleTypeBindAction extends MappingAction.Base { |
27 | ||
28 | 351 | public static final SimpleTypeBindAction INSTANCE = new SimpleTypeBindAction(); |
29 | ||
30 | ||
31 | ||
32 | public void body(String text, ReadContext context) throws Exception { |
|
33 | // add dyna-bean support! |
|
34 | // probably refactoring needed |
|
35 | 3765 | Updater updater = context.getCurrentUpdater(); |
36 | 3765 | if (updater != null) |
37 | { |
|
38 | 3471 | updater.update(context, text); |
39 | } else { |
|
40 | 294 | if (context.getLog().isDebugEnabled()) |
41 | { |
|
42 | 0 | context.getLog().debug("No updater for simple type '" + context.getCurrentElement() + "'"); |
43 | } |
|
44 | } |
|
45 | 3752 | } |
46 | ||
47 | public MappingAction next( |
|
48 | String namespace, |
|
49 | String name, |
|
50 | Attributes attributes, |
|
51 | ReadContext context) |
|
52 | throws Exception { |
|
53 | 13 | return MappingAction.IGNORE; |
54 | } |
|
55 | ||
56 | } |