You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FopFactoryConfig.java 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.apps;
  19. import java.net.URI;
  20. import java.util.Map;
  21. import java.util.Set;
  22. import org.apache.avalon.framework.configuration.Configuration;
  23. import org.apache.xmlgraphics.image.loader.ImageManager;
  24. import org.apache.fop.apps.io.ResourceResolver;
  25. import org.apache.fop.fonts.FontManager;
  26. import org.apache.fop.layoutmgr.LayoutManagerMaker;
  27. /**
  28. * The configuration data for a {@link FopFactory} instance.
  29. */
  30. public interface FopFactoryConfig {
  31. /** Defines if FOP should use an alternative rule to determine text indents */
  32. boolean DEFAULT_BREAK_INDENT_INHERITANCE = false;
  33. /** Defines if FOP should validate the user config strictly */
  34. boolean DEFAULT_STRICT_USERCONFIG_VALIDATION = true;
  35. /** Defines if FOP should use strict validation for FO and user config */
  36. boolean DEFAULT_STRICT_FO_VALIDATION = true;
  37. /** Defines the default page-width */
  38. String DEFAULT_PAGE_WIDTH = "8.26in";
  39. /** Defines the default page-height */
  40. String DEFAULT_PAGE_HEIGHT = "11in";
  41. /** Defines the default source resolution (72dpi) for FOP */
  42. float DEFAULT_SOURCE_RESOLUTION = 72.0f; //dpi
  43. /** Defines the default target resolution (72dpi) for FOP */
  44. float DEFAULT_TARGET_RESOLUTION = 72.0f; //dpi
  45. /**
  46. * Whether accessibility features are switched on.
  47. *
  48. * @return true if accessibility features have been requested
  49. */
  50. boolean isAccessibilityEnabled();
  51. /** @see {@link FopFactory#getLayoutManagerMakerOverride()} */
  52. LayoutManagerMaker getLayoutManagerMakerOverride();
  53. /**
  54. * The URI resolver used through-out FOP for controlling all file access.
  55. *
  56. * @return the URI resolver
  57. */
  58. ResourceResolver getNewURIResolver();
  59. /**
  60. * The base URI from which URIs are resolved against.
  61. *
  62. * @return the base URI
  63. */
  64. URI getBaseURI();
  65. /** @see {@link FopFactory#validateStrictly()} */
  66. boolean validateStrictly();
  67. /** @see {@link FopFactory#validateUserConfigStrictly()} */
  68. boolean validateUserConfigStrictly();
  69. /** @see {@link FopFactory#isBreakIndentInheritanceOnReferenceAreaBoundary()} */
  70. boolean isBreakIndentInheritanceOnReferenceAreaBoundary();
  71. /** @see {@link FopFactory#getSourceResolution()} */
  72. float getSourceResolution();
  73. /** @see {@link FopFactory#getTargetResolution()} */
  74. float getTargetResolution();
  75. /** @see {@link FopFactory#getPageHeight()} */
  76. String getPageHeight();
  77. /** @see {@link FopFactory#getPageWidth()} */
  78. String getPageWidth();
  79. /** @see {@link FopFactory#getIgnoredNamespace()} */
  80. Set<String> getIgnoredNamespaces();
  81. /** @see {@link FopFactory#isNamespaceIgnored(String)} */
  82. boolean isNamespaceIgnored(String namespace);
  83. /**
  84. * Returns the Avalon {@link Configuration} object.
  85. *
  86. * @return the Avalon config object
  87. */
  88. Configuration getUserConfig();
  89. /** @see {@link org.apache.fop.render.RendererFactory#isRendererPreferred()} */
  90. boolean preferRenderer();
  91. /** @see {@link FopFactory#getFontManager()} */
  92. FontManager getFontManager();
  93. /** @see {@link FopFactory#getImageManager()} */
  94. ImageManager getImageManager();
  95. boolean isComplexScriptFeaturesEnabled();
  96. Map<String, String> getHyphPatNames();
  97. }