Class PrefixDeclarationParser


  • public class PrefixDeclarationParser
    extends java.lang.Object
    Utility to parse a prefix declaration attribute into a map of prefixes to URI strings.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.util.List<java.lang.String> consume​(java.io.Reader reader, int c, PrefixDeclarationParser.State state)  
      static java.util.Map<java.lang.String,​java.lang.String> parsePrefixMappings​(java.lang.String value, Report report, EPUBLocation location)
      Parses a prefix declaration attribute into a map of prefixes to URI strings.
      private static int skip​(java.io.Reader reader, int c, com.google.common.base.CharMatcher skipped, com.google.common.base.CharMatcher stopping)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrefixDeclarationParser

        public PrefixDeclarationParser()
    • Method Detail

      • parsePrefixMappings

        public static java.util.Map<java.lang.String,​java.lang.String> parsePrefixMappings​(java.lang.String value,
                                                                                                 Report report,
                                                                                                 EPUBLocation location)
        Parses a prefix declaration attribute into a map of prefixes to URI strings.
        Parameters:
        value - the string to parse (typically from a prefix attribute.
        report - to report errors on the fly.
        location - the location of attribute in the validated file.
        Returns:
        a map of prefixes to URI strings.
      • consume

        private static java.util.List<java.lang.String> consume​(java.io.Reader reader,
                                                                int c,
                                                                PrefixDeclarationParser.State state)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • skip

        private static int skip​(java.io.Reader reader,
                                int c,
                                com.google.common.base.CharMatcher skipped,
                                com.google.common.base.CharMatcher stopping)
                         throws java.io.IOException
        Throws:
        java.io.IOException