aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/apps/FopFactoryConfig.java
blob: 2545eea5e74abd704b5d647b754d1829e3ac1c5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* $Id$ */

package org.apache.fop.apps;

import java.net.URI;
import java.util.Map;
import java.util.Set;

import org.apache.avalon.framework.configuration.Configuration;

import org.apache.xmlgraphics.image.loader.ImageManager;

import org.apache.fop.apps.io.ResourceResolver;
import org.apache.fop.fonts.FontManager;
import org.apache.fop.layoutmgr.LayoutManagerMaker;

/**
 * The configuration data for a {@link FopFactory} instance.
 */
public interface FopFactoryConfig {

    /** Defines if FOP should use an alternative rule to determine text indents */
    boolean DEFAULT_BREAK_INDENT_INHERITANCE = false;

    /** Defines if FOP should validate the user config strictly */
    boolean DEFAULT_STRICT_USERCONFIG_VALIDATION = true;

    /** Defines if FOP should use strict validation for FO and user config */
    boolean DEFAULT_STRICT_FO_VALIDATION = true;

    /** Defines the default page-width */
    String DEFAULT_PAGE_WIDTH = "8.26in";

    /** Defines the default page-height */
    String DEFAULT_PAGE_HEIGHT = "11in";

    /** Defines the default source resolution (72dpi) for FOP */
    float DEFAULT_SOURCE_RESOLUTION = 72.0f; //dpi

    /** Defines the default target resolution (72dpi) for FOP */
    float DEFAULT_TARGET_RESOLUTION = 72.0f; //dpi

    /**
     * Whether accessibility features are switched on.
     *
     * @return true if accessibility features have been requested
     */
    boolean isAccessibilityEnabled();

    /** @see {@link FopFactory#getLayoutManagerMakerOverride()} */
    LayoutManagerMaker getLayoutManagerMakerOverride();

    /**
     * The URI resolver used through-out FOP for controlling all file access.
     *
     * @return the URI resolver
     */
    ResourceResolver getResourceResolver();

    /**
     * The base URI from which URIs are resolved against.
     *
     * @return the base URI
     */
    URI getBaseURI();

    /** @see {@link FopFactory#validateStrictly()} */
    boolean validateStrictly();

    /** @see {@link FopFactory#validateUserConfigStrictly()} */
    boolean validateUserConfigStrictly();

    /** @see {@link FopFactory#isBreakIndentInheritanceOnReferenceAreaBoundary()} */
    boolean isBreakIndentInheritanceOnReferenceAreaBoundary();

    /** @see {@link FopFactory#getSourceResolution()} */
    float getSourceResolution();

    /** @see {@link FopFactory#getTargetResolution()} */
    float getTargetResolution();

    /** @see {@link FopFactory#getPageHeight()} */
    String getPageHeight();

    /** @see {@link FopFactory#getPageWidth()} */
    String getPageWidth();

    /** @see {@link FopFactory#getIgnoredNamespace()} */
    Set<String> getIgnoredNamespaces();

    /** @see {@link FopFactory#isNamespaceIgnored(String)} */
    boolean isNamespaceIgnored(String namespace);

    /**
     * Returns the Avalon {@link Configuration} object.
     *
     * @return the Avalon config object
     */
    Configuration getUserConfig();

    /** @see {@link org.apache.fop.render.RendererFactory#isRendererPreferred()} */
    boolean preferRenderer();

    /** @see {@link FopFactory#getFontManager()} */
    FontManager getFontManager();

    /** @see {@link FopFactory#getImageManager()} */
    ImageManager getImageManager();

    boolean isComplexScriptFeaturesEnabled();

    /** @see {@link FopFactory#getHyphenationPatternNames()} */
    Map<String, String> getHyphenationPatternNames();
}