Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

FopFactoryConfig.java 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. // TODO: Make this interface and any implementations of this interface package private. Though
  31. // they are used by classes that are considered the public API, this object doesn't need to be a
  32. // part of the API. Why would a user care how the internal objects are passed around? They shouldn't.
  33. public interface FopFactoryConfig {
  34. /** Defines if FOP should use an alternative rule to determine text indents */
  35. boolean DEFAULT_BREAK_INDENT_INHERITANCE = false;
  36. /** Defines if FOP should validate the user config strictly */
  37. boolean DEFAULT_STRICT_USERCONFIG_VALIDATION = true;
  38. /** Defines if FOP should use strict validation for FO and user config */
  39. boolean DEFAULT_STRICT_FO_VALIDATION = true;
  40. /** Defines the default page-width */
  41. String DEFAULT_PAGE_WIDTH = "8.26in";
  42. /** Defines the default page-height */
  43. String DEFAULT_PAGE_HEIGHT = "11in";
  44. /** Defines the default source resolution (72dpi) for FOP */
  45. float DEFAULT_SOURCE_RESOLUTION = 72.0f; //dpi
  46. /** Defines the default target resolution (72dpi) for FOP */
  47. float DEFAULT_TARGET_RESOLUTION = 72.0f; //dpi
  48. /**
  49. * Whether accessibility features are switched on.
  50. *
  51. * @return true if accessibility features have been requested
  52. */
  53. boolean isAccessibilityEnabled();
  54. /** @see {@link FopFactory#getLayoutManagerMakerOverride()} */
  55. LayoutManagerMaker getLayoutManagerMakerOverride();
  56. /**
  57. * The URI resolver used through-out FOP for controlling all file access.
  58. *
  59. * @return the URI resolver
  60. */
  61. ResourceResolver getResourceResolver();
  62. /**
  63. * The base URI from which URIs are resolved against.
  64. *
  65. * @return the base URI
  66. */
  67. URI getBaseURI();
  68. /** @see {@link FopFactory#validateStrictly()} */
  69. boolean validateStrictly();
  70. /** @see {@link FopFactory#validateUserConfigStrictly()} */
  71. boolean validateUserConfigStrictly();
  72. /** @see {@link FopFactory#isBreakIndentInheritanceOnReferenceAreaBoundary()} */
  73. boolean isBreakIndentInheritanceOnReferenceAreaBoundary();
  74. /** @see {@link FopFactory#getSourceResolution()} */
  75. float getSourceResolution();
  76. /** @see {@link FopFactory#getTargetResolution()} */
  77. float getTargetResolution();
  78. /** @see {@link FopFactory#getPageHeight()} */
  79. String getPageHeight();
  80. /** @see {@link FopFactory#getPageWidth()} */
  81. String getPageWidth();
  82. /** @see {@link FopFactory#getIgnoredNamespace()} */
  83. Set<String> getIgnoredNamespaces();
  84. /** @see {@link FopFactory#isNamespaceIgnored(String)} */
  85. boolean isNamespaceIgnored(String namespace);
  86. /**
  87. * Returns the Avalon {@link Configuration} object.
  88. *
  89. * @return the Avalon config object
  90. */
  91. Configuration getUserConfig();
  92. /** @see {@link org.apache.fop.render.RendererFactory#isRendererPreferred()} */
  93. boolean preferRenderer();
  94. /** @see {@link FopFactory#getFontManager()} */
  95. FontManager getFontManager();
  96. /** @see {@link FopFactory#getImageManager()} */
  97. ImageManager getImageManager();
  98. boolean isComplexScriptFeaturesEnabled();
  99. /** @see {@link FopFactory#getHyphenationPatternNames()} */
  100. Map<String, String> getHyphenationPatternNames();
  101. }