@Override public String getAttribute(Element element, String attribute) { String expression = super.getAttribute(element, attribute); return elEngine.resolve(expression); }
@Override public String getNodeValue(Element element) { String expression = super.getNodeValue(element); return elEngine.resolve(expression); }
public MappingStreamReader(XMLParserFactory parserFactory) { this.documentBuilder = parserFactory.createParser(); this.parser = new XMLParser(); }
private String getAttribute(Element element, String attribute) { return elementReader.getAttribute(element, attribute); }
private String getNodeValue(Element element) { return elementReader.getNodeValue(element); }
public DocumentBuilder createParser() { DocumentBuilderFactory factory = createDocumentBuilderFactory(); try { return createDocumentBuilder(factory); } catch (ParserConfigurationException e) { throw new MappingException("Failed to create XML Parser !", e); } }
/** * Add mapping XML from InputStream resources for mapping not stored in * files (e.g. from database.) The InputStream will be read immediately to * internally create MappingFileData objects so that the InputStreams may be * closed after the call to this method. * * @param xmlStream Dozer mapping XML InputStream */ public void addMapping(InputStream xmlStream) { checkIfInitialized(); MappingStreamReader fileReader = new MappingStreamReader(XMLParserFactory.getInstance()); MappingFileData mappingFileData = fileReader.read(xmlStream); builderMappings.add(mappingFileData); }
public void init() { context = new SimpleContext(resolver); }
@Override public void warning(SAXParseException e) throws SAXException { // you can choose not to handle it throw new SAXException(getMessage("Warning", e)); }
public MappingFileReader(XMLParserFactory parserFactory) { documentBuilder = parserFactory.createParser(); }
public void setFunction(String prefix, String name, Method method) { Functions functions = (Functions) context.getFunctionMapper(); functions.setFunction(prefix, name, method); }
public MappingFileReader(XMLParserFactory parserFactory) { streamReader = new MappingStreamReader(parserFactory); }
@Override public String getAttribute(Element element, String attribute) { String expression = super.getAttribute(element, attribute); return elEngine.resolve(expression); }
@Override public String getNodeValue(Element element) { String expression = super.getNodeValue(element); return elEngine.resolve(expression); }
private String getAttribute(Element element, String attribute) { return elementReader.getAttribute(element, attribute); }
private String getNodeValue(Element element) { return elementReader.getNodeValue(element); }
public void init() { context = new SimpleContext(resolver); }
@Override public void warning(SAXParseException e) throws SAXException { // you can choose not to handle it throw new SAXException(getMessage("Warning", e)); }
private String getAttribute(Element element, String attribute) { return elementReader.getAttribute(element, attribute); }
private String getNodeValue(Element element) { return elementReader.getNodeValue(element); }