source: trunk/docx4j/src/main/java/org/docx4j/model/SymbolModel.java @ 979

Revision 979, 1.5 KB checked in by jharrop, 2 years ago (diff)

Basic support in pdf via XSL FO, and HTML NG2, for bookmarks, hyperlink, symbols, w:pict.
Tabs are currently just replaced simple-mindedly with spaces.

Line 
1/*
2 *  Copyright 2009, Plutext Pty Ltd.
3 *   
4 *  This file is part of docx4j.
5
6    docx4j is licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18
19 */
20package org.docx4j.model;
21
22import javax.xml.bind.JAXBException;
23import javax.xml.transform.TransformerException;
24
25import org.apache.log4j.Logger;
26import org.docx4j.XmlUtils;
27import org.docx4j.wml.R.Sym;
28import org.w3c.dom.Node;
29import org.w3c.dom.NodeList;
30
31public class SymbolModel extends Model {
32        private final static Logger log = Logger.getLogger(SymbolModel.class);
33
34        private Sym sym;
35        /**
36         * @return the sym
37         */
38        public Sym getSym() {
39                return sym;
40        }
41       
42        @Override
43        public void build(Node node, NodeList children) throws TransformerException {
44
45                try {
46                        sym = (Sym) XmlUtils.unmarshal(node);
47                } catch (JAXBException e) {
48                        throw new TransformerException("Node: " + node.getNodeName() + "="
49                                        + node.getNodeValue(), e);
50                }
51               
52        }
53
54        @Override
55        public Object toJAXB() {
56                // TODO Auto-generated method stub
57                return null;
58        }
59
60        public static class SymbolModelTransformState implements TransformState { }
61
62}
Note: See TracBrowser for help on using the repository browser.