1 /* 2 * Copyright 2012 Olivier Godineau 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at http://www.apache.org/licenses/LICENSE-2.0 7 * 8 * Unless required by applicable law or agreed to in writing, software 9 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 * License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 package olg.csv.bean.loader.getter.impl; 15 16 import javax.xml.xpath.XPathExpressionException; 17 18 import olg.csv.bean.getter.AbstractGetter; 19 import olg.csv.bean.loader.getter.AbstractGetterLoader; 20 21 import org.w3c.dom.Element; 22 23 /** 24 * the Loader characteristic of the default getter. 25 * 26 * @see AbstractGetter#getDefault(String, String) 27 */ 28 public final class DefaultGetterLoader extends AbstractGetterLoader { 29 30 /** 31 * Constructs a loader bound with the column node. 32 * 33 * @param successor 34 * the next getter loader in the loader chain. 35 */ 36 public DefaultGetterLoader(AbstractGetterLoader successor) { 37 super("column", successor); 38 39 } 40 41 @Override 42 protected AbstractGetter getConcreteGetter(Element node, String defaultValue) throws XPathExpressionException { 43 44 return AbstractGetter.getDefault(node.getAttribute("rang"), defaultValue); 45 } 46 47 }