1 /*
2 * Copyright 1999-2006 Faculty of Mathematics, Physics and Informatics, Comenius
3 * University, Bratislava. This file is protected by the Mozilla Public License
4 * version 1.1 (the License); you may not use this file except in compliance
5 * with the License. You may obtain a copy of the License at
6 * http://euromath2.sourceforge.net/license.html Unless required by applicable
7 * law or agreed to in writing, software distributed under the License is
8 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9 * KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12 package sk.uniba.euromath.foRenderer;
13
14 import java.util.HashMap;
15
16 import org.apache.fop.fo.ElementMapping;
17 import org.apache.fop.fo.FONode;
18
19 import sk.baka.ikslibs.splitted.SplittedDocHolder;
20 import sk.baka.xml.gene.ExportUtils;
21 import sk.uniba.euromath.Const;
22
23 /***
24 * @author Tomáš Studva 2.10.2005
25 */
26 public class MarkElementMapping extends ElementMapping {
27
28 public MarkElementMapping() {
29 namespaceURI = ExportUtils.GENE_ID_ATTRIBUTE_QNAME.getNamespaceURI();
30 }
31
32 /*
33 * (non-Javadoc)
34 *
35 * @see org.apache.fop.fo.ElementMapping#initialize()
36 */
37 @Override
38 protected void initialize() {
39 foObjs = new HashMap<String, Maker>();
40 foObjs.put(SplittedDocHolder.PI_GENEREF_TARGET, new MarkMaker());
41 foObjs.put(DEFAULT, new MarkMaker());
42 }
43
44
45 static class MarkMaker extends ElementMapping.Maker {
46 public FONode make(FONode parent) {
47 return new MarkObj(parent);
48 }
49 }
50
51 }