Browse Source

FOP-3160: Rename util to avoid conflicts with core

pull/80/head
Simon Steiner 1 month ago
parent
commit
d3ef77c7d6
21 changed files with 32 additions and 27 deletions
  1. 1
    1
      fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java
  2. 1
    1
      fop-core/src/main/java/org/apache/fop/fo/FONode.java
  3. 1
    1
      fop-core/src/main/java/org/apache/fop/render/intermediate/IFParser.java
  4. 3
    2
      fop-core/src/main/java/org/apache/fop/util/text/ChoiceFieldPart.java
  5. 3
    2
      fop-core/src/main/java/org/apache/fop/util/text/EqualsFieldPart.java
  6. 2
    2
      fop-core/src/main/java/org/apache/fop/util/text/GlyphNameFieldPart.java
  7. 2
    2
      fop-core/src/main/java/org/apache/fop/util/text/HexFieldPart.java
  8. 3
    2
      fop-core/src/main/java/org/apache/fop/util/text/IfFieldPart.java
  9. 1
    1
      fop-core/src/main/java/org/apache/fop/util/text/LocatorFormatter.java
  10. 0
    0
      fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$Function
  11. 0
    0
      fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$ObjectFormatter
  12. 0
    0
      fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$PartFactory
  13. 1
    1
      fop-core/src/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
  14. 2
    0
      fop-core/src/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
  15. 1
    1
      fop-core/src/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
  16. 1
    1
      fop-core/src/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
  17. 4
    4
      fop-events/src/main/java/org/apache/fop/events/EventFormatter.java
  18. 1
    1
      fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java
  19. 1
    1
      fop-util/src/main/java/org/apache/fop/utils/DefaultErrorListener.java
  20. 1
    1
      fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java
  21. 3
    3
      fop-util/src/main/java/org/apache/fop/utils/text/AdvancedMessageFormat.java

+ 1
- 1
fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java View File

@@ -87,10 +87,10 @@ import org.apache.fop.util.ColorUtil;
import org.apache.fop.util.ContentHandlerFactory;
import org.apache.fop.util.ContentHandlerFactoryRegistry;
import org.apache.fop.util.ConversionUtils;
import org.apache.fop.util.DefaultErrorListener;
import org.apache.fop.util.LanguageTags;
import org.apache.fop.util.XMLConstants;
import org.apache.fop.util.XMLUtil;
import org.apache.fop.utils.DefaultErrorListener;

import static org.apache.fop.fo.Constants.FO_REGION_AFTER;
import static org.apache.fop.fo.Constants.FO_REGION_BEFORE;

+ 1
- 1
fop-core/src/main/java/org/apache/fop/fo/FONode.java View File

@@ -47,7 +47,7 @@ import org.apache.fop.fo.flow.ChangeBar;
import org.apache.fop.fo.pagination.Root;
import org.apache.fop.util.CharUtilities;
import org.apache.fop.util.ContentHandlerFactory;
import org.apache.fop.util.text.AdvancedMessageFormat.Function;
import org.apache.fop.utils.text.AdvancedMessageFormat.Function;

/**
* Base class for nodes in the XML tree

+ 1
- 1
fop-core/src/main/java/org/apache/fop/render/intermediate/IFParser.java View File

@@ -65,9 +65,9 @@ import org.apache.fop.util.ColorUtil;
import org.apache.fop.util.ContentHandlerFactory;
import org.apache.fop.util.ContentHandlerFactoryRegistry;
import org.apache.fop.util.DOMBuilderContentHandlerFactory;
import org.apache.fop.util.DefaultErrorListener;
import org.apache.fop.util.LanguageTags;
import org.apache.fop.util.XMLUtil;
import org.apache.fop.utils.DefaultErrorListener;

/**
* This is a parser for the intermediate format XML which converts the intermediate file into

+ 3
- 2
fop-core/src/main/java/org/apache/fop/util/text/ChoiceFieldPart.java View File

@@ -24,8 +24,9 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.text.AdvancedMessageFormat;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Defines a "choice" field part that works like {@link ChoiceFormat}.

+ 3
- 2
fop-core/src/main/java/org/apache/fop/util/text/EqualsFieldPart.java View File

@@ -21,8 +21,9 @@ package org.apache.fop.util.text;

import java.util.Map;

import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.text.AdvancedMessageFormat;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Defines an "equals" field part that can compare a field's string value against another string.

+ 2
- 2
fop-core/src/main/java/org/apache/fop/util/text/GlyphNameFieldPart.java View File

@@ -23,8 +23,8 @@ import java.util.Map;

import org.apache.xmlgraphics.fonts.Glyphs;

import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Function formatting a character to a glyph name.

+ 2
- 2
fop-core/src/main/java/org/apache/fop/util/text/HexFieldPart.java View File

@@ -21,8 +21,8 @@ package org.apache.fop.util.text;

import java.util.Map;

import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Function formatting a number or character to a hex value.

+ 3
- 2
fop-core/src/main/java/org/apache/fop/util/text/IfFieldPart.java View File

@@ -21,8 +21,9 @@ package org.apache.fop.util.text;

import java.util.Map;

import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.text.AdvancedMessageFormat;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Defines an "if" field part that checks if field's value is true or false.

+ 1
- 1
fop-core/src/main/java/org/apache/fop/util/text/LocatorFormatter.java View File

@@ -21,7 +21,7 @@ package org.apache.fop.util.text;

import org.xml.sax.Locator;

import org.apache.fop.util.text.AdvancedMessageFormat.ObjectFormatter;
import org.apache.fop.utils.text.AdvancedMessageFormat.ObjectFormatter;

/**
* Object formatter for the SAX Locator object.

fop-core/src/main/resources/META-INF/services/org.apache.fop.util.text.AdvancedMessageFormat$Function → fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$Function View File


fop-core/src/main/resources/META-INF/services/org.apache.fop.util.text.AdvancedMessageFormat$ObjectFormatter → fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$ObjectFormatter View File


fop-core/src/main/resources/META-INF/services/org.apache.fop.util.text.AdvancedMessageFormat$PartFactory → fop-core/src/main/resources/META-INF/services/org.apache.fop.utils.text.AdvancedMessageFormat$PartFactory View File


+ 1
- 1
fop-core/src/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java View File

@@ -27,7 +27,7 @@ import org.xml.sax.helpers.LocatorImpl;
import static org.junit.Assert.assertEquals;

import org.apache.fop.events.model.EventSeverity;
import org.apache.fop.util.text.AdvancedMessageFormat;
import org.apache.fop.utils.text.AdvancedMessageFormat;

/**
* Tests for EventFormatter.

+ 2
- 0
fop-core/src/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java View File

@@ -28,6 +28,8 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import org.apache.fop.utils.XMLResourceBundle;

/**
* Tests for XMLResourceBundle.
*/

+ 1
- 1
fop-core/src/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java View File

@@ -40,7 +40,7 @@ import org.apache.fop.apps.FopFactory;
import org.apache.fop.configuration.Configurable;
import org.apache.fop.configuration.Configuration;
import org.apache.fop.configuration.ConfigurationException;
import org.apache.fop.util.DefaultErrorListener;
import org.apache.fop.utils.DefaultErrorListener;

/**
* BitmapProducer implementation that uses the PS or PDF renderer and an external converter

+ 1
- 1
fop-core/src/test/java/org/apache/fop/visual/BitmapProducerJava2D.java View File

@@ -39,7 +39,7 @@ import org.apache.fop.apps.MimeConstants;
import org.apache.fop.configuration.Configurable;
import org.apache.fop.configuration.Configuration;
import org.apache.fop.configuration.ConfigurationException;
import org.apache.fop.util.DefaultErrorListener;
import org.apache.fop.utils.DefaultErrorListener;

/**
* BitmapProducer implementation that uses the Java2DRenderer to create bitmaps.

+ 4
- 4
fop-events/src/main/java/org/apache/fop/events/EventFormatter.java View File

@@ -29,10 +29,10 @@ import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.fop.util.XMLResourceBundle;
import org.apache.fop.util.text.AdvancedMessageFormat;
import org.apache.fop.util.text.AdvancedMessageFormat.Part;
import org.apache.fop.util.text.AdvancedMessageFormat.PartFactory;
import org.apache.fop.utils.XMLResourceBundle;
import org.apache.fop.utils.text.AdvancedMessageFormat;
import org.apache.fop.utils.text.AdvancedMessageFormat.Part;
import org.apache.fop.utils.text.AdvancedMessageFormat.PartFactory;

/**
* Converts events into human-readable, localized messages.

+ 1
- 1
fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java View File

@@ -35,7 +35,7 @@ import org.xml.sax.helpers.DefaultHandler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.fop.util.DefaultErrorListener;
import org.apache.fop.utils.DefaultErrorListener;

/**
* This is a parser for the event model XML.

fop-util/src/main/java/org/apache/fop/util/DefaultErrorListener.java → fop-util/src/main/java/org/apache/fop/utils/DefaultErrorListener.java View File

@@ -17,7 +17,7 @@

/* $Id$ */

package org.apache.fop.util;
package org.apache.fop.utils;

import javax.xml.transform.ErrorListener;
import javax.xml.transform.TransformerException;

fop-util/src/main/java/org/apache/fop/util/XMLResourceBundle.java → fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java View File

@@ -17,7 +17,7 @@

/* $Id$ */

package org.apache.fop.util;
package org.apache.fop.utils;

import java.io.IOException;
import java.io.InputStream;

fop-util/src/main/java/org/apache/fop/util/text/AdvancedMessageFormat.java → fop-util/src/main/java/org/apache/fop/utils/text/AdvancedMessageFormat.java View File

@@ -17,7 +17,7 @@

/* $Id$ */

package org.apache.fop.util.text;
package org.apache.fop.utils.text;

import java.util.Iterator;
import java.util.List;
@@ -44,7 +44,7 @@ import org.apache.xmlgraphics.util.Service;
public class AdvancedMessageFormat {

/** Regex that matches "," but not "\," (escaped comma) */
static final Pattern COMMA_SEPARATOR_REGEX = Pattern.compile("(?<!\\\\),");
public static final Pattern COMMA_SEPARATOR_REGEX = Pattern.compile("(?<!\\\\),");

private static final Map<String, PartFactory> PART_FACTORIES
= new java.util.HashMap<String, PartFactory>();
@@ -477,7 +477,7 @@ public class AdvancedMessageFormat {
}


static String unescapeComma(String string) {
public static String unescapeComma(String string) {
return string.replaceAll("\\\\,", ",");
}
}

Loading…
Cancel
Save