View Javadoc

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.document;
13  import sk.baka.xml.gene.ICoordinator;
14  import sk.baka.xml.gene.InstanceProvider;
15  import sk.uniba.euromath.document.DocumentView;
16  /***
17   * Handles export of the document to various formats. For querying various export information please use
18   * <code>InstanceProvider</code>.
19   * @author Martin Vysny
20   */
21  public final class ExportManager {
22  	/***
23  	 * The document instance.
24  	 */
25  	private final XMLAccess xmlAccess;
26  	/***
27  	 * Constructor.
28  	 * @param xmlAccess the document instance.
29  	 */
30  	ExportManager(XMLAccess xmlAccess) {
31  		super();
32  		this.xmlAccess = xmlAccess;
33  	}
34  	/***
35  	 * Returns the coordinator for given output class and prepares it for
36  	 * export.
37  	 * @param outputClass the document class that shall be produced.
38  	 * @param defaultView the default view on the document. Exporters from this view should have higher priority when
39  	 * constructing the export graph.
40  	 * @return the coordinator instance
41  	 */
42  	public ICoordinator getCoordinator(String outputClass,
43  			DocumentView defaultView) {
44  		return InstanceProvider.getInstance().newCoordinator(outputClass);
45  	}
46  }