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.

PatternConsumer.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* $Id$
  2. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  3. * For details on use and redistribution please refer to the
  4. * LICENSE file included with these sources.
  5. */
  6. package org.apache.fop.layout.hyphenation;
  7. import java.util.Vector;
  8. /**
  9. * This interface is used to connect the XML pattern file parser to
  10. * the hyphenation tree.
  11. *
  12. * @author Carlos Villegas <cav@uniscope.co.jp>
  13. */
  14. public interface PatternConsumer {
  15. /** Add a character class.
  16. * A character class defines characters that are considered
  17. * equivalent for the purpose of hyphenation (e.g. "aA"). It
  18. * usually means to ignore case.
  19. */
  20. public void addClass(String chargroup);
  21. /** Add a hyphenation exception. An exception replaces the
  22. * result obtained by the algorithm for cases for which this
  23. * fails or the user wants to provide his own hyphenation.
  24. * A hyphenatedword is a vector of alternating String's and
  25. * {@link Hyphen Hyphen} instances */
  26. public void addException(String word, Vector hyphenatedword);
  27. /**
  28. * Add hyphenation patterns.
  29. * @param pattern
  30. * @param values interletter values expressed as a string of
  31. * digit characters.
  32. */
  33. public void addPattern(String pattern, String values);
  34. }